»ö« 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:00
cognominal_ left,
cognominal_ joined
00:03
Tedd1 joined
00:07
tokuhiro_ joined
00:22
seldon left
00:24
cognominal__ joined
00:25
cognominal_ left
00:27
whiteknight joined
00:28
cognominal__ left,
whiteknight is now known as Guest47936
00:40
cognominal joined,
tokuhiro_ left
00:42
cognominal left
00:58
Guest47936 left
01:00
cognominal joined
01:01
cognominal left
01:06
UncleFester6 joined
01:26
ponbiki left
01:33
ponbiki joined,
ponbiki is now known as Guest90488
01:39
PacoAir left
01:41
Guest90488 left
01:49
UncleFester6 left
02:00
bluescreen10 left
02:09
Chillance left
02:37
Psyche^ joined
02:39
leprevost joined
02:40
Patterner left,
Psyche^ is now known as Patterner
02:43
b1rkh0ff left
02:55
orafu left,
orafu joined
03:20
bluescreen10 joined
|
|||
dalek | ast: d0cf38e | coke++ | S05-interpolation/regex-in-variable.t: pugs fudge |
03:28 | |
03:29
thelazydeveloper left
03:30
gongyiliao joined
|
|||
Timbus | r: sub ♞ {"knight"} | 03:31 | |
p6eval | rakudo 1f662c: OUTPUT«===SORRY!===Missing blockat /tmp/QYTg3e9hBc:1» | ||
Timbus | not allowed? | ||
n: sub ♞ {"knight"}; say ♞; | 03:32 | ||
p6eval | niecza v19-15-g051783d: OUTPUT«===SORRY!===Malformed block at /tmp/3WDDbuhVVO line 1:------> sub ⏏♞ {"knight"}; say ♞;Parse failed» | ||
Timbus | guess so | ||
dalek | ast: 1b99898 | coke++ | S06-other/main.t: niecza fudge |
||
[Coke] | r: sub postfix<♞> { "knight" }; | 03:37 | |
p6eval | rakudo 1f662c: OUTPUT«===SORRY!===Missing blockat /tmp/fdJ_TSY3Zl:1» | ||
benabik | r: sub postfix:<♞>($x) { $x ~ "knight" }; say "white "♞ | 03:38 | |
p6eval | rakudo 1f662c: OUTPUT«white knight» | ||
03:38
gongyiliao left
|
|||
timotimo | what exactly does fudge mean? is it different from "skip" or "xfail"? | 03:39 | |
benabik | r: sub term:<♞>() { "knight" }; say ♞ | ||
p6eval | rakudo 1f662c: OUTPUT«===SORRY!===Cannot add tokens of category 'term'at /tmp/ELsIQfALdE:1» | ||
benabik | I think "fudge" is for things that fail only in some implementations. | ||
timotimo | OK | 03:40 | |
oh my, it's already light out. time to go to bed >_> | |||
good * #perl6 | |||
Timbus | r: macro circumfix:«♞ ♞»($text) { return "kn" ~ "i" x $text.chars ~ "ghts" }; macro circumfix:«☀ ☀»($text) { return "d" ~ "a" x $text.chars ~ "ze" }; say "arabian " ~ ♞'♞♞♞♞'♞; say "like arabian " ~ say "Like arabian " ~ ☀'☀☀☀☀☀'☀; say "more often than not, are hotter than hot" | 03:41 | |
p6eval | rakudo 1f662c: OUTPUT«arabian kniiiightsLike arabian daaaaazelike arabian Truemore often than not, are hotter than hot» | ||
Timbus | aw | ||
is it possible to get macros to take non-strings | 03:43 | ||
03:47
birdwindupbird joined
|
|||
Timbus | r: macro circumfix:«♞ ♞»($text) is parsed / <-[♞]>+ / { return "kn" ~ "i" x $text.chars ~ "ghts" }; say ♞♘♘♘♞ | 03:47 | |
p6eval | rakudo 1f662c: OUTPUT«===SORRY!===Missing blockat /tmp/IvVjMgDvki:1» | ||
Timbus | d'oh | 03:48 | |
03:51
ingy joined
04:05
jaldhar joined
04:07
Stocks29 joined
04:08
Stocks29 left
04:31
kaare_ joined
04:32
telex left
04:33
telex joined
04:48
thou joined
05:11
JimmyZ_ joined
|
|||
moritz | jnthn: (re documenting metamodel in perl6/doc) yes, reasonable. Go ahead :-) | 05:15 | |
good morning everybdoy | 05:17 | ||
05:18
gongyiliao joined
|
|||
JimmyZ_ | moritz: good morning | 05:19 | |
sorear | good morning moritz. | 05:22 | |
05:45
gongyiliao left
05:54
leprevost left
|
|||
dalek | c: 45054e8 | moritz++ | lib/objects.pod: [object] self, private methods, submethods |
06:13 | |
moritz | r: class A { has $.x; submethod BUILD() { } }; A.new(:x<3>).x.say | 06:14 | |
p6eval | rakudo 1f662c: OUTPUT«Any()» | ||
06:39
SamuraiJack joined
07:01
thou left
07:06
cognominal joined
07:16
eternaleye_ is now known as eternaleye
07:30
GlitchMr joined
07:59
tokuhiro_ joined
08:02
nodmonkey joined
|
|||
masak | good antenoon, #perl6 | 08:19 | |
moritz | \o masak | 08:20 | |
08:20
brrt joined
08:21
birdwindupbird left
|
|||
masak back-clogs | 08:22 | ||
moritz | r | 08:23 | |
Timbus | arr! | 08:24 | |
moritz | array! | ||
r: say Array.^mro | |||
p6eval | rakudo 1f662c: OUTPUT«Array() List() Iterable() Cool() Any() Mu()» | ||
moritz | r: say Parcel.^mro | 08:25 | |
p6eval | rakudo 1f662c: OUTPUT«Parcel() Cool() Any() Mu()» | ||
moritz thought Parcel was Iterable | |||
Timbus | i oh thought you were txting in pirate. "r me hrties. wnt 2 plndr l8r?" | 08:26 | |
moritz | akshually it was just a mostly dead ssh connection where I didn't see what I typed | 08:27 | |
masak | r: $_ = "mostly dead ssh connection"; s[ea] = "rea"; .say | 08:28 | |
p6eval | rakudo 1f662c: OUTPUT«mostly dread ssh connection» | ||
08:28
tokuhiro_ left
|
|||
sorear | o/ masak | 08:30 | |
JimmyZ_ | r: s[ea] = "rea"; .say | ||
p6eval | rakudo 1f662c: OUTPUT«No such method 'subst' for invocant of type 'Any' in block at /tmp/htGuR5us8T:1» | ||
masak | sorear: \o | ||
JimmyZ_ | r: $_ = ""; s[ ] = "rea"; .say | 08:31 | |
p6eval | rakudo 1f662c: OUTPUT«rea» | ||
JimmyZ_ | r: $_ = ""; s[] = "rea"; .say | 08:32 | |
p6eval | rakudo 1f662c: OUTPUT«===SORRY!===Unrecognized regex metacharacter ] (must be quoted to match literally) at line 2, near " = \"rea\"; "» | ||
JimmyZ_ | std: $_ = ""; s[ ] = "rea"; .say | 08:33 | |
p6eval | std f43a358: OUTPUT«===SORRY!===Null pattern not allowed at /tmp/VK1jegzuR7 line 1:------> $_ = ""; s[ ⏏] = "rea"; .say expecting quantifierParse failedFAILED 00:00 43m» | ||
tadzik | good morning | 08:34 | |
moritz | \o tadzik | 08:35 | |
08:36
thelazydeveloper joined
|
|||
sorear | .oO( there's only one? also, that's quite some Hubris you have there ) |
08:38 | |
08:38
brrt left
|
|||
moritz | sorear: only one what? /me misses some context | 08:39 | |
sorear | 01:36 -!- thelazydeveloper [~lazydevel@unaffiliated/thelazydeveloper] has joined #perl6 | 08:40 | |
masak comes crashing in through the window | 08:41 | ||
moritz: grammar! | |||
masak runs off | |||
moritz | now we can just hope for impatience | ||
sorear | I'm missing the context | ||
moritz too | 08:44 | ||
masak .oO( Perl 6 Coding Context ) | |||
by the way, first and second prize winners have gotten their prizes now, if not all their book deliveries yet. | 08:45 | ||
moritz | \o/ | ||
masak | the p6cc2011 was awesome. the judging was a bit slow, but that's my fault. | 08:46 | |
moritz++ helped with a second set of eyeballs, moral support, and occasional necessary reminders. | |||
moritz | and much of the review for t1 and t2 :-) | 08:47 | |
masak | oh, yes. moritz++ | ||
also, p6cc2012 will be *awesome*. | |||
moritz | r: class A { has $.x = 5; submethod BUILD() { } }; A.new(:x<3>).x.say | 08:49 | |
p6eval | rakudo 1f662c: OUTPUT«5» | ||
masak finds he used "awesome" about both p6cc2011 and p6cc2012, but felt he meant different things... | 08:52 | ||
moritz | MTA: More Than Awesome | ||
masak | :P | 08:53 | |
08:54
bbkr left
08:55
mucker joined
|
|||
masak | I'm implementing Lambda Calculus. planning to do a small writeup about it. github.com/masak/lambda-calculus/commits/master | 09:01 | |
but now I have a case of a left-recursive rule, and I'm thinking about how best to handle it. | |||
here's what the Wikipedia page has to say about it: "Applications are assumed to be left associative: M N P may be written instead of ((M N) P)" | 09:02 | ||
so both of these create the AST `app[ app[M, N], P ]`. | 09:03 | ||
moritz | with a quantifier :-) | ||
masak | heh :) | ||
yes, the thought crossed my mind. | |||
and then just have the action method create the right AST. | |||
moritz | right | ||
masak | moritz++ | ||
moritz | or | 09:04 | |
build a parser generator that correctly handles left recursion :-) | |||
masak | yeah. | ||
moritz | or take an existing one :-) | ||
masak | I was wondering if maybe the new LTM-y bits would correctly handle left recursion. | ||
moritz | you can make bison emit its jump table | ||
recursion terminates longest prefixes | |||
masak | but there's a potential infinity in there which I guess is a bit too much even for our LTM. | ||
moritz | so, no | ||
masak | ah, yes. | ||
does that go for mutual recursion as well? that must be a hoot to compute. | 09:05 | ||
moritz | mutual recursion also terminates longest prefixes | ||
masak head spins | |||
moritz | well, it would be much harder to have it not terminate LTM :-) | 09:06 | |
because it would mean the NFA/DFA builder would need to know how to turn recursion into quantifiers | |||
masak | ah well. it's declarative, and everyone knows declarations don't require any computation :P | ||
moritz | now you can just have a hash with all method names that have already been visited (when doing the declarative prefix calculations) | ||
masak | ah; yes. | 09:07 | |
hm. | |||
moritz | I'd say that's one of the simpler parts of LTM implementation :-) | ||
masak | I can't quite get that to fit, though. | ||
you have to remove stuff from that hash as you go up the call tree. | |||
oh, I guess it works out. | 09:08 | ||
arnsholt | I think the "standard" way to avoid left-recursion in CFGs is to refactor the grammar | ||
moritz | masak: you just have to copy the hash for each new branch | ||
arnsholt | There's a weakly equivalent (same language, but different parse tree) Greibach normal form for all CFGs | 09:09 | |
dalek | c: c6ac771 | moritz++ | lib/objects.pod: [objects] inheritance, object construction |
||
moritz | ah yes, I remember that fun in the formal languages class :-) | ||
masak | oh, so much to learn... :) | ||
moritz | reviews of the commit above would be very welcome | 09:10 | |
is it understandable, is it correct? | |||
masak reviews | 09:11 | ||
s/the parents' method/the parents classes' method/, perhaps? | 09:12 | ||
s/of the name/of that name/ -- and this doesn't address "longnames". | 09:13 | ||
s/The order by which/The order in which/ | |||
s/\(mro\)/(MRO)/ | |||
sorear | sleep& | 09:14 | |
masak | 'night, sorear. | ||
"All calls to public method are "virtual" in the C++ sense" -- nitpick: is it the call that is virtual? or the public method? | 09:15 | ||
"Point.new( x => 1, y => 2);" -- unbalanced whitespace inside parens. | |||
09:16
mberends joined
|
|||
mberends | o/ | 09:16 | |
masak | mberends! \o/ | ||
s/\(ie/(i.e./ | |||
mberends had time to read irclogs for a change :-) | 09:17 | ||
moritz | \o mberends | 09:18 | |
dalek | c: 2c69e87 | moritz++ | lib/objects.pod: fixes by masak++ |
||
09:19
Khisanth left
|
|||
masak | ss/However this is considered poor practi<(s)>e/c/ | 09:19 | |
masak loves <( )> | |||
moritz: maybe worth pointing out that the $!attr binding in BUILD isn't particular to BUILD, or even submethods | 09:20 | ||
anyway, moritz++. nice, clear explanation. | |||
09:20
Khisanth joined
|
|||
masak | oh, and I'd perhaps go with s/much harder/harder/ in the end. :) | 09:21 | |
09:26
brrt joined
|
|||
arnsholt | Oooh. <( )> is pretty spiffy | 09:27 | |
masak | moritz, arnsholt: ended up refactoring my l-recursion into a quantifier :) thanks. | 09:29 | |
JimmyZ_ likes <( )> too. | 09:32 | ||
09:41
brrt left,
brrt joined
|
|||
masak | rn: grammar G { regex TOP { ^ $ { make "OH HAI" } } }; say G.parse('').ast | 09:44 | |
p6eval | rakudo 1f662c, niecza v19-15-g051783d: OUTPUT«OH HAI» | ||
masak | hm. | 09:45 | |
09:45
PacoAir joined
|
|||
jnthn | moritz++ # taking my scribblings in objects.pod and adding loads more to them :) | 09:46 | |
good morningish | 09:47 | ||
masak | good mornington, jnthn. | ||
rn: grammar G { regex TOP { ^ <foo> $ { make $<foo>.ast } }; regex foo { foo { make "OH HAI" } } }; say G.parse('foo').ast | |||
p6eval | rakudo 1f662c, niecza v19-15-g051783d: OUTPUT«OH HAI» | ||
JimmyZ_ | good morning jnthn | 09:48 | |
masak | rn: grammar G { regex TOP { ^ <foo> $ { make $<foo>.ast } }; regex foo { [foo|bar] { make "OH HAI" } } }; say G.parse('foo').ast | 09:50 | |
p6eval | rakudo 1f662c, niecza v19-15-g051783d: OUTPUT«OH HAI» | ||
dalek | c: 12121ef | jimmy++ | lib/objects.pod: fixed typo. |
09:54 | |
arnsholt starts reading up on S26 | 10:02 | ||
10:09
sftp left
10:13
u_u joined
10:16
GlitchMr left
10:20
xinming left,
xinming joined
10:29
brrt left
10:31
brrt joined,
spider-mario joined
10:33
brrt left
10:36
M_o_C joined
10:43
SamuraiJack left
|
|||
masak | hehe. the 'λx.M N' abbreviation associates to the left ('(λx.M) N'), but the 'λxyz.N' abbreviation associates to the right ('λx(λy(λz.N))'). | 10:43 | |
er, sorry. 'λx.(λy.(λz.N))' | 10:44 | ||
shachaf | λxyz.N isn't really "associating" | 10:45 | |
masak | but left-associations translate into for loops, and right-associations translate into reverse for loops. the body of the for loop does a new 'make' with $/.ast somewhere inside its new argument. | 10:46 | |
shachaf: oh? | |||
shachaf | Oh, you weren't done. | ||
masak | shachaf: there's a variable and an expression. two things. it associates. | ||
shachaf | What would it mean for it to associate to the left? | ||
masak | ...heh. | 10:47 | |
arnsholt | shachaf: For some operators, whether you go from right to left or left to right matters | 10:48 | |
masak | yeah, I guess there's something else going on here than associativity. | ||
but it felt just like associativity. strange. | |||
moritz | it's a bit like with multiple prefix operators | 10:49 | |
shachaf | arnsholt: Sure. But there's no operator here, really. | ||
moritz | !+$foo can *only* mean !(+$foo) | ||
because (!+)($foo) doesn't make sense | |||
masak | right. | ||
so it's just a kind of nesting. | |||
moritz | right | ||
shachaf++ | |||
10:50
crab2313 joined
|
|||
masak | this is very clean and makes me happy: github.com/masak/lambda-calculus/c...23ce805cfe | 10:51 | |
moritz | ooh, nice use of make and $/.ast to avoid a variable to hold the intermediate AST | ||
masak | hm, which is nicer, 'reverse $<variable>[0..*-2]', or '$<variable>[reverse 0..*-2]'? | ||
moritz: yeah, that's what I meant above. | 10:52 | ||
10:52
spider-mario left
|
|||
moritz | the first | 10:52 | |
dalek | kudo/inliner: 25d7c81 | jnthn++ | src/Perl6/Optimizer.pm: A further allomorphy tweak, fixing one more test that the inliner regressed. |
||
masak | why? | ||
kudo/inliner: 72075f2 | jnthn++ | src/Perl6/Actions.pm: Don't consider things that use pseudo-packages to be inlinable. |
|||
moritz | it has the advantage of working | ||
masak | huh? | ||
oh! | |||
moritz | 0..*-2 is a WhateverCode | ||
masak | right. | ||
sometimes I have too high expectations on * | |||
shachaf | Hah, "Lambda/Calculus.pm" | 10:53 | |
jnthn | .oO( When you wish up on a *... ) |
||
moritz | well, it does do many things right intuitively | ||
masak: in fact, (0..^*-2).reverse works | |||
masak | 'course, I could go '$<variable>[*-2 ... 0]' ;) | ||
or, hm. | 10:54 | ||
moritz | I don't think you can | ||
masak | no. | ||
moritz | because the series is evaluated first | ||
masak | rn: my @a = <a b c d e f g>; .say for @a[*-2 ... 0] | ||
p6eval | rakudo 1f662c: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in block at /tmp/M0eDqs6Y7Y:1» | ||
..niecza v19-15-g051783d: OUTPUT«Unhandled exception: Need more items on the LHS at /home/p6eval/niecza/lib/CORE.setting line 1414 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3147 (get-next-closure @ 11)  at /home/p6eval/niecza/lib/CORE.setting line 3191 (ANON @ 17)  a… | |||
masak | right. | ||
the series grabs the whatevs. | |||
10:55
bluescreen10 left,
whiteknight joined
10:56
whiteknight is now known as Guest54824
|
|||
dalek | c: 4d4236e | moritz++ | lib/objects.pod: [objects] roles, role application |
10:57 | |
moritz | jnthn: in your talks on roles, do you have a better example than DrunkenGymnast for role conflicts? | 10:58 | |
moritz would like to steal one :-) | |||
masak | what? clearly, that's the best example possible! :P | 10:59 | |
here's one: role VScrollable { method scroll($dy) { ... } }; role HScrollable { method scroll($dx) { ... } }; class MyWindow does VScrollable does HScrollable {} | 11:01 | ||
jnthn | moritz: I recall doing one where it was about booking a train ticket, and there was a $.line (as in, which railway line) but it conflicting with a $.line related to "line on the invoice" | 11:02 | |
11:02
JimmyZ_ left
|
|||
moritz | masak: hm, nice | 11:06 | |
11:06
GlitchMr joined
11:07
bluescreen10 joined
11:11
JimmyZ joined
11:30
crab2313 left
|
|||
GlitchMr | perl6: printf '% %' | 11:34 | |
p6eval | rakudo 1f662c: OUTPUT«'%' is not a valid sprintf format in sub sprintf at src/gen/CORE.setting:2079 in sub printf at src/gen/CORE.setting:2084 in block at /tmp/jZhTBBbewa:1» | ||
..niecza v19-15-g051783d: OUTPUT«Unhandled exception: invalid format specifier at /home/p6eval/niecza/lib/CORE.setting line 1286 (sprintf @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 1287 (printf @ 5)  at /tmp/RNA187pMhC line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE… | |||
11:35
gongyiliao joined
|
|||
GlitchMr | But... Perl 6 Synopsis allows things like '% %' | 11:35 | |
I guess it's bug in synopsis | |||
11:37
fgomez left
11:38
birdwindupbird joined
|
|||
dalek | c: 3a0a898 | moritz++ | lib/objects.pod: roles and stubs |
11:41 | |
masak | GlitchMr: yes, I would say so. | 11:43 | |
GlitchMr: though C prints '%' on printf("% %"); | 11:45 | ||
so maybe we should allow it after all. | |||
moritz | perl 5 also prints % | 11:46 | |
11:56
crab2313 joined
12:07
crab2313 left
|
|||
dalek | p: 6589656 | jnthn++ | src/QAST/Operations.nqp: Add a way for ops evaluating to native types to attach that information to nodes. |
12:08 | |
12:08
brrt joined
|
|||
dalek | kudo/inliner: 4a658ee | jnthn++ | src/ (4 files): Fix return type check handling when inlining. |
12:09 | |
kudo/inliner: 57697e2 | jnthn++ | src/Perl6/Actions.pm: Attach return types to nqp::op nodes. |
|||
12:15
MayDaniel joined
12:17
brrt left
12:19
_fall0ut_ joined
12:21
driador left
|
|||
masak | nr: class A { class B {}; method foo { say B.new } }; A.new.foo | 12:43 | |
p6eval | niecza v19-15-g051783d: OUTPUT«B.new(...)» | ||
..rakudo 1f662c: OUTPUT«B.new()» | |||
masak | nr: class A::B { class C {}; method foo { say C.new } }; A::B.new.foo | ||
p6eval | niecza v19-15-g051783d: OUTPUT«C.new(...)» | ||
..rakudo 1f662c: OUTPUT«C.new()» | |||
12:47
M_o_C left
|
|||
masak | folks, Crypt::Game is now called Game::Crypt. and Hanoi::Game is called Game::Hanoi. all tests still pass and all CLIs still run. | 12:48 | |
I believe the code got a little better for it, too. japhb++ | |||
12:49
user joined
|
|||
JimmyZ | masak++ | 12:49 | |
12:50
brrt joined
|
|||
masak | I've received *lots* of good crypt feedback from Keving Coyler, the winner of July's open challenge. | 12:52 | |
I will trawl through it during the weekend, as I find slots of time. | 12:53 | ||
12:58
tokuhiro_ joined
|
|||
dalek | kudo/inliner: 3bfb7a6 | jnthn++ | src/ (4 files): Very minimal implementation of the 'soft' pragma, but enough that we'll be able to use it to make wrap.t happy. |
12:58 | |
masak hugs vim digraphs | 13:04 | ||
dalek | kudo/nom: 5cd3686 | jnthn++ | src/Perl6/Ops.pm: Mark some Perl 6 ops as inlinable. |
13:09 | |
kudo/nom: 958a3ea | jnthn++ | src/ (2 files): We will keep around the QAST tree of inlinable things now, not some string thingy. Bump NQP_REVISION to get improvements needed by the inliner. |
|||
13:09
dalek left,
nodmonkey left
13:10
dalek joined,
ChanServ sets mode: +v dalek,
mberends left
|
|||
moritz | ooh, inliner merged? | 13:10 | |
jnthn | Yeah | 13:11 | |
masak | yay. | ||
jnthn++ | |||
moritz | \o/ | ||
jnthn | It's able to inline more stuff | ||
Also | |||
r: say 2 +< 63 | |||
p6eval | rakudo 1f662c: OUTPUT«0» | ||
jnthn | > say 2 +< 63 | ||
18446744073709551616 | |||
Those kinds of things are mixed. | 13:12 | ||
moritz | \o/ | ||
jnthn | It's less stupid about literal allomorphy, or whatever it's called. :) | ||
s/mixed/fixed/ | |||
oh, dang, I needed to bump NQP_REVISION | 13:13 | ||
moritz | I like to call it stupomorphy :-) | 13:14 | |
13:16
brrt left
13:19
user left
13:22
boni joined
13:24
mberends joined
|
|||
dalek | p: e401db5 | jnthn++ | src/6model/serialization.c: Re-enable re-use of strings on the string heap; it makes a fairly notable difference to the output size of CORE.setting compilation, and a small but certainly worthwhile difference to CORE.setting compilation time. Causes no issues here; hopefully not for anyone else now either. |
13:27 | |
13:29
boni left
|
|||
dalek | kudo/nom: 44cb610 | jnthn++ | tools/build/NQP_REVISION: Get string sharing optimization for faster builds. |
13:31 | |
kudo/nom: 5e1b9a8 | jnthn++ | docs/ChangeLog: ChangeLog updates. |
|||
jnthn | away for a bit | ||
13:34
cognominal_ joined
13:35
leprevost joined
13:37
cognominal left
13:44
cognominal_ left
13:48
awwaiid left
|
|||
JimmyZ | hmm, I didn't get a difference to the output size of CORE.setting compilation | 13:49 | |
sorry, wrong nqp branch | 13:51 | ||
13:53
awwaiid joined
|
|||
GlitchMr | [\+] ^Inf | 13:53 | |
I like Perl 6 :) | 13:54 | ||
masak | :) | ||
GlitchMr | I like how this list is lazy | ||
masak | well, it turns out it's much easier to have infinite lists if they're lazy... :) | 13:55 | |
GlitchMr | > ([\+] ^Inf)[^20] | ||
0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 171 190 | |||
:) | |||
(well, ok, I could just type [\+] ^20, but whatever | |||
masak | the \ was chosen because it makes like a little triangle with the [ | ||
GlitchMr | > 'ł' gt 'z' | 13:59 | |
True | |||
Well, I guess that 'ł' is indeed bigger basing on codepoint | |||
masak | yes. | ||
if you want locale-specific sorting, you have to specify that. | |||
GlitchMr | How? | ||
masak | through some means not specified by the Perl 6 spec. | ||
that sounds like a CPAN module to me. | 14:00 | ||
GlitchMr | > sort 'a' .. 'z', <ą ć ę ł ń ó ś ź ż> | 14:01 | |
a b c d e f g h i j k l m n o p q r s t u v w x y z ó ą ć ę ł ń ś ź ż | |||
This isn't really useful | |||
masak | depends on your use case. | ||
GlitchMr | I was doing it wrong all along | 14:02 | |
I shouldn't use sort with names | |||
masak | well, you should. | ||
just not the default string sort. | 14:03 | ||
GlitchMr | But whatever, it's hard to determine what should be first: > sort 'a' .. 'z', <ą ć ę ł ń ó ś ź ż> | 14:04 | |
oops | |||
sorry for paste | |||
ß or ś for example | |||
What should be first? I've no idea | 14:05 | ||
masak | that's why you need a locale. | ||
mucker | hi ... what does <!before ...> mean ? | ||
GlitchMr | Well, in case of ß or ś those characters belong to different languages | 14:06 | |
masak | r: my $polish-alphabet = 'aąbcćdeęfghijklłmnńoópqrsśtuvwxyzźż'; sub polishly($c) { $polish-alphabet.index($c) }; say ('a' .. 'z', <ą ć ę ł ń ó ś ź ż>).sort(&polishly) | ||
p6eval | rakudo 1f662c: OUTPUT«a ą ć ę ł ń ó ś ź ż b c d e f g h i j k l m n o p q r s t u v w x y z» | ||
masak | \o/ | ||
GlitchMr: yes. they belong to different languages. | |||
JimmyZ | r: say 6.9 / 7.7 | ||
p6eval | rakudo 1f662c: OUTPUT«0.896104» | ||
masak | mucker: it's a zero-width look-ahead. | ||
Timbus | did uh | 14:08 | |
did that actually sort | |||
mucker | i basically want to match any characters before END .. so i'm thinking the regex should look like <!before END <.+>> | ||
masak | oh ye of little faith :) | ||
GlitchMr | <!before > is (?! ) in Perl 5 (if I think correctly) | ||
masak | r: my $polish-alphabet = 'aąbcćdeęfghijklłmnńoópqrsśtuvwxyzźż'; sub polishly($c) { $polish-alphabet.index($c) }; say ('b', 'c', 'a', 'd' .. 'z', <ą ć ę ł ń ó ś ź ż>).sort(&polishly) | ||
p6eval | rakudo 1f662c: OUTPUT«a ą ć ę ł ń ó ś ź ż b c d e f g h i j k l m n o p q r s t u v w x y z» | ||
masak | \o/ | ||
oh, but it still puts the weird chars wrong :/ | 14:09 | ||
Timbus | so they all just come before 'b' | ||
GlitchMr | That sort is weird | ||
masak | no :( | ||
masak can't see immediately what's wrong | |||
r: my $polish-alphabet = 'aąbcćdeęfghijklłmnńoópqrsśtuvwxyzźż'; sub polishly($c) { $polish-alphabet.index($c) }; say ('a' .. 'z', <ą ć ę ł ń ó ś ź ż>)>>.&polishly | 14:10 | ||
p6eval | rakudo 1f662c: OUTPUT«0 2 3 5 6 8 9 10 11 12 13 14 16 17 19 21 22 23 24 26 27 28 29 30 31 32 1 4 7 15 18 20 25 33 34» | ||
masak | that looks... right. | 14:11 | |
GlitchMr | n: my $polish-alphabet = 'aąbcćdeęfghijklłmnńoópqrsśtuvwxyzźż'; sub polishly($c) { $polish-alphabet.index($c) }; say ('b', 'c', 'a', 'd' .. 'z', <ą ć ę ł ń ó ś ź ż>).sort(&polishly) | 14:12 | |
p6eval | niecza v19-15-g051783d: OUTPUT«d e f g h i j k l m n o p q r s t u v w x y z ą ć ę ł ń ó ś ź ż a b c» | ||
GlitchMr | huh? | ||
masak | there's something I'm missing here. | ||
GlitchMr | r: ('b', 'c', 'a', 'd' .. 'z', <ą ć ę ł ń ó ś ź ż>).flat.sort: {'aąbcćdeęfghijklłmnńoópqrsśtuvwxyzźż'.index($_)} | ||
p6eval | rakudo 1f662c: ( no output ) | ||
GlitchMr | r: my $polish-alphabet = 'aąbcćdeęfghijklłmnńoópqrsśtuvwxyzźż'; sub polishly($c) { $polish-alphabet.index($c) }; say ('b', 'c', 'a', 'd' .. 'z', <ą ć ę ł ń ó ś ź ż>).flat.sort(&polishly) | 14:13 | |
p6eval | rakudo 1f662c: OUTPUT«a ą b c ć d e ę f g h i j k l ł m n ń o ó p q r s ś t u v w x y z ź ż» | ||
masak | GlitchMr++ | ||
yeah. there was a .flat missing. | |||
I'm surprised it's needed. | |||
GlitchMr | I guess that Rakudo sorted by first character in list for some reason | 14:14 | |
14:14
sneex joined
|
|||
GlitchMr | karma GlitchMr | 14:14 | |
aloha | GlitchMr has karma of 12. | ||
GlitchMr | Good enough I guess :) | 14:15 | |
Timbus | r: say ('b', 'c', 'a', 'd' .. 'z', <ą ć ę ł ń ó ś ź ż>).perl | ||
p6eval | rakudo 1f662c: OUTPUT«("b", "c", "a", "d".."z", ("ą", "ć", "ę", "ł", "ń", "ó", "ś", "ź", "ż"))» | ||
masak | that looks right. | ||
Timbus | just m,aking sure | ||
GlitchMr | It's not Perl 5 where lists are automatically flattened when possible | 14:16 | |
In Perl 5, my %hash = (key => do_something()) always calls do_something in list context | 14:17 | ||
Potentially causing warnings about missing value for key | 14:18 | ||
Usually scalar do_something() or [do_something()] or {do_something()} is what you want | 14:19 | ||
14:23
cognominal joined,
cognominal left,
cognominal joined
14:30
Chillance joined,
tokuhiro_ left
14:31
tokuhiro_ joined
|
|||
GlitchMr | perl6: my hash = <a b c d>; print "%a{}{}[]{}"; | 14:31 | |
p6eval | rakudo 5e1b9a: OUTPUT«===SORRY!===Malformed myat /tmp/gHUsgsPaoi:1» | ||
..niecza v19-15-g051783d: OUTPUT«===SORRY!===Malformed my at /tmp/3SQaGq_ZML line 1:------> my⏏ hash = <a b c d>; print "%a{}{}[]{}";Parse failed» | |||
GlitchMr | perl6: my %hash = <a b c d>; print "%hash{}{}[]{}"; | ||
p6eval | rakudo 5e1b9a: OUTPUT«a b c d» | ||
..niecza v19-15-g051783d: OUTPUT«a bc d» | |||
GlitchMr | std: my %hash = <a b c d>; print "%hash{}{}[]{}"; | 14:32 | |
p6eval | std f43a358: OUTPUT«ok 00:00 42m» | ||
14:32
Chat3354 joined
14:34
Chat3354 left
14:35
tokuhiro_ left
14:39
nwc10 joined
|
|||
nwc10 | what is the 'soft' pragma? | 14:39 | |
jnthn | nwc10: See 2889 on in S06 | 14:41 | |
14:42
sneex left
|
|||
masak | S06:2889 # creates a link in the irclogs | 14:42 | |
nwc10 | thanks | ||
14:42
brrt joined
|
|||
nwc10 | gosh, I think I must have read that at some time, maybe years ago | 14:43 | |
as I remember this phrase: Be aware that this may turn your optimizer into more of a "pessimizer". | |||
is it Christmas yet? :-/ | 14:44 | ||
jnthn | It's *August* :P | 14:45 | |
mucker | is this a right regex <!before END <.+>> ?? | 14:49 | |
before END match anychars | |||
jnthn | That doesn't look like it's doing what you wish. | ||
mucker | :( | 14:50 | |
jnthn | In fact, it really ain't | ||
What's an example of the string you're trying to match? | |||
mucker | "foo bar baz END" ... I want to match "foo bar baz " | 14:51 | |
masak | sounds more like you want to set up a goal. | ||
jnthn | Dunno goal matching is gonna work out too well for this. | 14:52 | |
Maybe... | |||
masak | r: say "foo bar baz END" ~~ / '' ~ 'END' [\w+ % [\s+]] / | ||
p6eval | rakudo 5e1b9a: OUTPUT«Unable to parse , couldn't find final 'END' in any FAILGOAL at src/stage2/QRegex.nqp:862 in regex at /tmp/a1AOYX8xFc:1 in method ACCEPTS at src/gen/CORE.setting:9884 in block at /tmp/a1AOYX8xFc:1» | ||
jnthn | r: say "foo bar baz END" ~ | ||
p6eval | rakudo 5e1b9a: OUTPUT«===SORRY!===Confusedat /tmp/hakFlunXjw:1» | ||
jnthn | argh | ||
masak | r: say "foo bar baz END" ~~ / '' ~ 'END' [<!before END> \w+ % [\s+]] / | ||
p6eval | rakudo 5e1b9a: OUTPUT«Unable to parse , couldn't find final 'END' in any FAILGOAL at src/stage2/QRegex.nqp:862 in regex at /tmp/xQxbJyjH5m:1 in method ACCEPTS at src/gen/CORE.setting:9884 in block at /tmp/xQxbJyjH5m:1» | ||
jnthn | r: say "foo bar baz END" ~~ /.+? <before END>/ | ||
p6eval | rakudo 5e1b9a: OUTPUT«q[foo bar baz ] before => q[]» | ||
jnthn | r: say "foo bar baz END" ~~ /.+? <?before END>/ | 14:53 | |
p6eval | rakudo 5e1b9a: OUTPUT«q[foo bar baz ]» | ||
jnthn | That may be one way | ||
masak | yeah, but it backtracks a lot. :/ | ||
jnthn | Relies on backtracking though. | ||
masak | (forwards) | ||
mucker | Ah ! thnkx was confused about the before's syntax | ||
14:53
nwc10 left
|
|||
jnthn | Curiously, it is declarative. | 14:54 | |
masak | not so curious, I think. | ||
14:54
u_u left
|
|||
jnthn | oh, hmm, maybe anyway | 14:54 | |
But yeah, it ain't so efficient. | |||
masak | in the best case, its contents is just more DFA :) | ||
mucker | also whats the p6 equivalent of [^\d] | 14:55 | |
masak | <-[\d]> | 14:56 | |
jnthn | \D | 14:57 | |
masak | heh. | ||
suggestion for a bot: p5re-to-p6re-bot. | 14:58 | ||
(maybe with a better name) :) | |||
GlitchMr | Hmmm... that sounds interesting | ||
Perhaps I should implement this as part of my IRC bot | |||
masak | good luck :) | 14:59 | |
GlitchMr | Well, if I would parse Perl 5 regexpes first :P. | ||
Regexpes like: /$a)/ could mean anything | |||
masak | I could imagine implementing something like that with someone as a weekend hackathon thing. | 15:00 | |
GlitchMr | I mean, Perl is already too clever for its good when it sees any variables in RegExp | 15:03 | |
/$length[2345]/ | |||
^ what this does? | |||
And what this does? | 15:04 | ||
/$length[23]/ | |||
masak | the main task of such a bot would not be to get it right each time, but to be informative. | 15:06 | |
GlitchMr | I mean, $length[2345] is variable $length followed by character class [2345] | ||
$length[23] is variable $length[23] | |||
masak | for example, both of the parentheses-to-indices systems in p5 and p6 are statically knowable, but in different ways. | ||
GlitchMr: oh? what's the difference? just the size of the number? | 15:07 | ||
GlitchMr | Yes | ||
masak | what's the rule? | ||
GlitchMr | I've no idea | ||
I read about this in... perldiag | 15:09 | ||
Ambiguous use of %c{%s[...]} resolved to %c%s[...] | |||
15:12
u_u joined
|
|||
GlitchMr | "Interpolation in patterns has several quirks: $| , $( , $) , @+ and @- are not interpolated, and constructs $var[SOMETHING] are voted (by several different estimators) to be either an array element or $var followed by an RE alternative." | 15:12 | |
Voted? | 15:13 | ||
VOTED? | |||
I know about DWIM, but isn't this going too far? | |||
15:14
brrt1 joined
|
|||
masak | wrong channel to be upset about this :) | 15:14 | |
15:15
brrt left
|
|||
GlitchMr | I wonder how it is possible that Perl 5 uses like everything EXCEPT for spaces for DWIM. | 15:16 | |
masak | "Perl 5 users" isn't one coherent group with just one opinion. | 15:17 | |
huf | the solution is simple! let's give : and {/} yet another meaning! | 15:18 | |
GlitchMr | Now I wonder how it is voted :P. | ||
15:18
brrt1 left
15:19
nodmonkey joined
15:23
brrt joined
|
|||
GlitchMr | paste.uk.to/c6569207 | 15:26 | |
Why I have so pointless utilities on my PC... | |||
15:27
MayDaniel left
15:28
cognominal_ joined
15:31
cognominal left,
brrt left
15:34
brrt joined
15:45
brrt left
15:46
SamuraiJack joined
|
|||
birdwindupbird | How can one get AST for some statements? | 15:50 | |
masak | could you provide more of the context in which you're asking this question? | ||
birdwindupbird | Sorry. I am trying to golf why LEAVE phaser do not fire in multi sub. I want to see AST of such sub. I am trying 'perl6 --target=past -e "my $k = 1; $k++". But get 'Method '__dump' not found for invocant of class 'Any'. May be i am doing it wrong way? | 15:54 | |
masak | last I heard, --target=past was never really updated for the nom/6model branches. | 15:57 | |
so it's inaccessible except for perhaps really simple stuff, if that. | |||
birdwindupbird | Ok. May be there are other means to look into AST? | 15:59 | |
16:00
snearch joined
|
|||
masak | no. the feature doesn't seem to be a priority among those who can implement it (jnthn++ and pmichaud++, basically). | 16:00 | |
jnthn | Well, thing is that phasers are (a) declarative and (b) fired by something in perl6.ops. | 16:01 | |
masak | which I somewhat understand. it's not on a critical path. | ||
jnthn | I'm doubtful that even if --target=past worked it would yield too many clues. | ||
r: multi foo() { 1; LEAVE { say 'bai' } }; foo(); | 16:02 | ||
p6eval | rakudo 5e1b9a: ( no output ) | ||
jnthn | r: multi foo(:$x) { 1; LEAVE { say 'bai' } }; foo(); | ||
p6eval | rakudo 5e1b9a: ( no output ) | ||
16:02
MayDaniel joined
|
|||
jnthn | r: multi foo(:$x) { 1; ENTER { say 'hi' } }; foo(); | 16:02 | |
p6eval | rakudo 5e1b9a: OUTPUT«hi» | ||
masak | submitted on 2012-06-07 by moritz++: rt.perl.org/rt3/Ticket/Display.html?id=113548 | 16:03 | |
birdwindupbird | jnthn: Thanks. I am just trying to find my way into improvement of perl6. My steps seem incompetent and naive, i know. :) | 16:05 | |
masak | birdwindupbird++ | 16:06 | |
birdwindupbird | First "plus-plus". It's so inspiring... | 16:07 | |
GlitchMr | karma birdwindupbird | 16:08 | |
aloha | birdwindupbird has karma of 1. | ||
jnthn | Yeah, I've little idea why we've problems with LEAVE phasers (I guess UNDO and KEEP also) in multis...it's a curious bug. | ||
I wonder if it's anything to do with the callframe re-use that happens in enter_multi_dispatch op. | 16:09 | ||
16:09
gongyiliao left
16:10
MayDaniel left
|
|||
dalek | p/toqast: 2637cf1 | jnthn++ | src/NQPQ/World.pm: Create scopes as QAST::Block. |
16:22 | |
p/toqast: 8ef56a3 | jnthn++ | src/NQPQ/Actions.pm: Update a couple other block creations to use QAST. |
|||
p/toqast: 18cec82 | jnthn++ | src/NQPQ/ (2 files): Update comp_unit to start using QAST::CompUnit, and tackle some of the other bits of comp_unit updating. |
|||
p/toqast: d579e84 | jnthn++ | src/NQPQ/World.pm: Update compile-time binding of lexicals. |
16:23 | ||
p/toqast: a05823a | jnthn++ | src/NQPQ/Actions.pm: Pull in CTXSAVE override (will update the default one in HLL::Actions after QAST migration). |
|||
16:23
bluescreen10 left
|
|||
16:23
birdwindupbird left
16:25
xinming left
16:27
xinming joined,
mucker left
|
|||
dalek | p/toqast: 476dd8e | jnthn++ | src/NQPQ/Actions.pm: Correct :hll copy-pasto. |
16:28 | |
p/toqast: 8440713 | jnthn++ | src/NQPQ/Actions.pm: Update argument list processing for QAST. |
|||
p/toqast: 10f4753 | jnthn++ | src/NQPQ/Actions.pm: Update numeric literal handling. Now with no setting/regex lib loading, nqp::say(42) works. |
|||
16:39
SamuraiJack left
16:46
benabik left
16:57
phenny left,
phenny joined,
cognominal_ left
17:07
cognominal joined
17:11
JimmyZ left
|
|||
dalek | p/toqast: b9f1e11 | jnthn++ | src/NQPQ/Actions.pm: Add an EXPR that produces QAST. |
17:11 | |
p/toqast: a5e4e27 | jnthn++ | src/NQPQ/Grammar.pm: Update most of the operators to use :op instead of :pirop/:pasttype. |
|||
p/toqast: c945388 | jnthn++ | src/NQPQ/Actions.pm: Couple of fixes so if/unless now work again. |
|||
p/toqast: cd9fe1d | jnthn++ | src/QAST/Operations.nqp: Add an nqp::isfalse to go with nqp::istrue; NQP wants it. |
|||
p/toqast: 375dfd0 | jnthn++ | src/NQPQ/ (2 files): Get setting/module loading to work again. |
|||
p/toqast: 753dc29 | jnthn++ | src/NQPQ/Actions.pm: Get strings working. With this, we pass a few of the simple tests in t/nqp again. |
|||
17:27
u_u left
17:41
cognominal_ joined
17:43
cognominal left
17:59
jaldhar left,
jaldhar joined
18:13
leprevost left,
jaldhar left
18:15
thou joined,
jaldhar joined
|
|||
moritz | nr: say (\1).WHAT | 18:15 | |
p6eval | rakudo 5e1b9a, niecza v19-15-g051783d: OUTPUT«Capture()» | ||
moritz | nr: say (\"foo").uc | ||
p6eval | rakudo 5e1b9a: OUTPUT«No such method 'uc' for invocant of type 'Capture' in block at /tmp/rZ0YnP39Td:1» | ||
..niecza v19-15-g051783d: OUTPUT«Unhandled exception: Unable to resolve method uc in type Capture at /tmp/zGzqinNY8A line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3930 (module-CORE @ 564)  at /home… | |||
moritz | nr: say Capture ~~ Positional | 18:17 | |
p6eval | rakudo 5e1b9a: OUTPUT«False» | ||
..niecza v19-15-g051783d: OUTPUT«True» | |||
moritz | nr: say Capture ~~ Associative | ||
p6eval | rakudo 5e1b9a: OUTPUT«False» | ||
..niecza v19-15-g051783d: OUTPUT«True» | |||
moritz agrees with niecza here | |||
pmichaud, jnthn: is there a good reason that Capture is neither Positional nor Associative in Rakudo? | |||
it implements at_pos and at_key | 18:18 | ||
nr: say (\(1, a => 2)).list.perl | 18:19 | ||
p6eval | rakudo 5e1b9a: OUTPUT«(1,).list» | ||
..niecza v19-15-g051783d: OUTPUT«(1, ).list» | |||
moritz | nr: say (\(1, a => 2)).hash.perl | ||
p6eval | rakudo 5e1b9a: OUTPUT«EnumMap.new("a", 2, )» | ||
..niecza v19-15-g051783d: OUTPUT«{"a" => 2}.hash» | |||
masak | yeah, I agree with Niecza too. | ||
just as Match is Positional & Associative | 18:20 | ||
moritz | nr: say Match ~~ Associative | ||
p6eval | rakudo 5e1b9a: OUTPUT«False» | ||
..niecza v19-15-g051783d: OUTPUT«True» | |||
moritz | :-) | ||
18:22
cj left
18:23
cj joined
|
|||
moritz | nr: say (\ a => 1).perl | 18:23 | |
p6eval | niecza v19-15-g051783d: OUTPUT«"a" => 1» | ||
..rakudo 5e1b9a: OUTPUT«===SORRY!===You can't backslash that at line 2, near " a => 1).p"» | |||
18:24
cognominal_ left
|
|||
masak | r: my $q = quasi { {{{$a}}} } | 18:25 | |
p6eval | rakudo 5e1b9a: OUTPUT«===SORRY!===Variable $a is not declaredat /tmp/ly_Tyc8lal:1» | ||
masak | r: my $a; my $q = quasi { {{{$a}}} } | 18:26 | |
p6eval | rakudo 5e1b9a: ( no output ) | ||
masak | hm. that probably should compile but not run. | ||
r: my $a; my $q = quasi { {{{$a}}} }; say $q.^name | |||
18:26
u_u joined
|
|||
p6eval | rakudo 5e1b9a: OUTPUT«AST» | 18:26 | |
18:26
mikemol left
|
|||
moritz | r: my $a; my $q = quasi { {{{$a}}} }; say $q.perl | 18:27 | |
p6eval | rakudo 5e1b9a: OUTPUT«AST.new()» | ||
18:28
mikemol joined
|
|||
moritz | ok, here's a weirdness | 18:28 | |
capture literals are made with \ | |||
s/capture/Capture/ | |||
and then there are Parcel and Capture parameters | 18:29 | ||
and they use | and \ | |||
but it's the | that makes the Capture | |||
isn't that... totally confusing? | |||
masak | yes. | 18:31 | |
I've never thought about that before. | |||
moritz | I realize that there's an analogy to | on the caller side | 18:32 | |
f(|$c) interpolates whatever is in |$c in the argument list | |||
and sub f(|$c) { } puts whatever comes in into $c | |||
nr: say (\(1, a => 2)).elems | 18:38 | ||
p6eval | rakudo 5e1b9a, niecza v19-15-g051783d: OUTPUT«1» | ||
moritz | erm, what? | ||
why does it count only positional elems? | |||
dalek | c: 447afc8 | moritz++ | lib/Capture.pod: document Capture |
18:39 | |
masak | moritz: because that's what the list nature does? | 18:40 | |
18:40
Guest54824 left
|
|||
TimToady | because it's a Capture, not a Parcel | 18:40 | |
Capture is after named args have been pulled out separately | 18:41 | ||
jnthn | I suspect Capture not doing Positional and Associative is an accident. | 18:42 | |
masak | I have a question about unquotes. do they run ASAP on surrounding block entry, or ALAP when evaluating the quasiquote? | ||
masak guesses ALAP | |||
...in resonance with how qq strings work. | |||
TimToady | I'd think ALAP would be more useful | 18:43 | |
masak | yeah. | ||
that's probably what people expect. | |||
I mean, you might want to synthetically create more ASTs in the macro body. | |||
and then unquote them. | |||
jnthn expects ALAP too | 18:44 | ||
moritz | nr: say (\(1, 2, b => 3)).hash | ||
p6eval | niecza v19-15-g051783d: OUTPUT«{"b" => 3}» | ||
..rakudo 5e1b9a: OUTPUT«EnumMap.new("b", 3, )» | |||
moritz doesn't understand "Capture is after named args have been pulled out separately" | |||
the named args are still in the Capture, no? | |||
TimToady | but they are no longer part of masak's "list nature" | 18:45 | |
moritz | so far I've thought of Hash.elems and List.elems in equal terms | 18:47 | |
18:47
cognominal joined
|
|||
moritz | but I guess one could say that Hash.elems coerces the hash to list and then obtains the number of elements, at least notionally | 18:48 | |
tadzik | \o/ | ||
TimToady | nr: 'foobar' ~~ /(...) $<bar>=[...]/; say $/.elems | ||
p6eval | rakudo 5e1b9a, niecza v19-15-g051783d: OUTPUT«1» | ||
TimToady | same deal | ||
moritz nods | 18:49 | ||
masak | tadzik: \o/ | ||
moritz | \o tadzik | ||
masak | so. ALAP. | 18:50 | |
18:50
GlitchMr left
|
|||
masak | next question: on which hook, conceptually, is the code that does the unquote AST stiching-in hung? | 18:50 | |
at parse time there's static quasis. but the thing that gets returned from a macro or assigned to a variable is an incarnated quasi. | 18:51 | ||
on which hook does the code hang that incarnates a static quasi? | 18:52 | ||
hm. I guess it's just a question of code generation, actually. | 18:53 | ||
jnthn | Isn't it just when we hit the place wher the quasi is in the code? | ||
18:53
p6rd left
|
|||
masak | indeed. | 18:53 | |
moritz | just like with strings with interpolation, no? | 18:54 | |
masak | yes, just so. | ||
masak goes to find the piece of code that generates quasis today | |||
moritz | ok, making Capture does Positional does Associative causes some spectest fallout | ||
perlpunks.de/paste/show/501d701b.584.228 | 18:55 | ||
t/spec/integration/error-reporting.rakudo seems to be caused by the inliner, not by that patch | |||
hash.t and splicte.rakudo hung | 18:56 | ||
huh | 19:02 | ||
make t/spec/S32-array/splice.t say "Non-zero wait status: 11" | 19:03 | ||
./perl6 -Ilib t/spec/S32-array/splice.rakudo; echo $? | |||
0 | |||
masak | r: macro foo { my $a = {}; quasi { say $a.WHICH } }; foo; foo | 19:04 | |
p6eval | rakudo 5e1b9a: OUTPUT«Hash|-1115445535Hash|-1108920089» | ||
moritz | r: say Match.^mro | ||
p6eval | rakudo 5e1b9a: OUTPUT«Match() Capture() Cool() Any() Mu()» | ||
moritz | ah, and the hang in t/spec/S02-types/hash.t is for using a Match object as a hash index | ||
which tries to slice because it's a Positional | 19:05 | ||
and then loops, because the iteration still returns Match | |||
19:05
fgomez joined
|
|||
moritz | might be solved with special-casing | 19:06 | |
r: say 1;  +Any | 19:07 | ||
p6eval | rakudo 5e1b9a: OUTPUT«1use of uninitialized value of type Any in numeric context in block at /tmp/epqfuAfH1b:1» | ||
masak | yeah. the unquote stitching code should go here: github.com/rakudo/rakudo/blob/nom/...AST.pm#L11 | ||
moritz | jnthn: the line number for the warning is wrong; that's rather new, and causes a test failure in error-reporting.t | 19:08 | |
masak | right now all that happens there is that the appropriate context gets set. | ||
moritz | probably needs to generate code that does the unquoting | 19:09 | |
or splicing | |||
or... /me confuses all the terms right now | |||
jnthn | moritz: Hmm...curious. | ||
moritz | jnthn: does the default optimization level inline stuff? | 19:10 | |
jnthn | Yeah | 19:11 | |
But I'm not sure what it'd inline there | |||
masak | moritz: well, there is already code generated to call that method. I think that's all that's needed. | ||
jnthn | Oh... | ||
moritz | jnthn: the prefix:<+>? | ||
jnthn | The + I guess | ||
moritz | jnthn: --optimize=0 fixes the line number | ||
19:11
cognominal left
|
|||
jnthn | --optimize=1 too? | 19:11 | |
moritz | with =1 it's also correct | ||
19:11
cognominal joined
|
|||
jnthn | moritz: Does gist.github.com/3259432 help? | 19:13 | |
19:13
p6rd joined
|
|||
moritz | p6rd exited after 3548m26.170s with "Terminated." | 19:13 | |
masak | amy idea why? | 19:14 | |
moritz | jnthn: will test | ||
masak | any* | ||
jnthn | Given that it was terminated, I blame Arnold Schwarzenegger | 19:15 | |
moritz | masak: it might have leaked memory and exceeded the ulimit | ||
masak: or could be some memory corruption | |||
p6rd: next | |||
p6rd | parrot 2012-08-21, rakudo 2012-08-23, niecza 2012-08-27 | ||
tadzik | oh, I get to release Rakudo during the YAPC | 19:16 | |
jnthn | ooh :) | 19:17 | |
Do it in a lightning talk ;-) | |||
tadzik | tee-hee | ||
well, if you bring your PC... | |||
moritz | jnthn: huh, your patch applied with offset -50 lines, and then it complained "Symbol '$inlined' not predeclared in inline_immediate_block" | ||
19:17
mberends left
|
|||
jnthn | wtf! | 19:17 | |
It was meant to go in inline_call | |||
masak | git... making a mistake? surely not! | 19:18 | |
19:18
mberends joined
|
|||
jnthn | I know...it normally gits everything right. | 19:18 | |
moritz | i applied with patch(1), not git apply | 19:19 | |
but I think I see where it should go | |||
masak | nice to see some other implementation of *anything* saying "It's mainly an architectural change with little visible benefit, but it will be a big improvement in terms of flexibility and modularity inside the compiler.": hackage.haskell.org/trac/ghc/blog/newcg-update | ||
arnsholt | jnthn: Are you sure there's enough time to do spectests and everything during a lightning talk? =) | ||
jnthn | arnsholt: Probably not even on my main dev machine, actually... | ||
arnsholt | Yeah. I might be able to get it done if I do TEST_JOBS=8 on my work machine | 19:20 | |
moritz | I could let you remote into my 24core $work machine :-) | 19:21 | |
but it's windows, and doesn't have a working C compiler :( | |||
jnthn | moritz: "Great, another re-write!" | 19:22 | |
s/moritz/masak/ | |||
arnsholt | Oooooh, I could do it on our work big machine | 19:25 | |
TEST_JOBS=32 >:D | |||
jnthn | o.O | 19:26 | |
arnsholt | What can I say, we do comp.ling. Lots of data is our business =) | ||
masak | jnthn: yeah, can't those Haskell guys just finish one compiler according to spec and *release* the damn thing!? :P | 19:27 | |
moritz | jnthn: your patch fixes the warning line number | ||
arnsholt | jnthn: Don't ask how much memory there is ;) | ||
jnthn | moritz: asbra! I can commit it, unless you already did. | ||
moritz | jnthn: go ahead | ||
masak | arnsholt: TEST_JOBS=32, sure, but t/spec/S32-io/IO-Socket-INET.t will still be the bottleneck :) | 19:28 | |
moritz | arnsholt: 8GB... per core? | ||
arnsholt | moritz: Yeah =) | ||
dalek | kudo/nom: 7e1b380 | jnthn++ | src/Perl6/Optimizer.pm: Don't lose line numbers when inlining; moritz++ for reporting. |
||
jnthn | Hm, this means we inline calls to + :D | 19:29 | |
arnsholt | Oh, and maybe we could just put the bottleneck test first in spectest.data, masak =) | ||
jnthn | r: say 32 * 8 | ||
p6eval | rakudo 5e1b9a: OUTPUT«256» | ||
masak | arnsholt: that might be a good idea anyway... | ||
jnthn | That's bigger than my darn SSD on thi smachine! | ||
tadzik | hehe, same here | 19:30 | |
arnsholt | Well, it's a shared machine. I don't have it all to myself, really =) | ||
moritz can just offer 92GB for 24 cores. Should still be enough for ~30 parallel jobs | |||
easily | |||
19:36
cj left
|
|||
tadzik | masak: Game::Crypt doesn't seem to pass its tests | 19:37 | |
59 modules ok, 49 not ok (108 total) on new rakudo | 19:38 | ||
masak | tadzik: huh. I ran them locally, and they passed... | 19:40 | |
masak runs them again | |||
19:40
benabik joined
|
|||
masak | tadzik: all tests pass here. do I need to update my nom? | 19:41 | |
masak does so | 19:42 | ||
19:45
kaare_ left,
flussence joined
19:48
fgomez left,
fgomez joined
|
|||
masak | tadzik: I now have an up-to-date installed nom. tests still pass. | 19:48 | |
moritz | ==> Testing Game::Crypt | ||
t/crypt.t .. 1/? Could not find symbol '&NoExitThere' | |||
masak | :/ | ||
moritz | masak: do you have local modifications? or local modifications in Adventure::Engine? | 19:49 | |
or unpushed commits? | |||
japhb | Or a pony? | 19:50 | |
masak | no, there's still just the one commit there. | ||
(in the Adventure::Engine repository) | |||
I have X::Adventure::NoExitThere defined at line 143 of Adventure/Engine.pm | 19:51 | ||
I have no idea what would be wrong on your setups. tadzik, moritz, suggestions welcome. | |||
moritz | masak: did you precompile Adventure::Engine? | 19:52 | |
masak | no. | ||
moritz did | |||
masak | if precompilation breaks Adventure::Engine, then that's very bad. | 19:53 | |
moritz | that seems to be exactly what happens | 19:54 | |
removing the .pir files, t/crypt.t runs fine | |||
masak submits rakudobug | 19:55 | ||
moritz | might be an instance of rt.perl.org/rt3/Ticket/Display.html?id=112626 | ||
masak looks | 19:56 | ||
yes, that looks very similar. | 19:58 | ||
20:04
benabik left
|
|||
masak | well, maybe not. | 20:06 | |
that one is about declarations colliding which shouldn't be. | |||
mine is about declarations missing. | |||
of course, the underlying cause could still be the same. | |||
I could golf and submit a separate rakudobug if that's deemed worthwhile. | 20:07 | ||
or golf and add to #112626 | |||
g'ah! it's 2012, and precompilation breaks my modules in Rakudo. :( | 20:10 | ||
20:11
MayDaniel joined
20:12
birdwindupbird joined
|
|||
jnthn | masak: We didn't *have* the serialization bit of precompilation until 2012. | 20:13 | |
And we all know how many people clamber to fix the issues in that area. | 20:14 | ||
masak | ...not many? just a guess. | 20:16 | |
jnthn suspects the number of people who comitted to serialization.c is somewhere around 1. :) | 20:17 | ||
masak | jnthn: sorry about the overt frustration. I just want Perl 6 to be a reliable platform to build software on. | ||
if these breakages happened in 2008, I wouldn't bat an eyelash. | 20:18 | ||
jnthn | Then try to find ways to increase the bus number in areas where it's too low to have enough people to get to "reliable" as quickly as you'd like. | 20:19 | |
20:20
awwaiid left
|
|||
masak | yeah. | 20:20 | |
20:20
awwaiid joined,
benabik joined
20:23
nwc10 joined
|
|||
nwc10 | jnthn++ # nom now uses only 56% of the RAM that the last release needed to compile the setting (on "my" machine) | 20:23 | |
at this rate it will be using negative RAM by about October | 20:24 | ||
jnthn | Uh...I'm not sure extrapolation works like that, but awesome :) | 20:25 | |
awwaiid uses the negative-ram to open up some faster-than-light time travel and goes back in time to now to by himself another coffee | 20:26 | ||
jnthn++ # thanks for the coffee | 20:27 | ||
jnthn | \o/ | ||
nwc10: That's...quite a big drop. | |||
nwc10 | yes. I wonder if my measurement is duff for some reason. | ||
jnthn | The ChangeLog quotes a value around 35% | ||
flussence | I came to ask a stupid question, but I ended up fixing it by making my code nicer... | 20:28 | |
nwc10 | oh, that was a drop from the last release all the way to HEAD | ||
dalek | p/toqast: 729ce4d | jnthn++ | src/NQPQ/Actions.pm: Fix lexical variables. |
||
p/toqast: c115641 | jnthn++ | src/NQPQ/Actions.pm: Fix empty blocks. |
|||
p/toqast: 0758db1 | jnthn++ | src/NQPQ/Grammar.pm: Spell defor correctly. |
|||
p/toqast: 50bd8cc | jnthn++ | src/NQPQ/Actions.pm: Eliminate many uses of viviself. |
|||
p/toqast: bfd58e5 | jnthn++ | src/NQPQ/ (2 files): A bunch more PAST::Var => QAST::Var, fixing simple sub declarations along the way. |
|||
nwc10 | but top says | 20:29 | |
Mem: 2881M Active, 2534M Inact, 586M Wired, 100M Cache, 399M Buf, 1814M Free | |||
so it's not swapping | |||
jnthn | Nice | ||
Well, the string de-dupe thing I did today could easily have helped. | |||
nwc10 | OK, to be fair that's top when I'm not running it - let me log in twice | ||
20:30
xinming left
20:33
snearch left
|
|||
nwc10 | This is while running: | 20:34 | |
96290 nicholas 1 118 0 905M 835M CPU0 0 5:18 100.00% perl6 | |||
size just peaked at 10055M before it exited | 20:35 | ||
er, 1005M | |||
TimToady | whew | ||
jnthn | ! | ||
nwc10 | so it's under a Gb now on (at least one) x86_64 FreeBSD machine | ||
jnthn | I don't think we've ever needed 10055M :) | ||
nwc10 | maybe on a system with 512 bit pointers | 20:36 | |
actually, only 256 bit pointers for the most recent release | |||
sorear | good * #perl6 | 20:38 | |
nwc10 | it seems to be a very good * today | ||
tadzik | good star sorear | ||
jnthn hopes we can shave some more off yet :) | 20:39 | ||
o/ sorear | |||
nwc10 | me too. but you have to hit diminishing returns at some point, don't you? :-( | ||
jnthn | Yeah | 20:41 | |
masak | sorear! \o/ | ||
nwc10 hopes someone else can check his figures aren't insanely wrong | 20:42 | ||
dalek | p/toqast: b1a033c | jnthn++ | src/NQPQ/Actions.pm: Eliminate multitype usage. |
20:45 | |
p/toqast: 8f9d295 | jnthn++ | src/NQPQ/Actions.pm: Toss hopefully unrequired namespace call. |
|||
p/toqast: 263e374 | jnthn++ | src/NQPQ/World.pm: s/subid/cuid/ |
|||
p/toqast: e8e11ea | jnthn++ | src/NQPQ/World.pm: Fix method setup, which gets basic classes working again. |
|||
flussence | I did stuff: github.com/flussence/perl6-Test-Corpus | 20:47 | |
(so that I could be increasingly lazy writing tests) | 20:48 | ||
masak | flussence: nice! | 20:50 | |
flussence++ | |||
flussence | .oO( now I just need to test it... ) |
20:51 | |
20:52
nwc10 left
|
|||
masak | flussence: IO::Path has a .basename public attribute. | 20:52 | |
flussence: also, I'd write `Callable $test-block` as `&test` if I were you. | 20:54 | ||
tadzik | errr | 20:55 | |
flussence | I'll make the Callable change, but I'm trying to make this work in rakudo+niecza simultaneously and niecza hasn't caught up on IO yet. | ||
tadzik | star: use JSON::Tiny; my $json = "\n [1, 2, 3"; say (from-json $json).perl | ||
p6eval | star 2012.07: OUTPUT«Any» | ||
tadzik | star: use JSON::Tiny; my $json = "[1, 2, 3"; say (from-json $json).perl | 20:56 | |
p6eval | star 2012.07: OUTPUT«Unable to parse array, couldn't find final ']' in any FAILGOAL at src/stage2/QRegex.nqp:831 in regex array at /home/p6eval/star/lib/parrot/4.6.0/languages/perl6/lib/JSON/Tiny/Grammar.pm:8 in regex TOP at /home/p6eval/star/lib/parrot/4.6.0/languages/perl6/lib/J… | ||
tadzik | star: use JSON::Tiny; my $json = "[1, 2, 3]"; say (from-json $json).perl | ||
p6eval | star 2012.07: OUTPUT«[1, 2, 3]» | ||
tadzik | moritz: is that intentional? | ||
as in: leading \n breaks stuffs | |||
dalek | p/toqast: 24fb046 | jnthn++ | src/NQPQ/Actions.pm: Somewhat fix self, attribute access. |
||
flussence | ...and s/&/$/ breaks rakudo too, wtf | 20:57 | |
t/expand.t .. Nominal type check failed for parameter '&func'; expected Callable but got Sub instead # github.com/flussence/Text-Tabs-Wra...t/expand.t | 20:58 | ||
cognominal | jnthn, what is a WVal in QAST? | 20:59 | |
20:59
Chillance left
|
|||
jnthn | World Value | 20:59 | |
As in, something we know at compile time. | |||
20:59
benabik left
|
|||
jnthn | flussence: Did you write something like Sub &foo? | 21:00 | |
flussence | I'm trying to think why I wrote Callable there in the first place... | 21:01 | |
jnthn | Note that Callable &foo is like Callable[Callable] $foo | 21:02 | |
flussence | I guess I could just get rid of the type entirely, the & should be enough | ||
jnthn | Rigth | ||
Having the type *and* & is probably messing it up for you | |||
tadzik | my %old = from-json slurp $old-results; | ||
my %new = from-json slurp $old-results; | |||
it looked so sensemaking... | |||
cognominal | thx jnthn++ | ||
masak | r: say Sub ~~ Callable | 21:03 | |
p6eval | rakudo 7e1b38: OUTPUT«True» | ||
tadzik | i.imgur.com/2lskK.png \o/ | 21:05 | |
that may come in handy | |||
jnthn | tadzik: ooh! | 21:06 | |
tadzik++ | |||
tadzik | it'll be more awesome. Stay tuned :) | 21:07 | |
speaking of which, which feather is a good place to put some resource-heavy operations to be running once in a while? | |||
21:09
birdwindupbird left
|
|||
cognominal | What is the 'soft' pragma? | 21:09 | |
jnthn | cognominal: S06 explains it in some detail | 21:10 | |
cognominal | ha, thx | ||
jnthn | It's about managing the interaction of wrap and inlining. | ||
cognominal | yup, I see that | 21:11 | |
dalek | mentaler: 34e1831 | tadzik++ | difftool: Add difftool for nice results comparing |
21:12 | |
21:14
RobiX joined
21:15
benabik joined
21:26
benabik left
21:32
benabik joined
21:34
cognominal left
21:35
MayDaniel left
21:36
MayDaniel joined
21:53
cognominal joined,
benabik left
|
|||
tadzik | I like how it takes ~5 seconds to install some stuff with panda :) | 21:57 | |
masak beats the big drum faster to hasten the Singularity | 21:59 | ||
21:59
buubot_backup left
|
|||
sorear | o/ masak | 22:03 | |
masak | \o | 22:04 | |
tadzik | masak: I fixed Yapsi build and compiler.t, but there are things beyond my understanding there and in runtime.t | 22:08 | |
(github.com/tadzik/yapsi) | 22:09 | ||
masak | tadzik: oh, ok. thanks for the heads-up. | 22:10 | |
I might have a look tomorrow. | |||
tadzik | okay | ||
jnthn hasn't written a module for quite a while | 22:11 | ||
Maybe I should try my hand at it sometime :) | |||
tadzik | random idea from today: Text::Colors | ||
or ::Colours | |||
something along Term::ANSIColor, but able to produce terminal stuff, maybe also HTML text and so | |||
like a common interface for colo(u)ring text | |||
jnthn | tadzik++ # awareness of correct spelling as well as American spelling of words | 22:12 | |
;-) | |||
tadzik | :) | ||
22:12
MayDaniel left
|
|||
tadzik | that reminds me of one of Tim Minchin's pieces | 22:13 | |
masak | reminds me of guerilla editing of Wikipedia. | 22:14 | |
jnthn | .oO( gorilla editing of Wikipedia ) |
||
masak | secure.wikimedia.org/wikipedia/met..._campaigns | ||
jnthn | oO( use GORILLA_EDITING; ) | ||
masak | the best part of that page? it is categorized both as "Humour" and "Humor" :P | 22:16 | |
tadzik | :D | ||
No such method 'MATCH' for invocant of type 'Integer' | 22:22 | ||
that sounds awful | |||
jnthn | Indeed. :/ | 22:25 | |
How'd you get it? | |||
tadzik | use Grammar::Tracer on Yapsi.pm | 22:26 | |
gone away when I used <?after> instead of a hack that was there | |||
github.com/tadzik/yapsi/blob/bf9cf...psi.pm#L31 here | 22:27 | ||
jnthn | r: say "ab" ~~ /<?{ $/.CURSOR.pos > 0 }> ./ | 22:28 | |
p6eval | rakudo 7e1b38: OUTPUT«q[b]» | ||
22:29
thou left
|
|||
jnthn | oh, but using Grammar::Tracer | 22:29 | |
tadzik | aye | 22:30 | |
22:35
benabik joined
|
|||
masak | tadzik++ # de-hacking Yapsi | 22:37 | |
tadzik | masak: I made it pass all tests and things :) | 22:38 | |
well, almost | 22:39 | ||
masak | tadzik: you rock | ||
tadzik | well, almost | ||
I finally stumbled upon something that looks like being not a change in Perl 6 itself and not a rakudo de-regression :) | 22:40 | ||
yep, all tests pass now | 22:45 | ||
jnthn | Pass all the tests! \o/ | ||
tadzik | REmove all the warnings! | 22:46 | |
(but one) | |||
masak: pull request sent | 22:47 | ||
now I feel like sleeping. Good knight #perl6! | 22:52 | ||
jnthn | 'night, tadzik | 22:53 | |
22:54
LadySainthilaire joined
|
|||
LadySainthilaire | hi | 22:55 | |
22:56
LadySainthilaire left
|
|||
masak | hilairious. | 22:56 | |
23:02
RobiX left,
sftp joined
|
|||
masak | good knight, #perl6. | 23:09 | |
23:09
cognominal left
|
|||
jnthn gets some rest also | 23:11 | ||
23:22
PacoAir left
23:24
cognominal joined
23:35
sivoais joined
23:52
rvchangue joined
|