»ö« 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:01
benabik joined
00:02
gern left
00:05
tyatpi left,
replore joined
00:11
risou_awy is now known as risou
00:16
abercrombie joined
00:29
risou is now known as risou_awy
00:42
ashleydev joined
00:45
whiteknight left
00:54
bacek_at_work joined,
aloha joined
00:55
alvis left
00:58
Sarten-X left,
vlixes`` joined
01:00
vlixes` left
01:02
araujo joined
01:06
Sarten-X joined
01:10
alvis joined
01:28
ponpon joined,
p0nb1k1 joined,
ponbiki left,
ponpon left
01:31
Sarten-X left
01:39
Sarten-X joined
01:48
cognominal_ joined
01:51
cognominal left
01:59
ZapZ_ joined
02:00
wolfman2000 joined
|
|||
colomon | rakudo: my $a; say $a.defined | 02:08 | |
p6eval | rakudo 317f89: OUTPUT«Bool::False» | ||
02:08
masonkramer left
02:12
envi_ joined
|
|||
soh_cah_toa | what is the Cool type for? is that mentioned anywhere in the spec? | 02:20 | |
[Coke] | soh_cah_toa: perlcabal.org/syn/S02.html#The_Cool...d_package) ? | 02:22 | |
soh_cah_toa | [Coke]: great, thanks | 02:23 | |
[Coke] | de nada. | ||
soh_cah_toa | hm, this doesn't really make sense to me :\ | 02:25 | |
[Coke] | best I could find. ;) | 02:27 | |
02:28
packetknife joined
|
|||
jlaire | soh_cah_toa: it's a common super class for all scalar types | 02:28 | |
or something like that | 02:29 | ||
soh_cah_toa | ok | 02:30 | |
colomon | it's sort of the magic perl class... things which are Cool try hard to Do What You Mean | 02:31 | |
when I started with Perl 6, all user classes worked that way too, but then people noticed that meant the simplest class you could create had dozens (hundreds?) of methods on it. | 02:32 | ||
soh_cah_toa | yeah, spec says user-defined classes are not Cool | ||
colomon | so that functionality was filtered out into Cool, and if you want your classes to do all that stuff, you just add "is Cool" to them. :) | ||
soh_cah_toa | yeah | 02:33 | |
colomon | But yeah, it lets you do stuff like... | 02:35 | |
benabik | This class is Cool. | ||
soh_cah_toa | looks like it's most of the p5 builtin functions | ||
benabik | class This is Cool, sorry. | 02:36 | |
colomon | rakudo: say (3524324 + 32222).split(/5/).perl | ||
p6eval | rakudo 317f89: OUTPUT«("3", "", "6", "46").list» | ||
jlaire | std: class This is Cool {} | ||
p6eval | std 8b331d2: OUTPUT«ok 00:01 118m» | ||
colomon | Many (most?) of what you'd think of as string or numeric methods are defined on Cool, so that you can call string methods on numbers, and vice versa. | 02:37 | |
soh_cah_toa | ok | 02:38 | |
and does anyone know of a good blog/article that explains proto subs/regexes? they're not sitting well w/ me just yet | 02:39 | ||
moritz | soh_cah_toa: perlgeek.de/en/article/mutable-gram...for-perl-6 tries | 02:40 | |
colomon | that's proto regexes, not proto subs, right? | 02:41 | |
moritz++ | |||
moritz: up with the wee one? | |||
moritz | aye, proto regexes | ||
colomon: no, up by myself | |||
soh_cah_toa | moritz: in your example, what does the <sym> refer to in the rule definition? | 02:42 | |
moritz | soh_cah_toa: in token sigil:sym<$> { <sym> } | 02:43 | |
soh_cah_toa | yes | ||
moritz | soh_cah_toa: the <sym> is '$' | ||
soh_cah_toa | is 'sym' just a name your chose or can it be anything? | 02:44 | |
like token sigil:foo<%> { <foo> } | |||
moritz | soh_cah_toa: in rakudo, it must be 'sym' | 02:45 | |
soh_cah_toa | ok | ||
moritz | soh_cah_toa: not sure if general Perl 6 permits any identifier | ||
soh_cah_toa | alright, but what about proto subs/methods? they seem to be very different | 02:46 | |
soh_cah_toa is looking at src/core/Cool.pm, btw | |||
colomon | yes, very different | ||
moritz | lemme try | 02:47 | |
colomon | moritz: go for it, I need to get to bed. ;) | ||
o/ | |||
moritz | to the outside, a bunch of multis looks just like single sub or method | ||
colomon: sleep well | |||
and this single sub or method is a 'proto' | |||
so if you take a reference like &foo, that's a reference to the &foo proto | 02:48 | ||
the proto is then responsible for re-dispatching to its multi candidates | |||
and there's a special syntax for redispatch, it's just proto sub foo(signature) {*} | 02:49 | ||
soh_cah_toa | but doesn't every multi sub/method do that even w/o a proto? | ||
moritz | but the proto could do something else, like first modifying its arguments before re-dispatch or so | ||
soh_cah_toa: there are no multis without a proto in perl 6 | |||
soh_cah_toa: for subs the proto is just autogenerated | 02:50 | ||
soh_cah_toa | ah, ok | ||
dalek | ast: 6a6cd4f | Coke++ | S02- (5 files): niecza fudging |
||
soh_cah_toa | alright, consider this: | ||
proto method subst(|$) {*} | 02:51 | ||
multi method subst($matcher, $replacement, *%adverbs) { | |||
self.Stringy.subst($matcher, $replacement, |%adverbs); | |||
} | |||
when, subst() is called, the proto first flattens the args then re-dispatches? | |||
moritz | soh_cah_toa: no, it doesn't flatten the args | ||
soh_cah_toa: in a signature, |$foo means "capture the rest of the argument list in $foo" | |||
soh_cah_toa | isn't that slurpy * though? | 02:52 | |
moritz | and |$ just means "capture the rest of the argument list in an anonymous variable", or phrased differently, "do nothing" | ||
soh_cah_toa: no, the {*} means "redispatch to all the candidates in here" | |||
soh_cah_toa | i meant in a sub signature | ||
moritz | that's not part of the signature, but part of the routine body | ||
soh_cah_toa | sub foo(*@foo) | 02:53 | |
vs | |||
sub foo(|@foo) | |||
i thought | flattens and * slurps | |||
02:53
packetknife left
|
|||
moritz | soh_cah_toa: I think you're confusing a few things here | 02:53 | |
on the call side, foo(|@args) flattens | 02:54 | ||
but in a signature, (|$foo) means "capture the rest" | |||
soh_cah_toa | ah | ||
then what about * in a sub signature? | 02:55 | ||
02:55
tyatpi joined
|
|||
moritz | * slurps | 02:56 | |
but *@foo only slurps positionals | |||
and *%foo only slurps named | 02:57 | ||
|$foo takes 'em all | |||
soh_cah_toa | and *$foo is positionals too? | ||
jlaire | std: sub f(*$) { } | 02:58 | |
p6eval | std 8b331d2: OUTPUT«ok 00:01 120m» | ||
03:00
xinming_ left
|
|||
soh_cah_toa | so like in the example above, is proto sub foo($|) {*} the default autogenerated proto? | 03:01 | |
s/$|/|$/ | |||
moritz | soh_cah_toa: yes | ||
moritz doesn't know what *$foo does | |||
soh_cah_toa | then isn't explicitly specifying a proto method (in Cool.pm, that is) a bit redundant as they don't actually do anything before re-dispatching? on that note, why is subst() even declared a multi in the first place? it only has one definition | 03:02 | |
sorear | good * #perl6 | ||
phenny | sorear: 27 Sep 15:28Z <[Coke]> ask sorear if gist.github.com/1245372 - can I apply that? | ||
sorear: 27 Sep 21:47Z <diakopter> tell sorear I submitted two niecza issues | |||
sorear | diakopter: grammar A is STD { } # fails, because you didn't "use STD", and STD.pm6 isn't in the default PERL6LIB anyway. The latter might be a bug, but the STD API isn't settled | 03:03 | |
diakopter: github sends me email every time someone opens an issue against something that I can commit to. It's kind of annoying. | 03:04 | ||
dalek | ast: 278afd4 | Coke++ | S06- (2 files): niecza fudging |
03:06 | |
sorear | [Coke]: *372 looks fine. | ||
[Coke] | sorear: excellent. am running one last spec test, will get us to over 4400tests. | 03:07 | |
03:07
xinming joined
|
|||
sorear | \o/ | 03:08 | |
[Coke] | All tests successful. | 03:13 | |
Files=175, Tests=4458, 448 wallclock secs ( 1.66 usr 1.07 sys + 771.65 cusr 36.38 csys = 810.76 CPU) | |||
(niecza) | |||
dalek | ecza: 724429c | Coke++ | t/run_spectests: "make spectest" now respects TEST_JOBS |
03:14 | |
ecza: a49e2ba | Coke++ | t/spectest.data: run fudged tests. |
|||
[Coke] | I'm still in the LHF zone, even. | 03:15 | |
sorear | \o/ \o/ | 03:18 | |
TimToady | here's a shell function for niecza: gist.github.com/1246913 :) | 03:23 | |
it's pretty stupid about quotes | |||
but it's good enough for running stty... | 03:24 | ||
sorear ponders | 03:29 | ||
03:29
vlixes`` left
03:34
soh_cah_toa left
03:41
tokuhiro_ left
03:42
molaf joined
03:51
satyavvd joined
04:02
envi_ left
04:06
abercrombie left
04:09
thou joined
04:16
shinobicl_ joined
04:25
daniel-s joined
04:31
woosley joined,
woosley left
04:36
uasi left,
Trashlord left
04:37
Trashlord joined
04:55
uasi joined
|
|||
dalek | ast: f3f35ac | Coke++ | S0 (36 files): niecza fudging |
05:01 | |
[Coke] | I think I'm running out of LHF. ;) | 05:04 | |
running another niecza spectest now. | |||
it was curious to me that a lot of the niecza skips were right next to rakudo "nom regression"s. | 05:09 | ||
wonder if those denote spec changes, perhaps, or if just a coincidence. | |||
05:12
koban` joined
|
|||
sorear | [Coke]: no doubt a combination of tat, and tests that never should have worked in the first place. | 05:14 | |
[Coke]: you may have noticed that post-nom I've had a lot less bad things to say about Rakudo :) | |||
[Coke] | heh. | 05:15 | |
sorear | TimToady: do you think something like that should go into niecza's CORE? | ||
TimToady: the main blocker for a &shell in niecza is me having no idea how to deal with quotes | |||
[Coke] | ARGH, typo, have to rerun the spectest. (SOON) | ||
05:18
shinobicl_ left
05:19
woosley joined
05:22
alim joined
|
|||
[Coke] | All tests successful. | 05:24 | |
Files=219, Tests=5462, 598 wallclock secs ( 2.04 usr 1.37 sys + 969.46 cusr 47.50 csys = 1020.37 CPU) | |||
(niecza) | |||
dalek | ecza: 6689415 | Coke++ | t/spectest.data: run fudged tests |
05:25 | |
sorear | wow! Coke++ | ||
[Coke] | and now zzz. | 05:26 | |
05:30
mberends left
05:36
tokuhiro_ joined,
alim left
|
|||
dalek | ast: c336a95 | moritz++ | S (5 files): rakudo unfudges |
05:39 | |
05:50
wtw joined,
wtw left,
wtw joined
05:54
kaleem joined
06:01
qweqwe joined
06:02
qweqwe_ joined,
qweqwe_ left
06:06
qweqwe left
06:09
orafu left
06:10
thou left
06:11
orafu joined
|
|||
jnthn | o/ | 06:17 | |
moritz | \o | 06:18 | |
nom: my $x = '1}; say "pwnd"; #'; 'a' ~~ /<$x>/ | 06:19 | ||
p6eval | nom 317f89: OUTPUT«pwndpwnd» | ||
moritz | ouch | ||
jnthn | ...ouch. | 06:20 | |
moritz submits rakudobug | 06:23 | ||
so, how is the release going? | |||
sorear | erm | 06:24 | |
what is the bug there? | |||
other than the eskimo | 06:25 | ||
moritz | sorear: the eskimo | ||
sorear | ah | ||
jnthn | Also curious why we see it twice. | ||
moritz | it's supposed to be a runtime error | ||
06:27
lichtkind left
|
|||
sorear | jnthn: the twiceness is correct. You're matching the regex against a string with two indexes | 06:27 | |
The cursor can either be at 0/1 or 1/1, and <$x> has to be tried at both places | |||
and $x could in principle have been modified, so reusing the eval is a matter of optimization | 06:28 | ||
jnthn | ah, makes sense | ||
(no coffee yet today :)) | |||
sorear | I'm about to sleep; I fixated on the correct twiceness and failed to notice the eskimo :D | 06:29 | |
sorear tries to remember what ey was waiting to ask jnthn | |||
jnthn | I'm about to have to commute anyways... | ||
sorear sleep | 06:30 | ||
dalek | ecza/serialize: bdf76de | sorear++ | / (2 files): Type creation proper |
||
06:30
masak` joined
|
|||
masak` | a *regex* injection? | 06:30 | |
whoa. | 06:31 | ||
moritz++ | |||
is that even possible in Perl 5? | |||
jnthn | Achievement! | 06:33 | |
masak` | I think I found the offending line: github.com/rakudo/rakudo/commit/15...523f#L2R37 | 06:34 | |
;) | |||
jnthn | I look at fixing that this evening, if pmichaud++ doesn't beat me to it. | ||
Commute time. | |||
& | |||
masak` | the ingredients of an injection are there: user input, unchecked, going straight into an &eval. | 06:35 | |
by the way, someone seems to have hijacked my nickname on freenode. | 06:36 | ||
is there a procedure for when that happens? | |||
sorear | /msg nickserv ghost masak PASSWORD | 06:41 | |
06:43
masak` is now known as masak
|
|||
masak | sorear: thank you. | 06:43 | |
moritz | masak fwiw I discovered this injection by reading the diffs | 06:44 | |
sorear wonders how the other Masak will take this | 06:45 | ||
sorear sleep for real | |||
dalek | kudo/nom: 038d9ea | moritz++ | src/core/Attribute.pm: nicer Attribute.Str |
06:46 | |
masak | the other masak had already logged out, it seems. | ||
from what I can tell from a simple duckduckgo search, it's someone from Indonesia. | 06:47 | ||
could be a simple misunderstanding. | |||
07:03
ZapZ_ left
|
|||
jnthn | masak: (injection) note though that you're interpolating it as regex syntax | 07:15 | |
masak: So you coulda done '. { say "pwnd" }' as the string | 07:16 | ||
It should be fixed but it's not giving people capabilities they'd not otherwise have. | |||
07:24
alim joined
|
|||
moritz | I'd like to have two regex interpolation syntaxes | 07:27 | |
one for safe interpolation, one for permissive | |||
jnthn | "safe"? | 07:30 | |
moritz | interpolation that doesn't allow code blocks, code assertions, variable definitions etc. | 07:33 | |
nom: say Capture.^attributes | 07:46 | ||
p6eval | nom 038d9e: OUTPUT«$!list $!hash» | ||
moritz | nom: say Match.^attributes | ||
p6eval | nom 038d9e: OUTPUT«$!orig $!from $!to $!CURSOR $!list $!hash» | ||
moritz | is it intentional that .^attributes returns the parent's attributes as well? | ||
nom: class A is Rat { }; say A.^attributes | |||
p6eval | nom 038d9e: OUTPUT«$!numerator $!denominator» | 07:47 | |
moritz | nom: class A is Rat { }; say A.^attributes(:local) | ||
p6eval | nom 038d9e: OUTPUT«» | ||
moritz | nom: say Match.^attributes(:local) | ||
p6eval | nom 038d9e: OUTPUT«$!orig $!from $!to $!CURSOR» | ||
moritz | I guess that answers my question :-) | ||
jnthn | yes, intentional :) | 07:50 | |
07:50
wallberg joined
|
|||
masak | moritz: this safe/powerful dichotomy (or wishes to have same) seems to pop up in ever more places in Perl 6. Pod and command-line handling is another example. | 07:54 | |
except that command-line handling should probably always be safe... | |||
08:07
daxim joined,
xinming_ joined
08:09
wamba joined
08:10
xinming left
08:24
m6locks joined
08:25
dakkar joined
08:26
Bzek joined
08:43
ab5tract joined
08:47
p0nb1k1 left
|
|||
dalek | kudo/nom: 2b6272f | moritz++ | docs/announce/2011.09: [docs] update regression list |
08:49 | |
masak | leave one out, put another one in ;) | 08:51 | |
08:52
ab5tract left
09:02
mj41 joined
|
|||
jnthn just did code review session :) | 09:08 | ||
oops, ww | |||
09:22
Vlavv` joined,
mishin joined,
Vlavv_ left
09:29
envi_ joined
09:31
wallberg left
09:34
tyatpi left,
tyatpi joined
09:36
replore left
09:58
uasi left
10:06
odoacre left
10:10
mj41 left
|
|||
dalek | kudo/nom: b007943 | moritz++ | docs/announce/2011.09: [announce] wording improvements by snarkyboojum++ |
10:16 | |
moritz | nom: class action { method TOP($/) { say $/.WHICH } }; grammar g { token TOP { a } }; say g.parse('a', :actions(action)).WHICH | 10:17 | |
p6eval | nom 2b6272: OUTPUT«7584384075101672» | ||
10:17
woosley left
|
|||
moritz | ah, that's why my attempts to implement to implement $/.ast and make() have been futile | 10:18 | |
10:18
huf left
10:19
huf joined
10:24
tokuhir__ joined
10:26
tokuhiro_ left
|
|||
flussence | I've now got a semi-working Str.indent, but nom seems to have a regex bug that I just can't figure out (github.com/flussence/p6-misc/blob/...ent.pm#L25 - $0 is always blank even though the match succeeds) | 10:31 | |
moritz | nom: given 'a' { when /./ { say $/ } } | 10:32 | |
p6eval | nom 2b6272: OUTPUT«Any()» | ||
flussence | that looks like it... | ||
moritz | flussence: scoping problem, it seems | ||
nom: given 'a' { when /./ { say $/ } | 10:33 | ||
p6eval | nom 2b6272: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 1» | ||
flussence | nom: given 'a' { if /./ { say $/ } } | ||
p6eval | nom 2b6272: OUTPUT«a» | ||
moritz | so work-aroundable | ||
flussence | down to 10/60 failures from 27/60 :D | 10:37 | |
masak | moritz: so they *were* different Match classes? | 10:41 | |
one is nqp, the other one Rakudo? | |||
10:42
frettled joined,
uasi joined
|
|||
moritz | masak: no | 10:43 | |
masak: but the object that the object method sees is a different one than the thing returned to the caller | 10:44 | ||
10:46
mj41 joined
|
|||
masak | ah. | 10:47 | |
tadzik | good mornings | 10:48 | |
masak | that doesn't explain why it didn't find the .ast method. | ||
tadzik: \o | |||
10:55
tyatpi left
|
|||
tadzik | does JSON::Tiny work now? | 10:57 | |
10:57
mj41 left
|
|||
snarkyboojum | tadzik: doesn't seem to | 10:57 | |
jnthn | No protoregexes yet | ||
tadzik | oh, ok | 10:58 | |
flussence | Result: PASS \o/ | ||
(is this code too late to get into 2011.09 somehow?) | 10:59 | ||
jnthn | flussence: which code, ooc? | 11:00 | |
flussence | Str.indent | ||
link to current is in the backlog 30 mins ago | 11:01 | ||
jnthn | Should be harmless to put it in. | 11:02 | |
flussence | yay! | ||
moritz | masak: it didn't find the $!ast attribute; but when I declared it as 'has $.ast is rw' and called the rw method, it set the value | 11:04 | |
masak: but on the wrong object, so it was worthless | 11:05 | ||
jnthn | moritz: Were you doing bindattr? | 11:09 | |
moritz: If so, remember to decontainerize first. | |||
masak | moritz: yes... but why didn't it find the $!ast attribute, if it was the same class? | 11:11 | |
11:11
sftp left,
tokuhir__ left,
sftp joined,
cognominal joined
|
|||
jnthn | masak: That's what I said about decont :) | 11:14 | |
11:14
cognominal_ left
|
|||
jnthn | nqp::bindattr($thing-in-a-container, Class, '$!name') # problem | 11:14 | |
er, scalar container that is. | |||
11:16
pmurias joined
|
|||
masak | nqp::bindattr is nice. just don't tell TheDamian :P | 11:16 | |
11:16
pmurias left
|
|||
jnthn | masak: It'll end up needing a pragma to use at some point, I suspect. | 11:16 | |
masak | nod. | 11:17 | |
11:27
mishin left
|
|||
flussence | std: /\N ** 0..*/ | 11:29 | |
p6eval | std 8b331d2: OUTPUT«ok 00:01 120m» | ||
masak | \N is interesting. | 11:32 | |
11:34
mtk joined,
mtk left
11:35
mtk joined
|
|||
masak | whereas \n in regexes mean '\n or \r or \r\n', \N just means 'neither \n nor \r' | 11:37 | |
note the assymmetry there. | |||
flussence | I see \r\n as the strange case :) | 11:38 | |
11:38
tzhs joined
|
|||
tadzik | t/spec/S19-command-line/dash-e.rakudo - TODO passed: 2-3 | 11:39 | |
Files=495, Tests=16062, 1416 wallclock secs; Result: PASS | |||
flussence | dash-e seems to suffer from a heisenbug | ||
11:40
Patterner left
|
|||
moritz | ah, I see the problem | 11:41 | |
in nqp/src/QRegex/Cursor.nqp, method !reduce | |||
pir::find_method__PPs($actions, $name)($actions, self.MATCH) | |||
if pir::can__IPS($actions, $name); | |||
it calls self.MATCH | |||
11:42
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
moritz | and self.MATCH seems to check if if the cached $!match is an NQPMatch | 11:42 | |
not if it's defined | |||
wait, that's the NQPCurosr.MATCH | 11:43 | ||
jnthn | dash-e consistently fails here | ||
moritz | oh, the Perl 6 Cursor.MATCH never caches match | ||
jnthn: do I need to decontainerize self in ordinary (non-rw) methods? | 11:44 | ||
jnthn | No | 11:46 | |
Pretty sure we bind the decontainerized thing | |||
mls_ | afternoon perl6! | 11:57 | |
jnthn: is the purpose of sink_past to reduce unnecessary cloning? | 11:59 | ||
tadzik | afternoon mls_ | ||
...afternoon already? Man, I got up late | |||
mls_ | It's two oclock here | 12:00 | |
tadzik | yeah, same here | 12:02 | |
12:02
bluescreen10 joined,
frettled_ joined
|
|||
mls_ | so you're really up late ;) | 12:02 | |
jnthn | mls_: Well, it's got more than one use. But in the routine declaration case, yes, it does that. | ||
mls_: Avoids generating unrequired code. | |||
12:03
frettled left
|
|||
jnthn | mls_: In other cases (like /foo/) we'll need it to get things right functionally though. BUT I may just eliminate it in favor of PAST::Want. | 12:03 | |
mls_ | Ah, that was exactly what I was about to ask ;) | ||
jnthn | I was tempted last night but...was too tired. | 12:04 | |
12:07
tokuhiro_ joined
|
|||
zenog | masak: I asked Magnus (the original MediaWiki author) why he wrote it in PHP, and the answer was that he did not know PHP back then, and used the project as an opportunity to learn PHP. | 12:12 | |
masak | zenog: hah! :) | 12:15 | |
12:20
bluescreen10 left
|
|||
ingy | hi moritz | 12:23 | |
12:24
tokuhiro_ left
|
|||
ingy | moritz, TimToady, masak: I settled on <a>* % <b>, <a>+ % <b>, <a>2+ % <b>, <a>42 % <b>, <a>2-4 % <b>, with %% forms of all of those. So very close to p6 % variations, but just a little nicer. :) | 12:27 | |
[Coke] wonders if we should make Larry update the spec tests whenever he changes the spec as a throttle. ;) | 12:28 | ||
ingy | [Coke]: how do we *make* him do it? | ||
ingy volunteers to help muscle TimToady | 12:29 | ||
moritz | nom: role a { has $!a }; class b does a { has $!a } | 12:32 | |
p6eval | nom b00794: OUTPUT«===SORRY!===Attribute '$!a' already exists in the class 'b', but a role also wishes to compose it» | ||
moritz | nom: role a { has $!a }; class b does a { method foo { $!a } } | ||
p6eval | nom b00794: OUTPUT«===SORRY!===Attribute $!a not declared in class b at line 1, near " } }"» | ||
moritz | so if a role has an attribute, I can neither use it in a class that I compose the role into, nor can I declare one on my own | 12:33 | |
that seems LTA to me | |||
masak | agreed. | 12:34 | |
jnthn | Agree but not sure what to do about it. | ||
It's a language design call really. | |||
If we decide what's wanted I can probably work out how to do it. | 12:35 | ||
12:35
bluescreen10 joined
|
|||
moritz | well, either we make attributes private to roles, or we compose them into the class | 12:35 | |
jnthn | In master we didn't try to check attributes at compile time so never ran into this. It just magically worked. | ||
moritz: "private to roles" still involves them being copied into the class. | 12:36 | ||
tadzik | b: role a { has $!a }; class b does a { method foo { $!a }} | ||
p6eval | b 1b7dd1: ( no output ) | ||
tadzik | that's what I'd expect | ||
jnthn | We can do that, it just means that we have to keep track of every attribute used in the class body, and then check them after composition has taken place. | ||
(at the point we parse the usage of $!a, we don't yet know about the one in the role) | 12:37 | ||
colomon | phenny: tell mberends You can get an extra 1000+ tests by turning on the trig tests (except atan2, which isn't fudged for niecza yet). With TEST_JOBS=8, they make "make spectest" take about an additional minute to run on quad-core MBP. | ||
phenny | colomon: I'll pass that on when mberends is around. | ||
jnthn | (since role composition happens at the closing } of the class) | ||
Changing it to do what b does is the easier of the two options. | 12:39 | ||
moritz | I'd be fine with either way | ||
12:42
im2ee joined,
cognominal_ joined
12:45
cognominal left
|
|||
jnthn | Let's see if TimToady++ has any opinions. :) | 12:46 | |
12:46
benabik left
12:48
envi_ left
|
|||
masak | "Perl[ 5]'s compiler is essentially a 3-pass compiler with interleaved phases: A bottom-up pass; A top-down pass; An execution-order pass" | 12:50 | |
masak shudders | |||
jnthn | heh...we do top-down and bottom up in Perl 6, and walking the AST is kinda an execution order pass ;) | 12:53 | |
masak | and they're interleaved o.O | ||
jnthn | ;) | ||
masak | I can't believe I haven't seen it before! Perl 6 is Perl 5! :O | ||
daxim | =:-o | 12:58 | |
masak | next you'll be telling me they were originated by the same person! | 13:02 | |
tadzik puts hand on masak's shoulder | 13:04 | ||
masak | eek! | 13:09 | |
13:10
woosley joined
13:11
Holy_Cow joined
13:12
Holy_Cow left
13:16
tokuhiro_ joined
13:24
alim left
13:26
satyavvd left
13:33
benabik joined
13:40
pmurias joined
13:55
envi_ joined
13:58
sivoais left,
jimmy1980 joined
13:59
jaldhar left,
kaleem left
14:01
sivoais joined,
koban` left
14:04
pmurias left
14:16
wolfman2000 left
14:18
replore_ joined
14:19
replore_ left
|
|||
flussence | aha, I think I've figured out Text-Tabs-Wrap on nom | 14:20 | |
match objects don't implicitly stringify when I call string stuff on them | |||
jnthn | nom: say Match.^methods(:local) | 14:21 | |
p6eval | nom b00794: OUTPUT«prematch postmatch caps chunks gist Str Numeric Bool ACCEPTS orig from to CURSOR» | ||
jnthn | Hm. Str but no Stringy. | ||
flussence | nom: Match ~~ Cool | ||
p6eval | nom b00794: ( no output ) | 14:22 | |
14:22
mishin_ joined
|
|||
flussence | b: Match ~~ Cool | 14:22 | |
p6eval | b 1b7dd1: ( no output ) | ||
flussence | b: say Match ~~ Cool | ||
p6eval | b 1b7dd1: OUTPUT«Bool::True» | ||
flussence | nom: say Match ~~ Cool | ||
p6eval | nom b00794: OUTPUT«Bool::False» | ||
flussence | there it is | ||
jnthn | ah, that's more likely it | ||
felher | I just saw jnthn++'s grammar debugger and the exporthow-thing seems to be rakudo specific, isn't it? Do the specs specify a method to do something like that (yet)? I.e.: would a fully working P6 implementation of todays specs be able to do something like that without requiring hacking on internals? | 14:23 | |
jnthn | felher: There's no spec'd way to do it just yet. The Rakudo way isn't hacking on internals really though, it's just sticking some stuff in a package. | 14:24 | |
felher: I'd like to see something standardized there | |||
But I'm not totally happy with EXPORTHOW as the mechanism just yet. | |||
It's incomplete anyway | |||
14:25
kaleem joined
|
|||
felher | jnthn: k, thanks a lot. Because it took me quite a while to search for a way to do that with pure specified Perl6. :D | 14:25 | |
jnthn | felher: Yeah, I didn't find one, so I had to invent something. :) | ||
felher: Actually it's the same mechanism CORE.setting uses too. | 14:26 | ||
And BOOTSTRAP | |||
im2ee | Hello1 :) | ||
tadzik | hey hey | 14:27 | |
masak | hey hey hey | 14:29 | |
felher | jnthn: nice :). I think i first read about it in your 'a hint of meta programming' post. | ||
'hey' xx 4 | 14:30 | ||
im2ee | :) | 14:31 | |
jnthn | #phasers is in...how long? | 14:35 | |
jnthn makes it just under 3 hours | 14:36 | ||
14:36
sivoais left,
wtw left
14:37
sivoais joined
14:39
jimmy1980 left
|
|||
felher | Speaking of such things as meta-programming and langauge extensions: masak, hows your macro-branch doing? And your HGA? I don't mean to stalk... just too excited about macros... I hope i don't annoy you already? | 14:44 | |
masak | :) | 14:45 | |
you're not annoying me. I'm excited too :) | 14:46 | ||
it's going well. nothing new on the HGA. but I'm well on my way with D1. | |||
meant to push the branch yesterday, but didn't get as far as I wanted before becoming too tired to work. | 14:47 | ||
14:48
thou joined
|
|||
felher | masak++: good to hear that D1 on it's way. I'm eagerly waiting for that branch as i'd really like to play with macros. Especially because macros in P6 are quite a vague term to me. Even after reading the part of the specs about them. :) | 14:51 | |
jnthn | An implementation will probably help devagueify the spec :) | 14:52 | |
felher | yeah, hope so :) | ||
[Coke] | was the grant approved? | 14:53 | |
Or is this pre-emptive? | |||
masak | <masak> nothing new on the HGA. | ||
[Coke] | \o/ (either way) | ||
masak | felher: I'm playing with macros locally, and it's great! | 14:54 | |
felher | masak: i'm sure it is :D | 14:56 | |
moritz | nom: sub f(|$arg) { $arg.elems == 1 ?? $arg[0] !! $arg }; say f(1).WHAT; say f(1, 2).WHAT | ||
p6eval | nom b00794: OUTPUT«Int()Capture()» | ||
jnthn | decommute | 15:03 | |
15:14
wallberg joined
15:18
icwiener joined
|
|||
TimToady | sorear: see for gist.github.com/1246913 now for shell() that uses a bash-c helper to process args shellishly | 15:19 | |
sorear | good * #perl6 | 15:21 | |
15:23
tzhs left,
donri left
|
|||
flussence | today's "wtf am I doing wrong" puzzle: «Not enough positional parameters passed; got 0 but expected between 1 and 5 in sub run-tests at t/sep.t:11», github.com/flussence/Text-Tabs-Wra...er/t/sep.t | 15:24 | |
masak | well, first off, don't trust that line number. | 15:26 | |
flussence | I've learned not to trust the filename so far :) | ||
masak | secondly, the siggie in github.com/flussence/Text-Tabs-Wra...stFiles.pm indeed doesn't match. | 15:27 | |
15:27
bluescreen10 left
|
|||
sorear | well, your call to sub-tests has 0 paramers. | 15:27 | |
you need to make the parameters in TestFiles named. | 15:28 | ||
flussence | oh, whoops | ||
that named param thing's got me before. It worked fine in ng/niecza... | 15:29 | ||
felher | nom: [lcm] (1,2,3) | 15:30 | |
p6eval | nom b00794: ( no output ) | ||
felher | nom: [lcm] (1..3) # know issue? | ||
p6eval | nom b00794: OUTPUT«(timeout)maximum recursion depth exceeded» | ||
felher | s/know/known | 15:31 | |
masak submits rakudobug | 15:32 | ||
15:33
mj41 joined
|
|||
masak | nom: [lcm] 1..3 | 15:33 | |
p6eval | nom b00794: OUTPUT«(timeout)maximum recursion depth exceeded» | ||
felher | same problem for [gcd] | 15:34 | |
nom: [gcd] 1..3 | |||
p6eval | nom b00794: OUTPUT«(timeout)maximum recursion depth exceeded» | ||
15:39
bluescreen10 joined
|
|||
flussence | .oO( I'd prefer a line number, even a wrong one, over just seeing «Use of uninitialized value in string context» over and over... ) |
15:40 | |
15:40
mberends joined
|
|||
mberends | colomon: pre-thanks | 15:41 | |
phenny | mberends: 12:37Z <colomon> tell mberends You can get an extra 1000+ tests by turning on the trig tests (except atan2, which isn't fudged for niecza yet). With TEST_JOBS=8, they make "make spectest" take about an additional minute to run on quad-core MBP. | ||
mberends tries the tests | |||
jnthn home | 15:43 | ||
15:46
cognominal joined
15:48
cognominal_ left
15:51
mberends left,
kfo_ joined
|
|||
masak decommutes | 15:52 | ||
15:52
masak left,
kfo left
|
|||
colomon | #phasers in approx 100 minutes? | 15:53 | |
sorear | #phasers in 96. | ||
flussence: known nieczabug. It's only supposed to work for subs declared 'proto' or explicitly 'only' | 15:54 | ||
niecza: ~Any # flussence | 15:55 | ||
p6eval | niecza v10-8-g6689415: OUTPUT«Use of uninitialized value in string context at /home/p6eval/niecza/lib/CORE.setting line 613 (CORE warn @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 21 (CORE Mu.Str @ 12)  at line 0 (ExitRunloop @ 0)  at /tmp/PW8at5SO7L line 0 (MAIN mainline… | ||
flussence | sorear: it's in nom actually :) | 15:56 | |
sorear | flussence: what do you mean? | ||
nom: ~Any | |||
p6eval | nom b00794: OUTPUT«Use of uninitialized value in string context» | ||
jnthn | that's correct | 15:58 | |
Granted a line number would be nice. | |||
15:59
woosley left
16:00
alester joined
|
|||
moritz | niecza: make 1 | 16:01 | |
p6eval | niecza v10-8-g6689415: OUTPUT«Unhandled exception: System.InvalidCastException: Cannot cast from source type to destination type. at Builtins.Make (Niecza.Frame fr, Niecza.Variable v) [0x00000] in <filename unknown>:0  at MAIN.C0_mainline (Niecza.Frame ) [0x00000] in <filename unkno… | ||
moritz | that error should *really* give a better message | 16:02 | |
niecza: class A { has $.x }; A.x | |||
p6eval | niecza v10-8-g6689415: OUTPUT«Unhandled exception: Attempted to access slot x of type object for A at /tmp/H214Q7ytu4 line 0 (MAIN x @ 0)  at /tmp/H214Q7ytu4 line 1 (MAIN mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C1022_ANON @ 2)  at /home/p6eval/niec… | ||
moritz | niecza: 'a' ~~ /a/; make 3; say $/.ast | 16:03 | |
p6eval | niecza v10-8-g6689415: OUTPUT«3» | ||
moritz | niecza: 'a' ~~ /a/; make 3, 4; say $/.ast | ||
p6eval | niecza v10-8-g6689415: OUTPUT«Unhandled exception: Excess arguments to CORE make, used 1 of 2 positionals at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE make @ 0)  at /tmp/5azAjadfMS line 1 (MAIN mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C1022_AN… | ||
moritz agrees with niecza, and disagrees with the spectests | |||
16:04
mberends joined
|
|||
dalek | ast: cd15146 | moritz++ | S05-grammar/action-stubs.t: remove non-spec tests for &make with multiple arguments |
16:09 | |
kudo/nom: 7411261 | moritz++ | / (4 files): implement Match.ast and &make This involves caching Match objects in Cursor.MATCH, because otherwise the $/ that is passed to an action method is not the same as the one returned from a match, thus $.ast is lost |
16:14 | ||
16:14
cognominal_ joined
16:17
cognominal left
|
|||
moritz | nom: my $x = rx/a/; say 'a' ~~ /<{$x}>/ | 16:18 | |
p6eval | nom b00794: OUTPUT«Null PMC access in find_method('MATCH') in regex <anon> at /tmp/l10YMcmt4C:1 in method ACCEPTS at src/gen/CORE.setting:6178 in <anon> at /tmp/l10YMcmt4C:1 in <anon> at /tmp/l10YMcmt4C:1» | ||
moritz | nom: my $x = rx/a/; say 'a' ~~ /<$x>/ | ||
p6eval | nom b00794: OUTPUT«a» | ||
16:19
risou_awy is now known as risou
|
|||
dalek | kudo/nom: fc90822 | moritz++ | t/spectest.data: run two more regex test files |
16:19 | |
sorear | nom: 1 | 16:22 | |
p6eval | nom b00794: ( no output ) | ||
16:24
MayDaniel joined
|
|||
moritz | [Coke], sorear: t/spec/S05-grammar/action-stubs.t fails just one test on niecza, should be trivial to fudge | 16:27 | |
... and it's interesting to see that the one failing test was added as a regression test for rakudo :-) | 16:28 | ||
(test sharing)++ | |||
16:34
kaleem left
|
|||
sorear | evalbot rebuild rakudo | 16:35 | |
p6eval | OK (started asynchronously) | ||
16:37
cognominal_ left
16:38
cognominal_ joined
16:39
dual left
|
|||
moritz | note that this rebuilds b, not nom | 16:41 | |
evalbot rebuild noexistent | 16:42 | ||
p6eval | OK (started asynchronously) | ||
16:43
kaare_ joined
|
|||
sorear | moritz: I started a nom rebuild and it had no effect, unless it's horribly slow | 16:46 | |
nom: 1 | |||
p6eval | nom b00794: ( no output ) | ||
16:46
dual joined
|
|||
sorear | still on b00 | 16:46 | |
moritz | it *is* slow | 16:48 | |
Failed allocation of 4096 bytes | |||
Parrot VM: PANIC: Out of mem! | |||
sorear | wa? | ||
moritz | what is perl ./poll ? | 16:49 | |
it uses up 619M of virtual memory | 16:50 | ||
sorear | context? | ||
16:50
molaf left
|
|||
moritz | on the evalbot box | 16:50 | |
host04 | |||
16:50
kaleem joined
|
|||
sorear | uhm, wtf. | 16:50 | |
that would be the dalek backend. | |||
it shouldn't be leaking memory *that* fast | 16:51 | ||
moritz | if I kill it, will it respawn? | ||
sorear | no | ||
moritz | so what's a controlled way of restarting it? | ||
sorear | su to sorear, connect to screen, ^a 1, ^C, up, enter | 16:52 | |
which I've just done | |||
moritz | sorear++ | 16:53 | |
nom rebuild runs again, fwiw | |||
sorear | actually I just ran it in a loop to make restarting it easier | ||
sorear wants some kind of heap-profiler for Perl 5 | 16:54 | ||
dalek-poller is supposed to retain the shas of every commit it reports, so that it only reports a commit once, instead of once per minute | 16:55 | ||
apparently it's retaining more than that. | |||
16:56
kaleem left,
DAADXRY joined,
NAAAPL8 joined
16:59
cognominal_ left,
cognominal_ joined
17:02
dakkar left
17:04
Chillance joined
17:08
nightlord joined,
localhost left
17:09
localhost joined
17:11
mberends left
17:17
sivoais left,
sivoais joined
|
|||
moritz | nom: class SVG::Box { }; enum SVG::Plot::AxisPosition <Zero SmallestValue LargestValue>; | 17:17 | |
p6eval | nom fc9082: ( no output ) | ||
moritz | hm | ||
not so easy to reproduce | |||
I get PAST::Compiler can't compile node of type SVG::Plot::AxisPosition | 17:20 | ||
sorear | perl6: "xy" ~~ /<k=.alpha> {make 42} <l=.alpha>/; say $<k>; say $/.ast; say $<l> | 17:25 | |
p6eval | rakudo fc9082: OUTPUT«Cannot access attributes in a type object in sub make at src/gen/CORE.setting:6130 in block <anon> at /tmp/rJOIX0Bkmc:1 in regex <anon> at /tmp/rJOIX0Bkmc:1 in method ACCEPTS at src/gen/CORE.setting:6192 in <anon> at /tmp/rJOIX0Bkmc:1 in <anon> at /tmp/… | ||
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) { unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib'; eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;}'Pugs::Runtime::Match::HsBridge'"*** '<HANDLE>' trapped b… | |||
..niecza v10-8-g6689415: OUTPUT«#<match from(0) to(1) text(x) pos([].list) named({}.hash)>42#<match from(1) to(2) text(y) pos([].list) named({}.hash)>» | |||
sorear | moritz: still seems to be a bit of an issue with &make in nom | ||
17:26
masak joined
|
|||
masak | \o/ | 17:26 | |
sorear | o/ MASAK | ||
moritz | sorear: I don't know if you can call make like that | ||
sorear: or more to the point, I just copied the old implementation, which suffered from the same problem | |||
sorear | S05:896 | ||
also S05:2771 | 17:27 | ||
masak | moritz: I didn't think of it before, but the regex injection is still qualitatively different from code-in-regexes, even if they are similarly powerful. the former is in the hands (potentially) of the user, the latter in the hands of the developer. | ||
dalek | ast: 9e7eee0 | Coke++ | S05-grammar/action-stubs.t: niecza fudging. moritz++ for the hint. |
17:28 | |
sorear | when Perl 6.0 is released, it has to have something like "no re 'eval'" | ||
dalek | ecza: 39d9e6e | Coke++ | t/spectest.data: run fudged test. |
17:29 | |
[Coke] | moritz, sorear: Thanks, fudged. | ||
moritz | niecza: say &make.signature.perl | ||
p6eval | niecza v10-8-g6689415: OUTPUT«Unhandled exception: Unable to resolve method signature in class Sub at /tmp/OEyoT7hTy1 line 1 (MAIN mainline @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2115 (CORE C1022_ANON @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 2116 (CORE module… | ||
moritz | sorear: where is &make defined in niecza? | ||
sorear | I kind of like being able to write IRC bots that accept regexes in untrusted user input | ||
CORE.setting | |||
sub make($x) ... | |||
moritz | and where is Niecza::builtin('make') defined? | 17:30 | |
TimToady | sorear: speaking of injections, did you seem my bash-c helper? | ||
moritz | #phasers time | 17:31 | |
masak | ooh! | 17:32 | |
17:33
mishin_ left
|
|||
sorear | TimToady: Yes I did. I'm afraid I don't understand the two-string / string-array mapping terribly well | 17:33 | |
TimToady | all of the dequoting is done by the helper now, which gets the entire command as a single argument | 17:34 | |
all the magic happens in the eval "$@" | 17:35 | ||
sorear | it's a single argument? | ||
TimToady | windows relies on the app to decode args, alas | ||
17:36
uasi left
|
|||
colomon | moritz: for the record, with the new nom, every time I try ABC I get Null PMC access in find_method('new') | 17:36 | |
TimToady | fortunately, the shell() command relies on the shell to do that, unlike run() | ||
sorear | TimToady: there's some complicated ugly code in the Mono WinAPI emulator which splits Arguments into something suitable for execve | 17:37 | |
jnthn | colomon: Running it with --ll-exception and gisting the backtrace could give me a clue | ||
TimToady | run needs execve, but shell doesn't | 17:38 | |
colomon | jnthn: gist.github.com/1248611 | ||
jnthn | colomon: Oh...are you running it with -n? | 17:39 | |
colomon | jnthn: if I specify the proper include directory, it gets a bit further before dying | ||
jnthn | ok, thanks. | ||
17:40
ab5tract joined
|
|||
sorear | TimToady: wait, are you on windows or *nix? | 17:40 | |
colomon | which makes it sound like that's some sort of "module not found" issue, or perhaps it's reading old versions of the module compiled under a previous rakudo? | ||
TimToady | *nix | 17:42 | |
I am assuming if you say shell, you have a bash available somewhere | |||
sorear | does djgpp/cygwin bash.exe count? | 17:43 | |
TimToady | after all, I'm running stty, which isn't exactly portable either... :) | ||
[Coke] | git llog | 17:44 | |
jnthn | fatal: Not a git repository :) | 17:45 | |
moritz | git: 'llog' is not a git command. See 'git --help'. | ||
:-) | |||
TimToady | and bash.exe is probably fine, if you can get a helper to run it without re-introducing an unwanted level of quoting | 17:46 | |
dalek | kudo/nom: 01d3a6b | duff++ | docs/release_guide.pod: Update release info |
17:47 | |
TimToady | the *nix solution is relying on #!/bin/bash to fire up the bash | ||
17:47
sayu joined
|
|||
TimToady | pity you can't just run 'bash -c' and pass the rest as the other string | 17:47 | |
sorear | looks like older (1998) Perl5 just used libc spawnw() | 17:48 | |
17:48
nightlord left
|
|||
sorear | I like how I have a detached head 13 years in the past and most of the code hasn't moved | 17:49 | |
TimToady | well, 1998 Perl5 wasn't trying to run on the CLI :) | ||
sorear | what? SvPV used to be able to return NULL? | 17:51 | |
17:51
supernovus joined
17:52
daniel-s left
|
|||
dalek | kudo/nom: 2eb6118 | duff++ | docs/release_guide.pod: oops, forgot to remove Riga from the future |
17:52 | |
supernovus | In the newest nom, is there a way to get a dump of a Match object? There used to be $match.perl but now that seems to do the same thing as $match.Str. | ||
moritz | supernovus: nope, it's NYI; but it would be fun to write one (hint, hiint :-) | ||
supernovus | moritz: Ah ha. I need to learn more about Match objects first. I'm trying to find a list of submatches (this is from a grammar parse) in a parent match. I'll dig into the code, maybe I'll come up with a .perl method while I'm at it :-) | 17:54 | |
moritz | supernovus: .caps gives you a list of submatches, ordered by starting position | 17:55 | |
(list of pairs of key => submatch, to be exact) | |||
supernovus | moritz: fantastic, I'll start there :-) | 17:56 | |
moritz | nom: say Match.^attributes | 17:57 | |
p6eval | nom fc9082: OUTPUT«$!orig $!from $!to $!CURSOR $!ast $!list $!hash» | ||
TimToady | moritz: note that, according to S12:2414, .^attributes is supposed to default to :excl, just like .^methods and .^parents are supposed to (and don't yet) | ||
moritz | why .^parents? | 17:59 | |
TimToady | so the user can think of their outermost class as the root | ||
and for consistency, but I see the argument for inconsistency | 18:00 | ||
and it doesn't make much difference for attributes, since Any and Cool don't have any | |||
but I really miss :excl every time someone says .^methods | 18:01 | ||
so I guess one could argue that only .^methods needs the intermediate default | 18:03 | ||
moritz | nom: 'aa' ~~ /<alpha>+/; say $<alpha>.WHAT | 18:04 | |
p6eval | nom 01d3a6: OUTPUT«Parcel()» | ||
moritz | nom: say (1, 2).list.Parcel | ||
p6eval | nom 01d3a6: OUTPUT«1 2» | ||
moritz | nom: say (1, 2).Parcel | ||
p6eval | nom 01d3a6: OUTPUT«Method 'Parcel' not found for invocant of class 'Parcel' in <anon> at /tmp/5dei4bBxt3:1 in <anon> at /tmp/5dei4bBxt3:1» | ||
moritz | nom: say (1, 2).join(', ') | 18:05 | |
p6eval | nom 01d3a6: OUTPUT«1, 2» | ||
moritz | nom: say ("a", "b").perl | ||
p6eval | nom 01d3a6: OUTPUT«("a", "b")» | ||
moritz | nom: say (a => 'b').perl | 18:06 | |
p6eval | nom 01d3a6: OUTPUT«"a" => "b"» | ||
moritz | nom: 'aa' ~~ /<alpha>+/; say $/.hash.WHAT | 18:07 | |
p6eval | nom 01d3a6: OUTPUT«EnumMap()» | ||
moritz | nom: 'aa' ~~ /<alpha>+/; say $/.hash.perl | ||
p6eval | nom 01d3a6: OUTPUT«alpha a a» | ||
moritz | nom: my %h = a => 1; say %h.EnumMap; | 18:08 | |
p6eval | nom 01d3a6: OUTPUT«Method 'EnumMap' not found for invocant of class 'Hash' in <anon> at /tmp/6nHdYQjXh6:1 in <anon> at /tmp/6nHdYQjXh6:1» | ||
18:11
mberends joined
|
|||
supernovus | that's interesting, its parsing a grammar, and the stringified match shows the full match, but any optional captures such as <attributes>* while being parsed, are not included in the caps (and thus $node<attributes> returns nothing...) Am I sensing a spec change or is this just a bug? | 18:12 | |
sorear | ok, it looks like 0aaad0ff was the important commit, and it looks like it may have been related to ithreads? | 18:13 | |
network being spotty now | |||
o/ mberends | |||
moritz | supernovus: what does $<attributes>.elems contain? | ||
supernovus: likely a bug, either in you or in rakudo | |||
mberends | \o sorear, Niecza spectest count is over 7000 with the trig tests added. Shall I commit the extended spectest.data? | 18:14 | |
sorear | TimToady: suppose I'm a Win32 programmer, and I have $filename and $command_tail. What function should I call to do CreateProcess with no reparsing? run($filename, $command_tail) | ||
mberends: why not? | |||
mberends | indeed why not :-) | 18:15 | |
sorear | then go ahead | 18:16 | |
dalek | ecza: 0e35fd0 | mberends++ | t/spectest.data: [t/spectest.data] add trig tests made possible by colomon++ |
18:17 | |
ecza: 85199bf | mberends++ | t/spectest.data: Merge branch 'master' of github.com/sorear/niecza |
|||
18:19
sayu left
|
|||
supernovus | $node<attribute>.elems returns 0 | 18:21 | |
moritz | so it matched zero times | 18:22 | |
supernovus | Yeah, the strange part is, it parses the document... you would think if it didn't match, it would reject the whole thing. | ||
moritz | it's ok for * to match zero repetitions | 18:23 | |
sorear | whee, I think I understand it. | ||
sorear out. | |||
moritz | that doesn't make the match fail | 18:24 | |
supernovus | moritz: but if I try something illegal like <test blah/> it fails, whereas if I put a valid <test name="blah"/> it parses, shows the full string if I stringify $node, but doesn't have the <attribute> sub-match available, even though it must have parsed it... | 18:25 | |
TimToady | sorear, mberends: the why-not would be that $command_tail would not be portable to *nix, if we restrict run to execve semantics | ||
and the point of splitting out shell() was to do that, I thought | 18:26 | ||
so shell("$file $command_tail") is closure to the win semantics | 18:27 | ||
or run needs to accept multiple args, and glue them back together for win | 18:29 | ||
or we define some other function between shell() and run() that does the win file/arg thing | 18:30 | ||
mberends | TimToady: true, I have some C code somewhere to iron out the Win32/*nix wrinkles, not sure how well that would port to C#. I hope I can find it, only half a chance because I'm in away from home for two days. | ||
supernovus | Yeah, if I remove the * from the <attributes> rule, it returns the found attribute (but also makes it so that elements MUST have an attribute.) So for some reason, if you use * on a subrule, it will match the rule, but won't include it in the captures. | ||
masak | wow, 7000 passing Niecza spectests! | 18:35 | |
mberends | masak: like you said, Niecza doesn't feel like it does very much less than Rakudo | 18:36 | |
colomon | mberends: do you know anything about making pixmap graphics work in GTK? | ||
mberends | colomon: yes, a little. I've been reading lots of docs.go-mono.com. I guess Mandelbrot needs to draw individual pixels. I'll take a look for that. | 18:38 | |
colomon | mberends++ # I got far enough to figure out I needed some sort of Pixmap or "cairo surface", but I've got no idea how to hook those up to do anything useful yet. | 18:39 | |
mberends | colomon: niecza/examples/gtk-clock.pl uses a Cairo context | 18:40 | |
18:41
bluescreen10 left
|
|||
moritz | nom: 'aa' ~~ /<alpha>*/; say $/.caps>>.key | 18:41 | |
p6eval | nom 01d3a6: OUTPUT«alpha alpha» | 18:42 | |
supernovus | nom: grammar T { rule TOP { ^ <element> $ }; rule element { '<' <name> <attribute>* '/>' }; rule attribute { <name> '=' '"' <value>? '"' }; token name { <.ident>+ [ ':' <.ident>+ ]? }; token value { <-[\"]>+ }; }; my $m = T.parse('<test this="that"/>'); say $m<element><name>.perl; say $m<element><attribute>.perl; | ||
p6eval | nom 01d3a6: OUTPUT«test()» | ||
supernovus | nom: grammar T { rule TOP { ^ <element> $ }; rule element { '<' <name> <attribute> '/>' }; rule attribute { <name> '=' '"' <value>? '"' }; token name { <.ident>+ [ ':' <.ident>+ ]? }; token value { <-[\"]>+ }; }; my $m = T.parse('<test this="that"/>'); say $m<element><name>.perl; say $m<element><attribute>.perl; | ||
p6eval | nom 01d3a6: OUTPUT«testthis="that"» | ||
supernovus | Bug? Or intentional behaviour? | 18:43 | |
moritz | supernovus: I'll look into it | 18:45 | |
dalek | kudo/nom: 08e1061 | moritz++ | src/core/ (3 files): .perl methods for Match and EnumMap |
||
supernovus | moritz: Thanks, I'm still playing with it over here, to see what I can find. It's been a while since I played with grammars (the last time was porting Exemel::Grammar from alpha to ng) so I'm a bit rusty now :-P | 18:47 | |
18:48
wallberg left
18:51
sivoais left,
sivoais joined
|
|||
supernovus | Interesting, if you change the * to a + it does the same thing (matches, but doesn't include it in the caps). | 18:51 | |
18:52
risou is now known as risou_awy
18:53
risou_awy is now known as risou
|
|||
masak | sounds buggy. | 18:55 | |
18:56
daxim left
|
|||
masak | nom: grammar G { rule TOP { <foo>* }; rule foo { \w } }; say G.parse("aaaaaa") | 18:56 | |
p6eval | nom 01d3a6: OUTPUT«» | ||
masak submits rakudobug | 18:57 | ||
nom: grammar G { rule TOP { <foo>+ }; rule foo { \w } }; say G.parse("aaaaaa") | |||
p6eval | nom 08e106: OUTPUT«» | ||
masak | nom: grammar G { rule TOP { <foo> }; rule foo { \w } }; say G.parse("aaaaaa") | ||
p6eval | nom 08e106: OUTPUT«» | ||
masak | nom: grammar G { rule TOP { <foo> }; rule foo { \w } }; say ?G.parse("aaaaaa") | ||
p6eval | nom 08e106: OUTPUT«Bool::False» | ||
masak | hm. maybe I'm doin' something rong. | ||
mberends | colomon: I get as far as docs.go-mono.com, then Mono Libraries, Cairo, Context Class, Members, then Public Members. There is no method to draw only one pixel. The nearest approximation might be a line from a point to itself, if that is not truncated. | 18:58 | |
masak | what's the best way do do something like <EXPR> (and infixes and prefixes etc) in a user-defined grammar? | 19:00 | |
supernovus | nom: grammar G { rule TOP { <foo> }; rule foo { \w+ } }; say G.parse("aaa"); | ||
p6eval | nom 08e106: OUTPUT«aaa» | ||
masak | huh. | 19:01 | |
supernovus | nom: grammar G { rule TOP { <foo>+ }; rule foo { \w } }; say G.parse("aaa"); # move the + on the other hand... | ||
p6eval | nom 08e106: OUTPUT«» | ||
masak | supernovus: I don't like this. | ||
feels incorrect. | |||
moritz | yep, something with quantified named rules is very off | 19:02 | |
supernovus | masak: that's what I think too... the above should work, and create a submatch called $<foo> which should contain ('a','a','a') | ||
masak | aye. | ||
19:03
birdwindupbird joined,
birdwindupbird left
19:04
Alias_ joined
19:07
MayDaniel left
19:08
Alias left
19:09
mtk left
19:10
mtk joined,
risou is now known as risou_awy
|
|||
colomon | b: grammar G { rule TOP { <foo>+ }; rule foo { \w } }; say G.parse("aaa"); | 19:11 | |
p6eval | b 1b7dd1: OUTPUT«===SORRY!===Confused at line 22, near "\x{2}grammar G"» | ||
colomon | b: grammar G { rule TOP { <foo>+ }; rule foo { \w } }; say G.parse("aaa"); | ||
p6eval | b 1b7dd1: OUTPUT«» | ||
colomon | niecza: grammar G { rule TOP { <foo>+ }; rule foo { \w } }; say G.parse("aaa"); | ||
p6eval | niecza v10-11-g85199bf: OUTPUT«G()» | ||
jnthn | sigspace? | 19:12 | |
perl6: grammar G { rule TOP { <foo>+ }; rule foo { \w } }; say | |||
gah | |||
p6eval | niecza v10-11-g85199bf: OUTPUT«===SORRY!===Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/2kyy8e6KdF line 1 (EOF):------> TOP { <foo>+ }; rule foo { \w } }; say⏏<EOL>Un… | ||
..pugs, rakudo 08e106: OUTPUT«» | |||
jnthn | perl6: grammar G { rule TOP { <foo>+ }; token foo { \w } }; say G.parse("aaa") | ||
p6eval | pugs: OUTPUT«*** No such method in class G: "&parse" at /tmp/j4vhQgZCeN line 1, column 59 - line 2, column 1» | 19:13 | |
..niecza v10-11-g85199bf: OUTPUT«#<match from(0) to(3) text(aaa) pos([].list) named({"foo" => (#<match from(0) to(1) text(a) pos([].list) named({}.hash)>, #<match from(1) to(2) text(a) pos([].list) named({}.hash)>, #<match from(2) to(3) text(a) pos([].list) named({}.hash)>).list.item}.has… | |||
..rakudo 08e106: OUTPUT«aaa» | |||
jnthn | If you do rule, it wants <.ws> | ||
That won't match aa | |||
(e.g. won't match two alphanumerics next to each other) | |||
supernovus | b: grammar T { rule TOP { ^ <element> $ }; rule element { '<' <name> <attribute>* '/>' }; rule attribute { <name> '=' '"' <value>? '"' }; token name { <.ident>+ [ ':' <.ident>+ ]? }; token value { <-[\"]>+ }; }; my $m = T.parse('<test this="that"/>'); say $m<element><name>.perl; say $m<element><attribute>.perl; | 19:14 | |
p6eval | b 1b7dd1: OUTPUT«Match.new( from => 1, orig => "<test this=\"that\"/>", to => 5,)[Match.new( from => 6, orig => "<test this=\"that\"/>", to => 17, named => { value => [ Match.new( from => 12, orig => "<test this=\"that\"/>", to => 16, ), ], na… | ||
supernovus | b: grammar T { rule TOP { ^ <element> $ }; rule element { '<' <name> <attribute>* '/>' }; rule attribute { <name> '=' '"' <value>? '"' }; token name { <.ident>+ [ ':' <.ident>+ ]? }; token value { <-[\"]>+ }; }; my $m = T.parse('<test this="that"/>'); say $m<element><name>.Str; say @($m<element><attribute>).perl; | 19:16 | |
p6eval | b 1b7dd1: OUTPUT«test[Match.new( from => 6, orig => "<test this=\"that\"/>", to => 17, named => { value => [ Match.new( from => 12, orig => "<test this=\"that\"/>", to => 16, ), ], name => Match.new( from => 6, orig => "<test this=\"that\… | ||
19:17
tokuhir__ joined
|
|||
supernovus | uhg, still, but yeah, in ng it returns the matches, unlike in the current nom. | 19:17 | |
err, still ugly that was meant to say... | 19:18 | ||
moritz | supernovus: in b, use $/.pretty if you want something pretty | ||
supernovus: in nom, upgrade to the commit I'm about to push, and simply say $/ | 19:19 | ||
supernovus | moritz++ | ||
dalek | kudo/nom: 21b04a8 | moritz++ | src/core/Match.pm: more informative Match.gist |
||
moritz | supernovus: it doesn't fix the problem with the captures, it just produces something more pretty | ||
supernovus | awesome | 19:20 | |
19:20
tokuhiro_ left
|
|||
supernovus | debugging stuff is always good :-) | 19:20 | |
jnthn | supernovus: Have you tried Grammar::Tracer or Grammar::Debugger? | ||
supernovus | jnthn: not yet, those sound like bloody useful tools, I will add them to my toolkit! :-) | 19:22 | |
gah, I can't wait until panda works again, manually tracking down dependencies makes me feel like I'm back in 1996, running Slackware... | 19:26 | ||
tadzik | :) | 19:27 | |
dalek | kudo/nom: 8d71c8c | moritz++ | src/core/Match.pm: Match.perl needs to be a multi |
19:28 | |
19:30
envi_ left
|
|||
moritz | fwiw, mandelbrot 501x501 takes about 5m12s on current nom, and 37s on niecza | 19:36 | |
(usually I generate 201x201 as a benchmark) | |||
PerlJam | niecza++ | 19:37 | |
moritz | nom: say 312/37 | ||
p6eval | nom 08e106: OUTPUT«8.43243243243243» | ||
PerlJam | (that also gives rakudo a target to shoot for as far as improved performanc. | ||
19:39
thou left
|
|||
jnthn | moritz: Was that on master or optimizer? | 19:40 | |
moritz | jnthn: nom | ||
tadzik | it's funny, because in Polish you sometimes say "nom" if you mean "yep" | 19:41 | |
jnthn | moritz: yeah, by master I menat nom ;) | ||
gah :) | |||
moritz: oh...did you break S02-types/declare.t temporarily? | |||
Looks like that's what the Match.perl should be multi patch woulda fixed | 19:42 | ||
moritz: Also, test 17 consistently fails in S05-grammar/inheritance.t. | 19:44 | ||
[Coke] | (wow, ww ages ago:) git llog does a log for me in local time with nice formatting. | 19:45 | |
im2ee | have to go... Good night! :) | 19:46 | |
tadzik | o/ | ||
jnthn | o/ | ||
im2ee | o/ | ||
19:47
im2ee left
|
|||
dalek | kudo/nom: 47d772a | jnthn++ | src/Perl6/Grammar.pm: Fix segfault when using state variables in mainline. |
19:47 | |
ingy | o/ | 19:49 | |
ingy just implemented % %% and <x>22-33 in Pegex | 19:50 | ||
moritz: you around? | |||
wanna see something cool? | |||
PerlJam | I'd like to see something cool :) | 19:52 | |
tadzik | Int is Cool! | ||
jnthn tags 92192 as testneeded | 19:53 | ||
tadzik | link? I have a tuit in handy | ||
ok, got it | 19:54 | ||
ingy | rule_part: <rule_item>1-2 % /~<WS>(<PERCENT><PERCENT>?)<WS>~/ | ||
is cool | |||
it's the rule from pegex.pgx that parses % and %% and it uses % | 19:55 | ||
it matches <x> or <x> % <y> | 19:56 | ||
1 or two rule items separated by % or %% | |||
cool! :D | |||
<x>0-1 == <x>? | 19:57 | ||
jnthn | tadzik: 99734 too if you like | ||
tadzik: rt.perl.org/rt3/Ticket/Display.html?id=99734 | 19:58 | ||
tadzik | I never know where to put a test :0 | ||
ingy | <x>0+ == <x>* | ||
tadzik | :) | ||
ingy | etc | ||
PerlJam | that is pretty cool. | ||
It's also the first implementation of %/%% I think. (Did TimToady put it in STD yet?) | 19:59 | ||
ingy | well pegex != p6regex... but yeah! | ||
masak | PerlJam: Niecza has %. | 20:00 | |
PerlJam | sorear++ | ||
ingy | sorear++ | ||
PerlJam | (I'm assuming he implmemented it :) | ||
masak | aye :) | ||
ingy | heh | ||
jnthn | tadzik: And if you're really having fun, 99938 also :) | 20:01 | |
ingy | 10e0 Niecza developers... | ||
jnthn | tadzik: And finally, 99942. OK, that's my ticket wrangling for today :) | 20:04 | |
PerlJam | 10e0 Niecza developers sitting on the channel, 10e0 developers sitting on the channel, take one down, pass him around .... then put him back! | ||
dalek | Heuristic branch merge: pushed 35 commits to rakudo/optimizer by jnthn | 20:09 | |
ast: 7425d60 | tadzik++ | S12-methods/method-vs-sub.t: Tests for RT #92192 |
20:12 | ||
ast: a16ea83 | tadzik++ | S06-signature/positional-placeholders.t: Test for RT #99734 |
|||
ast: 99872de | tadzik++ | S04-declarations/state.t: Unskip test for RT #99938 |
|||
ast: 763ffeb | tadzik++ | S03-metaops/reduce.t: Test for RT #99942 |
|||
20:12
mj41 left
|
|||
tadzik | jnthn: ok, now you close those :) | 20:12 | |
jnthn | tadzik: All closed \o/ | 20:15 | |
tadzik++ | |||
tadzik | jnthn++ for the actual closing :) | 20:16 | |
20:22
vlixes joined
|
|||
masak | 'night, #perl6 | 20:25 | |
tadzik | 'night | 20:26 | |
masak | ɔouɐɹqop | 20:27 | |
20:27
masak left
|
|||
jnthn | wait, what?! | 20:28 | |
oh... | |||
Very clever :P | |||
tadzik | ;) | 20:29 | |
diakopter | . | 20:32 | |
20:35
ab5tract left
20:40
djanatyn is now known as sad-djan
20:49
kaare_ left
|
|||
dalek | kudo/optimizer: 9d797f6 | jnthn++ | src/Perl6/Optimizer.pm: Include line numbers to CHECK failure output. |
20:50 | |
20:51
thou joined
20:54
thou left
20:57
leprevost joined
21:08
sad-djan is now known as djanatyn
21:10
ab5tract joined
21:13
LoRe_ is now known as LoRe
21:16
benabik left
21:20
c1sung left,
c1sung joined
21:25
packetknife joined
21:30
ab5tract left
21:31
wamba left
|
|||
[Coke] | mberends: are you fudging atan2, or would you like me to? | 21:32 | |
mberends | [Coke]: please do it, I'm working on more Niecza Gtk stuff | 21:34 | |
[Coke] | 'sfine. I'm on a roll there. | ||
Will work on it after $DAYJOB. | 21:35 | ||
mberends | \o/ | ||
[Coke] | gah. red bull does not give me wings, it gives me HIIIIIICUPS. | 21:36 | |
diakopter | s/wings/runs/ | 21:37 | |
[Coke] | O_o | ||
21:38
cotto left,
p0nb1k1 joined
|
|||
dalek | kudo/optimizer: b2ceda1 | jnthn++ | src/binder/multidispatch.c: Don't need to worry about definedness constraint on candidates that would never match anyway. |
21:39 | |
kudo/optimizer: f80dca3 | jnthn++ | src/Perl6/Actions.pm: Set type on self (just the type of the package we're currently in). |
|||
kudo/optimizer: b7316c1 | jnthn++ | src/Perl6/Optimizer.pm: Don't try to compile-time analyze dispatches involving generic types. |
|||
ecza: ecd62ba | mberends++ | examples/gtk-clock.pl: [examples/gtk-clock.pl] window is resizeable after sorear++ fixed issue #57 |
|||
21:42
p0nb1k1 is now known as ponbiki
21:47
soh_cah_toa joined
21:50
soh_cah_toa_ joined
21:52
soh_cah_toa left
21:53
soh_cah_toa_ is now known as soh_cah_toa
21:58
leprevost left
22:01
cotto joined
22:03
thelazydeveloper joined,
thelazydeveloper left
22:07
mberends left
|
|||
sorear | good * #perl6 | 22:11 | |
diakopter | * | ||
[Coke] | ho, sorear. | ||
22:17
jeffreykegler joined
22:20
jeffreykegler left
22:25
alester left
|
|||
[Coke] | mberends - ah, that's not a normal test file. | 22:31 | |
so, I take it back. too much of a PITA to do at the moment. | 22:32 | ||
22:45
cognominal joined
22:48
cognominal_ left
22:52
whiteknight joined
|
|||
[Coke] | S02-lexical-conventions/begin_end_pod.t - that second test should never be run, yes? | 22:54 | |
tadzik | yes | 22:55 | |
that's the point of the test :) | |||
[Coke] | then I'm changing it to a nok to make it more obvious. | 22:56 | |
sorear | how about changing it to a flunk? | ||
[Coke] | I am not familiar with that test function, but sure. (I assume: fails all the time.) | 22:57 | |
23:10
Chillance left
|
|||
[Coke] | done. | 23:14 | |
dalek | ast: 72da761 | Coke++ | S02-lexical-conventions/ (2 files): make the "don't run this test" tests more obvious |
23:15 | |
23:23
icwiener left
|
|||
dalek | kudo/optimizer: 3d89708 | jnthn++ | src/ (4 files): Very preliminary implementation of inlining chosen multi-dispatch candidates. So far, a routine is an inlining candidate iff it consists of a single statement, made entirely of pirops and its arguments, with strictly one use of each argument. Regresses two test files, which ain't bad given this is the very first shot. |
23:29 | |
tadzik | that looks promising | 23:30 | |
does that inline $a + $b for example? | |||
jnthn | tadzik: If it knows enough about their types, yes. | ||
tadzik: And if that type information lets us resolve the dispatch candidate at compile time. | 23:31 | ||
tadzik | so Int $a = 5; Int $b = 7; $a + $b can possibly inline, or that'd have to be native ints? | ||
jnthn | Here it reports it inlined the + call there. | 23:32 | |
We do have a bit of a problem though :( | |||
A load of multi candidates are marked with :D and :U | |||
This totally hoses inlining. | 23:33 | ||
Anyway, this is a reasonable start. | 23:34 | ||
Hmm...the optimizer seems to be missing analysing some things... :S | 23:36 | ||
oh, curious...something to do with pasttype chain. | 23:41 | ||
oh my, that's cary. | 23:44 | ||
*scary | |||
diakopter | found a bug? | 23:47 | |
jnthn | diakopter: no :) | 23:49 | |
Figured it out, i think. | |||
23:53
ponbiki left
23:55
jaldhar joined
|