»ö« 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. |
|||
colomon | AFK | 00:03 | |
dalek | blets: bb22c7d | (Herbert Breunung)++ | docs/appendix-a-index.txt: repair conj entry |
00:07 | |
00:18
eviltwin_b joined
00:20
wolfman2000 joined
00:21
geekosaur left
00:38
allbery_b joined
00:41
scott_ joined,
eviltwin_b left,
scott_ is now known as Guest29779
|
|||
dalek | blets: e4a5245 | (Herbert Breunung)++ | docs/appendix- (3 files): explain quote protection and add dummy for quasiquoting |
00:42 | |
01:07
eviltwin_b joined
|
|||
dalek | blets: 3ac7047 | (Herbert Breunung)++ | docs/appendix- (3 files): repair the new links and polish quote ops |
01:08 | |
01:10
allbery_b left
01:21
allbery_b joined
01:24
eviltwin_b left
|
|||
dalek | blets: 87c0e37 | (Herbert Breunung)++ | docs/appendix-b-grouped.txt: backlinking mutable types |
01:26 | |
01:26
tokuhirom joined
01:28
skids joined
01:32
replor___ left
01:33
eviltwin_b joined,
Chillance left
01:36
allbery_b left
01:38
rsimoes joined,
rsimoes left
|
|||
dalek | blets: 4285762 | (Herbert Breunung)++ | docs/appendix-b-grouped.txt: backlinking Contextualizers |
01:39 | |
01:40
allbery_b joined
01:43
eviltwin_b left
01:48
noam left
01:49
noam joined
01:52
replore joined
01:57
replore left
|
|||
lichtkind | gnight | 01:58 | |
01:58
lichtkind left
02:01
erkan left
02:04
whiteknight left
02:11
geekosaur joined
02:14
allbery_b left
02:15
pomysl joined,
pomysl left,
pomysl joined
|
|||
colomon | n: sub mcf($x) { gather loop { my $a = $x.floor; take $a; $x = $x - $a; last if $x == 0; $x = 1 / $x; }; }; mcf(3) | 02:17 | |
p6eval | niecza v16-23-gaa61ed5: ( no output ) | ||
colomon | n: sub mcf($x) { gather loop { my $a = $x.floor; take $a; $x = $x - $a; last if $x == 0; $x = 1 / $x; }; }; say mcf(3).erpl | 02:18 | |
p6eval | niecza v16-23-gaa61ed5: OUTPUT«Unhandled exception: Unable to resolve method erpl in class List at /tmp/VaQxAPhEna line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3840 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3841 (module-CORE @ 65)  at /home/… | ||
colomon | n: sub mcf($x) { gather loop { my $a = $x.floor; take $a; $x = $x - $a; last if $x == 0; $x = 1 / $x; }; }; say mcf(3).perl | ||
p6eval | niecza v16-23-gaa61ed5: OUTPUT«Unhandled exception: assigning to readonly value at /tmp/n_8gIsNTCf line 1 (ANON @ 2)  at /tmp/n_8gIsNTCf line 1 (ANON @ 3)  at <unknown> line 0 (KERNEL dogather @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2354 (GatherIterator.reify @ 3)  … | ||
colomon | n: sub mcf($x is copy) { gather loop { my $a = $x.floor; take $a; $x = $x - $a; last if $x == 0; $x = 1 / $x; }; }; say mcf(3).perl | 02:19 | |
p6eval | niecza v16-23-gaa61ed5: OUTPUT«(3, ).list» | ||
colomon | r: sub mcf($x is copy) { gather loop { my $a = $x.floor; take $a; $x = $x - $a; last if $x == 0; $x = 1 / $x; }; }; say mcf(3).perl | 02:20 | |
p6eval | rakudo dda5b0: OUTPUT«Method 'eager' not found for invocant of class 'Integer' in sub coro at src/gen/CORE.setting:4926 in method reify at src/gen/CORE.setting:4907 in method reify at src/gen/CORE.setting:4678 in method gimme at src/gen/CORE.setting:5065 in method perl at src/… | ||
sorear | o/ colomon | ||
colomon | \o | 02:21 | |
you're totally right about fail. | |||
02:21
awwaiid left
02:29
awwaiid joined
02:32
jaldhar joined,
ponbiki joined
|
|||
colomon | r: sub mcf($x is copy) { gather loop { my $a = $x.floor; say $a; take $a; $x = $x - $a; last if $x == 0; $x = 1 / $x; }; }; say mcf(3).perl | 02:36 | |
p6eval | rakudo dda5b0: OUTPUT«3Method 'eager' not found for invocant of class 'Integer' in sub coro at src/gen/CORE.setting:4926 in method reify at src/gen/CORE.setting:4907 in method reify at src/gen/CORE.setting:4678 in method gimme at src/gen/CORE.setting:5065 in method perl at sr… | ||
colomon | r: say 3.floor | ||
p6eval | rakudo dda5b0: OUTPUT«3» | ||
02:43
eviltwin_b joined
02:46
geekosaur left
02:47
orafu left
|
|||
colomon | r: sub mcf($x is copy) { gather loop { my $a = $x.floor; say $a; take $a; $x = $x - $a; last if $x == 0; $x = 1 / $x; }; }; say mcf(3)[0].perl | 02:47 | |
p6eval | rakudo dda5b0: OUTPUT«33» | ||
02:47
orafu joined
|
|||
colomon | r: sub mcf($x is copy) { gather loop { my $a = $x.floor; say $a; take $a; $x = $x - $a; last if $x == 0; $x = 1 / $x; }; }; say mcf(3)[1].perl | 02:48 | |
p6eval | rakudo dda5b0: OUTPUT«3Method 'eager' not found for invocant of class 'Integer' in sub coro at src/gen/CORE.setting:4926 in method reify at src/gen/CORE.setting:4907 in method reify at src/gen/CORE.setting:4678 in method gimme at src/gen/CORE.setting:5065 in method exists at … | ||
02:50
leprevost joined
|
|||
colomon | r: sub mcf($x is copy) { gather loop { take 1; last; }; }; say mcf(3)[1].perl | 02:51 | |
p6eval | rakudo dda5b0: OUTPUT«Method 'eager' not found for invocant of class 'Integer' in sub coro at src/gen/CORE.setting:4926 in method reify at src/gen/CORE.setting:4907 in method reify at src/gen/CORE.setting:4678 in method gimme at src/gen/CORE.setting:5065 in method exists at sr… | ||
colomon | r: sub mcf($x is copy) { gather loop { take 1; last; }; }; say mcf(3)[0].perl | 02:52 | |
p6eval | rakudo dda5b0: OUTPUT«1» | ||
colomon | r: sub mcf($x is copy) { gather loop { take 1; last; }; }; say mcf(3).perl | ||
p6eval | rakudo dda5b0: OUTPUT«Method 'eager' not found for invocant of class 'Integer' in sub coro at src/gen/CORE.setting:4926 in method reify at src/gen/CORE.setting:4907 in method reify at src/gen/CORE.setting:4678 in method gimme at src/gen/CORE.setting:5065 in method perl at src/… | ||
colomon | r: sub mcf($x) { gather loop { take 1; last; }; }; say mcf(3).perl | ||
p6eval | rakudo dda5b0: OUTPUT«Method 'eager' not found for invocant of class 'Integer' in sub coro at src/gen/CORE.setting:4926 in method reify at src/gen/CORE.setting:4907 in method reify at src/gen/CORE.setting:4678 in method gimme at src/gen/CORE.setting:5065 in method perl at src/… | ||
colomon | n: sub mcf($x) { gather loop { take 1; last; }; }; say mcf(3).perl | 02:54 | |
p6eval | niecza v16-23-gaa61ed5: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/DfIHt7g5uH line 1:------> sub mcf(⏏$x) { gather loop { take 1; last; }; }; (1, ).list» | ||
02:54
thelazydeveloper left
|
|||
colomon | n: sub mcf() { gather loop { take 1; last; }; }; say mcf(3).perl | 02:54 | |
p6eval | niecza v16-23-gaa61ed5: OUTPUT«Unhandled exception: Excess arguments to mcf, used 0 of 1 positionals at /tmp/IiS6Lzbwik line 0 (mcf @ 1)  at /tmp/IiS6Lzbwik line 1 (mainline @ 2)  at /home/p6eval/niecza/lib/CORE.setting line 3840 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setti… | ||
colomon | n: sub mcf() { gather loop { take 1; last; }; }; say mcf().perl | ||
p6eval | niecza v16-23-gaa61ed5: OUTPUT«(1, ).list» | ||
colomon | r: sub mcf() { gather loop { take 1; last; }; }; say mcf().perl | 02:55 | |
p6eval | rakudo dda5b0: OUTPUT«Method 'eager' not found for invocant of class 'Integer' in sub coro at src/gen/CORE.setting:4926 in method reify at src/gen/CORE.setting:4907 in method reify at src/gen/CORE.setting:4678 in method gimme at src/gen/CORE.setting:5065 in method perl at src/… | ||
03:01
allbery_b joined
03:04
eviltwin_b left
03:13
geekosaur joined
03:16
allbery_b left
03:17
envi_ left
|
|||
colomon | r: sub mcf() { gather take 1; }; say mcf().perl | 03:18 | |
p6eval | rakudo dda5b0: OUTPUT«(1,).list» | ||
03:22
jaldhar left
03:23
Su-Shee_ joined
03:27
Su-Shee left
03:48
eviltwin_b joined
03:50
geekosaur left,
eviltwin_b left
03:51
geekosaur joined
04:02
spaceships left
04:04
spaceships joined
04:05
replore joined
04:07
replore__ joined
04:10
replore left
04:27
spaceships left,
leprevost left
04:28
ponbiki left
04:33
tokuhirom left
|
|||
moritz | \o | 04:51 | |
04:52
birdwindupbird joined
|
|||
moritz | r: constant %a = a => 1, b => 2; say %h.WHAT | 04:55 | |
p6eval | rakudo dda5b0: OUTPUT«===SORRY!===Variable %h is not declaredat /tmp/doOHAVgQdK:1» | ||
moritz | r: constant %a = a => 1, b => 2; say %a.WHAT | 04:56 | |
p6eval | rakudo dda5b0: OUTPUT«Parcel()» | ||
04:59
JimmyZ joined
|
|||
JimmyZ | r: dir | say | 04:59 | |
p6eval | rakudo dda5b0: OUTPUT«Method 'FLATTENABLE_LIST' not found for invocant of class 'Bool' in block <anon> at /tmp/lYHiWy5y3l:1» | ||
JimmyZ | std: dir | say | 05:00 | |
p6eval | std fab64fc: 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/lnnbmLF7qN line 1:------> dir | say⏏<EOL>Check failedFAILED 00:00 40m» | ||
05:02
Guest29779 left
05:09
replore__ left
|
|||
dalek | Iish: 45dd6aa | moritz++ | lib/DBDish/Pg.pm6: [Pg] query type OIDs, and map them to p6 type names |
05:11 | |
05:16
sivoais joined
|
|||
dalek | Iish: 6718e68 | moritz++ | lib/DBDish/mysql.pm6: [mysql] simplify fetchrow_hashref |
05:17 | |
05:20
eviltwin_b joined
05:24
geekosaur left
05:31
itz left
05:33
itz joined
05:56
robinsmidsrod joined,
JimmyZ left
05:58
robinsmidsrod left
05:59
kaare_ joined
06:01
robinsmidsrod joined
06:07
allbery_b joined
06:11
eviltwin_b left
06:28
geekosaur joined
06:31
allbery_b left
06:34
eviltwin_b joined
06:38
geekosaur left
06:40
geekosaur joined
06:44
eviltwin_b left
06:47
erkan joined
06:49
eviltwin_b joined
06:52
geekosaur left
07:05
fglock joined
07:18
allbery_b joined
07:21
eviltwin_b left
07:23
GlitchMr joined
07:52
eviltwin_b joined
|
|||
dalek | kudo/nom: a25e7d1 | pmichaud++ | src/Perl6/Actions.pm: Make bare loop statement use Perl 6 True instead of Parrot 1 value. Fixes RT #112654. |
07:52 | |
07:55
allbery_b left
07:56
Su-Shee_ is now known as Su-Shee
07:58
allbery_b joined
08:00
eviltwin_b left
|
|||
dalek | blets: 368aaa2 | (Herbert Breunung)++ | docs/appendix- (2 files): fixing links of last nights endevour |
08:02 | |
08:03
eviltwin_b joined
|
|||
pmichaud | colomon / sorear: fail() returns a Failure value containing an unthrown exception. If the returned Failure isn't marked as handled somehow, any attempt to use the Failure as a normal value throws the exception. Essentially, fail() is a soft failure ("return something that throws an exception if you attempt to use it"), while die() is a hard failure ("throw an exception immediately"). | 08:03 | |
phenny | pmichaud: 25 Apr 21:53Z <moritz> tell pmichaud basing a star release on rakudo 2012.04.1 seems to give star the version 2012.04.1 too. Should we try to separate that? or just go with it? | ||
pmichaud: 25 Apr 21:54Z <moritz> tell pmichaud never mind, doesn't seem hard | |||
pmichaud: 26 Apr 09:01Z <moritz> ask pmichaud to please enable the issues on github for rakudo/star | |||
pmichaud | phenny: tell moritz issues for rakudo/star now enabled on github | 08:04 | |
phenny | pmichaud: I'll pass that on when moritz is around. | ||
moritz | phenny: thanks | 08:05 | |
phenny | moritz: 08:04Z <pmichaud> tell moritz issues for rakudo/star now enabled on github | ||
moritz | erm, pmichaud :-) | ||
pmichaud | sure thing :) | ||
afk, sleep | |||
moritz | dammit, /me not fast enough | ||
08:05
allbery_b left
08:07
erkan left
08:11
araujo left
|
|||
tadzik | good morning | 08:19 | |
moritz | \o tadzik | 08:20 | |
during rakudo compilation, it seems that the PIR and POST stages require the most memory | 08:25 | ||
do we keep the nodes from the previous phases around during POST and PIR generation? | |||
tadzik | good news of the day: github.com/PerlGameDev/SDL6/tree/experimental is being worked on \o/ | 08:32 | |
08:35
geekosaur joined
08:37
eviltwin_b left
08:41
fhelmberger joined,
eviltwin_b joined
08:43
geekosaur left
|
|||
dalek | rlito: 205df32 | (Flavio S. Glock)++ | / (9 files): Perlito5 - parser: move named-subs to the named-block module |
08:47 | |
08:58
geekosaur joined
08:59
bbkr joined,
GlitchMr42 joined,
GlitchMr left
09:00
GlitchMr42 is now known as GlitchMr
09:01
eviltwin_b left,
fgomez left
09:03
erkan joined
09:04
geekosaur left
09:05
geekosaur joined
|
|||
dalek | ast: 0e05bd5 | moritz++ | S04-statements/loop.t: RT #112654, gather loop |
09:09 | |
rlito: 6c32749 | (Flavio S. Glock)++ | / (3 files): Perlito5 - parser: add "sub BEGIN {}" syntax |
09:14 | ||
09:24
thelazydeveloper joined
|
|||
moritz | std: 1<=>2 | 09:58 | |
p6eval | std fab64fc: OUTPUT«===SORRY!===Two terms in a row at /tmp/UACCRNtz2G line 1:------> 1<=>⏏2 expecting any of: POST infix or meta-infix infixed function postcircumfix postfix postfix_prefix_meta_operator postop statement | ||
..modifier loopPa… | |||
jnthn | Good noon, #perl6 | 10:00 | |
moritz | good midday, jnthn | 10:01 | |
jnthn | Mmm. I think I feel well enough today to write code again. \o/ | ||
moritz | \o/ | ||
moritz should blag about DBIish | |||
jnthn will finally do his much-delayed second post on the hackathon too :) | 10:03 | ||
std: 42.blah (1) | 10:14 | ||
p6eval | std fab64fc: OUTPUT«===SORRY!===Two terms in a row (method call requires colon or parens to take arguments) at /tmp/nHvdZSaGBb line 1:------> 42.blah ⏏(1) expecting any of: infix or meta-infix infixed function statement modifier | ||
..loopParse f… | |||
10:16
birdwindupbird left
10:17
fhelmberger left
|
|||
masak | good postnoon, #perl6 | 10:19 | |
10:19
birdwindupbird joined
10:26
PacoAir joined
10:28
JimmyZ joined
|
|||
moritz blug: perlgeek.de/blog-en/perl-6/2012-dbiish.html | 10:30 | ||
good pn, masak :-) | |||
gfldex | where in the S?? are traits explained? | 10:37 | |
jnthn | 14 iirc | ||
gfldex | found it, tyvm | 10:38 | |
jnthn | pzh | 10:41 | |
masak .oO( spice it up with abbreviations in Russian! ) | 10:47 | ||
10:47
whiteknight joined
|
|||
jnthn | пж :P | 10:48 | |
dalek | rlito: 7c52512 | (Flavio S. Glock)++ | src5/lib/Perlito5/Javascript/Runtime.pm: Perlito5 - javascript: add AUTOLOAD infrastructure |
10:53 | |
10:54
eviltwin_b joined
10:57
geekosaur left
|
|||
masak | how about that rt.perl.org/rt3/Ticket/Display.html?id=112634 , eh? | 11:05 | |
it feels like a "usability vs. gosh that's a lot of work to implement" thing. | |||
rt.perl.org/rt3//Public/Bug/Displa...?id=112632 is just wrong. rejecting it now. | 11:06 | ||
jnthn | masak: I expect 112634 to work some day. | 11:08 | |
masak: I'm happy enough having it as an RT. | |||
masak: BTW, I rejected one other ticket this morning too. | |||
Ah, and yes, 112632 is also right to reject. | |||
11:08
holysword joined
|
|||
holysword | hi there | 11:09 | |
could anyone enlight me if it is possible to print colorful messages in terminal using perl6? | |||
masak | hi holysword | 11:10 | |
that should be possible, yes. | |||
jnthn | holysword: I used colorful output in my Grammar::Debugger module...I used...lemme check.. | ||
masak rejects #112636 too | |||
jnthn | use Term::ANSIColor; | ||
masak | oh, moritz++ already did. | ||
holysword | okay, thanks. I have been trying to google it, couldn't find many directions | ||
thank you | |||
jnthn | github.com/tadzik/perl6-Term-ANSIColor/ | 11:11 | |
It worked nicely for me. | |||
holysword | thank you =D | ||
masak | we really need to improve those TTIAR/whitespace errors in Rakudo. | 11:12 | |
jnthn | masak: We do. | ||
masak: We should land qbootstrap first though. | |||
holysword | :P | ||
masak | jnthn: aye! | 11:13 | |
let's land the crap our of qbootstrap! \o/ | |||
out* | |||
jnthn looks around for a pmichaud :) | |||
moritz | seen pmichaud | ||
aloha | pmichaud was last seen in #perl6 3 hours 8 mins ago saying "afk, sleep". | ||
jnthn | I wonder if he can implement mark_commit in his sleep... :) | 11:14 | |
Anyway, once we get mark_commit and the NFA builder can get transitivity right, we should be a lot further forward with qbootstrap. | 11:15 | ||
masak | ok. | ||
gfldex | r: gist.github.com/2518066 | ||
p6eval | rakudo a25e7d: OUTPUT«Null PMC access in find_method('slots') in sub handle_call at /tmp/1Sr1bcbqU5:21 in any enter at src/gen/Metamodel.pm:2685 in method postcircumfix:<( )> at src/gen/CORE.setting:1601 in <anon> at src/gen/BOOTSTRAP.pm:815 in any <anon> at src/gen/BOOTSTRAP.… | ||
jnthn | Eek. That looks bad. | 11:17 | |
gfldex tries to find the line that triggers Null PMC | |||
jnthn | (&$signal).connect($sender, $rcpt, $slot); | 11:18 | |
gfldex | it' | ||
jnthn | ...what's that & doing there? :) | ||
gfldex | it's line 21 | ||
masak | r: sub foo {}; my $bar = &foo; say &$bar | 11:19 | |
p6eval | rakudo a25e7d: OUTPUT«sub foo() { ... }» | ||
moritz | r: class A { our method x() { say "A::x" } }; &A::x(A) | ||
p6eval | rakudo a25e7d: OUTPUT«A::x» | ||
masak | r: my $bar = 42; say &$bar | ||
p6eval | rakudo a25e7d: OUTPUT«42» | ||
masak | seems it's a no-op. | ||
IMHO, that last one should be illegal. | |||
gfldex | i have a trait on a method. In line 31 i want to call the method that is mixed in from role Signal. | 11:20 | |
masak | gfldex: if I were you, I'd just write '$signal' 'stead of '(&$signal)' | ||
gfldex tries | |||
jnthn | Yeah. I doubt that's the actual bug here though. | 11:21 | |
moritz | @.slots.push([$sender, $rcpt, $method]); | ||
masak | it isn't. | ||
moritz | that shouldn't ever work | ||
because @!slots is typed to contain Method objects | |||
and you try to push an array on it | |||
jnthn | Wow, yes. | ||
gfldex | i changed &$signal to $signal, still Null PMC | ||
masak | still, that's not the bug either. | ||
moritz | aye | 11:22 | |
masak | gfldex: right, we haven't found the cause for the Null PMC access yet. | ||
try golfing it :) | |||
moritz | r: class A { has Method @.slots; }; A.new.slots.push: [1, 2, 3] | ||
p6eval | rakudo a25e7d: ( no output ) | ||
moritz | masak: wanna submit? | ||
gfldex | changed Method @.slots to just @.slots, still Null PMC | ||
masak submits rakudobug | 11:23 | ||
gfldex: right, that's not the cause of the Null PMC access. we know this. | |||
;) | |||
just finding different, easier errors on the way. | |||
gfldex | gist.github.com/2518066 updated | ||
11:24
sergot joined
|
|||
sergot | hi o/ | 11:24 | |
masak | sergocie! \o/ | ||
gfldex | i don't think i can golf it much | ||
masak tries, then | |||
moritz | the weird thing is, it explodes while invoking method pressed | 11:25 | |
gfldex | yes and it calls the wrong handle_call | 11:26 | |
moritz | but nothing seems to override its invoke/postcircumfix:<( )> | ||
jnthn | That &wrap call means you are wrapping with the proto. | ||
moritz | oh, erm, does .wrap on a method work at all= | 11:27 | |
s/=/?/ | |||
jnthn | And that trait_mod along with the multi, proto etc. has to be compiled "just in time" since the trait_mod runs at BEGIN time. | ||
Yes, .wrap is defined on Routine. | |||
moritz | r: class A { our method x { say 'A.x' }; }; BEGIN &A::x.wrap( sub(*@) { say 'OH WRAP' }); A.x | 11:28 | |
p6eval | rakudo a25e7d: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2» | ||
gfldex | my guess is that the dispatcher is calling the wrong handle_call with a capture that is empty but not | ||
11:28
oiig_ joined
|
|||
jnthn | But a $m should be in scope and not null in either case. | 11:28 | |
moritz | r: class A { our method x { say 'A.x' }; }; BEGIN &A::x.wrap( sub (*@a) { say 'OH WRAP' }); A.x | 11:29 | |
p6eval | rakudo a25e7d: OUTPUT«OH WRAP» | ||
moritz | hm, doesn't seem to call the method | ||
gfldex | i don't think $m is null, let me check | ||
moritz | do I need to nextsame? | ||
r: class A { our method x { say 'A.x' }; }; BEGIN &A::x.wrap( sub (*@a) { say 'OH WRAP'; nextsame }); A.x | |||
p6eval | rakudo a25e7d: OUTPUT«OH WRAPA.x» | ||
jnthn | gfldex: multi handle_call { | ||
In this case, that candidate can never match. | |||
Because a method *always* has at least one argument. | 11:30 | ||
gfldex | well, $m seamt to be null | ||
jnthn | Yeah, it shouldn't be. | ||
gfldex | i added say $m.elems; and it explodes | ||
jnthn | I suspect it's some kind of lexical chaining issue. | ||
masak | $m.WHAT says Method+{Signal}() | 11:31 | |
gfldex | s/i added say $m.elems; and it explodes/nvm/ gfldex-- | ||
actually say $m.slots.elems; explodes | 11:32 | ||
jnthn | masak: Not if you do it inside of the multi handle_call | ||
masak | oh! | 11:33 | |
jnthn | OK, it's the multi that is somehow to blame | ||
masak | Can only use get_what on a SixModelObject | ||
gfldex | if i say multi handle_call in the trait_mod multi, does it create a clousure? | ||
masak | yeah, that feels like a lexpad outer chain corruption. | ||
jnthn | gist.github.com/2518209 gets much further | 11:34 | |
masak: Yeah, something along those lines. | |||
masak submits rakudobug | |||
moritz | adding a proto also gets much further | ||
jnthn | Now we know what it is, it's probably very golfable. | ||
moritz: oh... | |||
moritz++ | 11:35 | ||
11:35
mucker joined
|
|||
masak | r: { my $s = 42; multi foo { say $s }; foo } | 11:35 | |
p6eval | rakudo a25e7d: OUTPUT«42» | ||
gfldex | moritz: at what point? | ||
masak | not as simple as that, it seems. | ||
r: sub bar {}; { my $s = 42; multi foo { say $s }; &bar.wrap(&foo) }; bar | 11:36 | ||
p6eval | rakudo a25e7d: OUTPUT«42» | ||
masak | nor even as simple as that. | ||
I'm approaching this from the wrong end :P | |||
11:36
sergot left
|
|||
jnthn | gist.github.com/2518235 | 11:37 | |
gfldex: ^^ | |||
gfldex | that makes sense | 11:38 | |
but the compiler should be a bit more concerned without the proto :) | |||
but it still doesnt work how i would like it to | |||
jnthn | masak: gist.github.com/2518262 - this golfs it some way | 11:39 | |
gfldex | because |$args should be empty | 11:40 | |
jnthn | masak: Uncommenting the proto explodes | ||
gfldex: It will never be empty because you're wrapping a *method*. | |||
GlitchMr: You'll always have at least one argument. | |||
er | |||
sorry, that was for gfldex :) | |||
gfldex | so i have to strip the first argument? | ||
jnthn | Well, the first argument is the invocant. | ||
11:40
sergot joined
|
|||
gfldex | i have the invocant anyways | 11:41 | |
jnthn | multi handle_call($invocant, |$rest) { } # works | ||
gfldex | and i should not need a multi anymore | 11:42 | |
masak | jnthn: we had an RT ticket about that the other day. | ||
jnthn | masak: ? | 11:43 | |
11:44
snearch joined
|
|||
JimmyZ | everythingsysadmin.com/2011/01/pyth...perl6.html | 11:47 | |
masak | r: role R { has $.x }; multi trait_mod:<is>($m, :$a!) { $m does R; multi y(|$) { say $m }; $m.wrap(&y) }; (class { method z is a {} }).z; | 11:49 | |
p6eval | rakudo a25e7d: OUTPUT«Null PMC access in find_method('gist') in sub say at src/gen/CORE.setting:6555 in sub y at /tmp/Ipv8GSFBLg:1 in any enter at src/gen/Metamodel.pm:2685 in method postcircumfix:<( )> at src/gen/CORE.setting:1601 in <anon> at src/gen/BOOTSTRAP.pm:815 in an… | ||
masak | golf'd. :) | ||
jnthn: I'll find it for you. | |||
jnthn: rt.perl.org/rt3/Ticket/Display.html?id=112642 | 11:50 | ||
no, wait. | 11:51 | ||
r: multi trait_mod:<is>($m, :$a!) { multi y(|$) { say $m }; $m.wrap(&y) }; (class { method z is a {} }).z; | 11:52 | ||
p6eval | rakudo a25e7d: OUTPUT«Null PMC access in find_method('gist') in sub say at src/gen/CORE.setting:6555 in sub y at /tmp/LxB4luvHae:1 in any enter at src/gen/Metamodel.pm:2685 in method postcircumfix:<( )> at src/gen/CORE.setting:1601 in <anon> at src/gen/BOOTSTRAP.pm:815 in an… | ||
masak | roles don't enter into it. | ||
it's *so* easy to become blind by positive confirmation bias. | |||
that's why golfing is useful. | |||
jnthn | masak: And you can fix that one by adding an explicit proto, yes? | ||
masak | dunno. | ||
jnthn | r: multi trait_mod:<is>($m, :$a!) { proto y(|$) { * }; multi y(|$) { say $m }; $m.wrap(&y) }; (class { method z is a {} }).z; | 11:53 | |
p6eval | rakudo a25e7d: OUTPUT«z» | ||
jnthn | Yes, you can | ||
So it's everything to do with the auto-generated proto. | |||
masak | r: multi trait_mod:<is>($m, :$a!) { multi y(|$) { say $m }; $m.wrap(&y) }; sub foo is a {}; foo | ||
p6eval | rakudo a25e7d: OUTPUT«Null PMC access in find_method('gist') in sub say at src/gen/CORE.setting:6555 in sub y at /tmp/brOPOBDGQV:1 in any enter at src/gen/Metamodel.pm:2685 in method postcircumfix:<( )> at src/gen/CORE.setting:1601 in <anon> at src/gen/BOOTSTRAP.pm:815 in an… | ||
masak | huh! classes don't enter into either. | ||
yes. it's the auto-gen proto's the culprit. | |||
masak concentrates this down into a simple bug report | 11:54 | ||
jnthn | Derived dispatchers too if the patch I'm trying at the moment works. | ||
Yeah, I think I have a patch locally. | |||
r: multi trait_mod:<is>($m, :$a!) { multi y(|$) { say $m }; $m.wrap(&y) }; sub foo is a {}; foo | 11:55 | ||
p6eval | rakudo a25e7d: OUTPUT«Null PMC access in find_method('gist') in sub say at src/gen/CORE.setting:6555 in sub y at /tmp/Sji3LNwiKd:1 in any enter at src/gen/Metamodel.pm:2685 in method postcircumfix:<( )> at src/gen/CORE.setting:1601 in <anon> at src/gen/BOOTSTRAP.pm:815 in an… | ||
JimmyZ | r: dir | say #bug too ? | ||
p6eval | rakudo a25e7d: OUTPUT«Method 'FLATTENABLE_LIST' not found for invocant of class 'Bool' in block <anon> at /tmp/8boAQ0TDGi:1» | ||
jnthn | LTA error. | 11:56 | |
Can fix that one. | |||
Should be more like "Cannot flatten a Bool into an argument list" | |||
JimmyZ | std: dir | say | ||
p6eval | std fab64fc: 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/BtEzDiPQWI line 1:------> dir | say⏏<EOL>Check failedFAILED 00:00 40m» | ||
jnthn | Well, also that. | ||
But if you choose something other than say that returns a bool... | |||
JimmyZ | :) | 11:57 | |
jnthn | Feel free to file as LTA error, anywya. | ||
11:57
eviltwin_b left
|
|||
jnthn | *anyway | 11:57 | |
holysword | hi again! I would like to know how I can use the "do filename" thing in perl6, please! | 11:58 | |
JimmyZ | what is 'do filename'? | 11:59 | |
jnthn | In Perl 5, do 'filename' would read the file, eval the code and run it, iirc. | 12:00 | |
holysword | yes, exactly jnthn | ||
jnthn | In Perl 6 we don't overload do to do that... | ||
I guess you can: eval slurp 'filename'; | |||
holysword | oh, so how can I do that? is there any other command? | ||
hum... | |||
jnthn | slurp reads the whole file in, eval runs that code. | ||
Which I guess is what Perl 5 really does | 12:01 | ||
Hmm...is there an evalfile too, I wonder... | |||
12:01
eviltwin_b joined
|
|||
holysword | I am starting to learn Perl now for the first time, and I starting to seriously consider learning Perl5 rrrather than perl6 O.O | 12:04 | |
masak | JimmyZ: did you RT-submit the LTA error? | ||
dalek | kudo/nom: 6c9661f | jnthn++ | src/Perl6/Actions.pm: Fix a lexical handling bug in installation of auto-generated protos and derived dispatchers. gfldex++ for reporting, moritz++ for realizing it was about protos. |
||
jnthn | masak: ^^ means the ticket can be tagged testneeded. | 12:05 | |
gfldex | that was one fast bugfix :) | ||
JimmyZ | masak: RT #112662 | 12:06 | |
masak | JimmyZ++ | ||
jnthn: I'm on it. | |||
gfldex | what's the most basic type of a class? | 12:07 | |
jnthn | gfldex: If you declare "class Foo { }" then it inherits from Any, if that's what you mean. | 12:08 | |
Mu is above Any, but you generally want to inherit from Any. | |||
gfldex | r: say Role ~~ Any; | ||
p6eval | rakudo a25e7d: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&Role' called (line 1)» | 12:09 | |
jnthn | There's no "Role" type, just as there's no "Class" type | ||
There are meta-objects, but those live off in the Metamodel:: namespace | |||
masak | there's just HOWs, which are metaobjects. | ||
jnthn | And there's four of them related to roles :) | ||
jnthn should give a talk on how that lot is factored some day, for people who are bonkers enough to come to such talks... :) | 12:10 | ||
gfldex | r: my class A {}; sub foo($some_class:D){}; foo(A.new); foo(A); | 12:11 | |
p6eval | rakudo a25e7d: OUTPUT«===SORRY!===invoke() not implemented in class 'Capture'» | ||
moritz | jnthn: I'd live to hear that talk | ||
*love | |||
:-) | |||
jnthn | gfldex: Uh...other than get Rakudo to spit out weird errors, what were you trying to do? :) | 12:12 | |
masak | jnthn: what moritz said. | ||
gfldex | i want to force a real object instead of a metaobject | ||
masak | gfldex: X/Y | ||
jnthn | s/metaobject/type object/ | ||
masak | gfldex: what do you *really* want to do? :) | ||
jnthn | r: my class A {}; sub foo(Any:D){}; foo(A.new); foo(A); | ||
masak | take a step back. no, take two steps back. | ||
p6eval | rakudo 6c9661: OUTPUT«Parameter '' requires an instance, but a type object was passed in sub foo at /tmp/CZ_1PUcPNj:1 in block <anon> at /tmp/CZ_1PUcPNj:1» | ||
jnthn | Like that. | 12:13 | |
gfldex | that one :) | ||
jnthn | Mini-challenge for a C hacker: find a way to make that error include the paramter index instead of '' :) | ||
12:14
araujo joined
|
|||
gfldex | what i really want to do is doc.qt.nokia.com/4.7/signalsandslots.html | 12:14 | |
and i'm getting closer :) | |||
masak | jnthn++ # understanding what gfldex wanted | 12:15 | |
gfldex++ # cool QT experimenting | |||
dalek | p: edd14da | jnthn++ | tools/build/PARROT_REVISION: Now the release is done, we can bump PARROT_REVISION to the one with pmichaud++'s fixes for Unicode handling. |
||
gfldex | qt's signal and slot stuff is real clever, they sneak late binding into c++ | 12:16 | |
that might be the reason why signal/slots in perl6 are so much easier to implement :) | |||
moritz | but you can get late binding in p6 much easier :-) | ||
i mean, you can just call $obj."$methodname"(|$capture) to get late binding, no? | 12:17 | ||
masak | hehe. methods already give you late binding. | ||
"no, no. later than that!" :P | |||
gfldex | you can but in contrast to qt's moc the compiler can be picky at compile time | ||
at least that's what i hope | |||
masak wants to give a talk about late binding at some point | 12:18 | ||
12:18
mdupont joined
|
|||
dalek | kudo/nom: 2a962e3 | jnthn++ | tools/build/NQP_REVISION: Bump NQP_REVISION. Can haz somewhat cleaner spectest runs without ICU; pmichaud++. |
12:18 | |
moritz | "Callbacks have two fundamental flaws: Firstly, they are not type-safe." | 12:19 | |
erm, what? | |||
jnthn | huh? :) | ||
masak | sez who? | ||
moritz | doc.qt.nokia.com/4.7/signalsandslots.html | ||
jnthn | ooh, Swedish has one of its National Days Off To Hack on Tuesday :) | 12:20 | |
s/Swedish/Sweden/ | |||
masak | yep. | ||
not just Sweden. | |||
jnthn | Oh? | ||
masak | it's International Something Day. | ||
jnthn | Oh yeah | ||
Isn't it a good day to have political protests too? :) | 12:21 | ||
masak | I seem to recall it's about women going into labor... or something. | ||
gfldex makes a sign that says: "Free Perl6 for everyone!!!" | |||
Su-Shee | 1st of may is worker's movements day. | 12:22 | |
masak: aua ;) | |||
jnthn | masak: Oh, so it happens 9 months after national get pregnant day? :) | ||
masak | my dad, when we was running his own company, was fond of saying "This year, just like every year, I will celebrate International Labor Day... by going to work." :P | ||
jnthn | :D | ||
jnthn wonders if Monday will be a half-day | 12:23 | ||
masak | yep. | ||
jnthn | wtf :) | ||
That's pointless | |||
Weekend | |||
Then go into work for 3 hours | |||
Then a day and a half off! | |||
:) | |||
gfldex | my dad was ordered by the state to protest when i was a wee boy (nobody knew what for) | ||
Su-Shee | gfldex: let me guess.. socialist country? :) | ||
gfldex | eastern germany | 12:24 | |
Su-Shee | ;) | ||
masak | jnthn: welcome to the land of "klämdag". | ||
Su-Shee | masak: "kläm"? | ||
masak | phenny: sv en "klämdag"? | ||
phenny | masak: "klämdag" (sv to en, translate.google.com) | ||
masak | phenny: sv en "klämma"? | ||
phenny | masak: "terminal" (sv to en, translate.google.com) | ||
masak | g'ah! | ||
Su-Shee | like klempner, plummer? :) | ||
masak | phenny: en sv "squeeze"? | ||
phenny | masak: "pressa" (en to sv, translate.google.com) | ||
masak | tut tut. | ||
it literally translates as "squeeze day". as in, the day gets squeezed in between two periods of being off work. | 12:25 | ||
jnthn | .oO( klämrisk ) |
||
masak | that's usually a Friday, but this time it's a Monday. | ||
moritz | phenny: "brückentag"? | ||
phenny | moritz: "Bridge Day" (de to en, translate.google.com) | ||
masak | our metaphor beats your metaphor. :) | 12:27 | |
or squeezes it, perhaps. | |||
moritz | your metaphor is violent, it seems :-) | ||
masak | it pinches rather than punches. | ||
moritz has already mostly updated from Squeeze to Wheezy | |||
jnthn afk for a little bit | 12:28 | ||
12:32
laurus joined
|
|||
moritz wonders if that signalling thing could go into a role that is mixed into objects or classes, not into methods | 12:32 | ||
12:32
sergot left
|
|||
gfldex | moritz: that would not make sense because slots are just methods and signals are kind of not really methods or better they are all the same beside their @.slots; | 12:34 | |
12:36
sergot joined
|
|||
moritz | gfldex: you're probably right, and it's simply my infamiliarity with the whole system that makes me wonder | 12:37 | |
gfldex | and it would be nice to have class Foo { signal pressed; }; class Bad { slot exit() { $*GLOBAL::exit }; my $a = Foo.new; my $b = Bar.new; connect($a.pressed, $b.exit); | ||
so there would be at least some macroing needed if not some grammar-foo | |||
and i'm eager to get there :) | 12:38 | ||
because signal/slot is very very nice | |||
it's so easy to reuse code that way | |||
there will be blogging where i explain | 12:39 | ||
12:42
holysword left
12:46
geekosaur joined
|
|||
JimmyZ | method exit is slot? | 12:48 | |
moritz | jnthn: do the Test::Util based tests now pass on your machine? | ||
12:49
eviltwin_b left
|
|||
jnthn | moritz: Seems so | 12:50 | |
I still have scattered failures | |||
Many in pod. | |||
Hmm...we could really do with -I | 12:51 | ||
gfldex | JimmyZ: slot exit() { ... } would translate to our method exit is slot() { ... } | ||
it's mostly because of the our because that's easy to forget | 12:52 | ||
jnthn | Why do you need the "our"? | 12:53 | |
mucker | o/ #perl6 | ||
gfldex | because &Foo::bar would return Nil (or nil) | ||
jnthn | Why do you need to look it up that way? | ||
Why not Foo.^find_method('bar') for example? | |||
gfldex | i could do that if i have unhygienic macros | 12:54 | |
or maybe not | |||
12:55
laurus left
|
|||
jnthn will wait for the gfldex++ blog posts and then comment :) | 12:55 | ||
(I'm not familiar with the signals/slots thing either.) | |||
gfldex | if i go connect($obj1, 'method1', $obj2, 'method2'); i get the error message for a typo at runtime | ||
that's exactly the problem with qt's moc | 12:56 | ||
the connect happens at runtime and you get the typecheck and lexical check late | |||
the advantage is that it works inbetween different processes | |||
masak | "unhygienic" !=== "operates on text rather than ASTs" | 12:57 | |
gfldex | masak: i am most sorry to have hurt your macro feelings :) | ||
so you can call a slot in a c++ application from the bash | |||
that includes all kde apps | 12:58 | ||
all you have to do is to write: slot void my_method(){}; | |||
and that slot is even an empty macro :) | |||
masak | gfldex: no hurt feelings, just trying to improve the general public's understanding of macros ;) | 12:59 | |
ASTness and hygiene are two distinct levels of purity. | |||
if it made sense to talk about pure textual macros -- maybe it does, though I doubt it -- you could combine textual/AST and impure/pure all four ways. | 13:00 | ||
gfldex | i would rather not, macros are confusing as they are :) | ||
masak | the point of textual macros is that they can ignore or span boundaries easier than AST macros. they're sloppier, and harder to analyze. | 13:02 | |
but they can certainly have a lexically scoped influence, and indeed I suspect they will in Perl 6. | |||
13:03
mucker left
13:04
mucker joined
|
|||
masak | but there's nothing that stops a textual macro from inserting the variable name '$' ~ whatever() at a point -- and getting hygiene from that, well, hm. could be it comes down to solving the halting problem, actually. | 13:06 | |
hm, no. it's simpler than that. | 13:08 | ||
what we *want* from that text insertion is unhygiene. | |||
so they're not compatible, and by design. | |||
13:09
sergot left
13:11
mucker left
13:12
eviltwin_b joined
13:15
geekosaur left
13:18
godfrey999 joined
13:22
geekosaur joined
|
|||
masak | hm, another way of looking at it is that AST macros come with their own block boundaries, and text macros don't. block boundaries of some sort are needed for hygiene. | 13:23 | |
13:24
eviltwin_b left
|
|||
gfldex | Stage parse: 106.830 | 13:27 | |
Stage syntaxcheck: 0.000 | |||
... | |||
would it be possible to have vmsize_peak too? | |||
13:29
yeltzooo7 left,
eviltwin_b joined
13:30
yeltzooo joined
|
|||
masak | gfldex: don't mind the figures in 'Stage parse' and 'Stage syntaxcheck'. they're meaningless. | 13:30 | |
13:31
geekosaur left
|
|||
gfldex | r: gist.github.com/2519081 | 13:31 | |
p6eval | rakudo 2a962e: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 22» | ||
masak | I guess it's entirely possible to have vmsize_peak too. | ||
gfldex: missing a ' | |||
at line 21 | |||
gfldex | copy paste fail | ||
masak | doesn't really matter, does it? :) | 13:32 | |
gfldex | r: gist.github.com/2519081 | ||
p6eval | rakudo 2a962e: OUTPUT«turn method into signal in sub trait_mod:<is> at /tmp/X9OVJoWQxX:16turn non-method into signal in sub trait_mod:<is> at /tmp/X9OVJoWQxX:300Button()::pressed - App()::exitApp::exit calledRoutine signal handler called1sub+{signal}+{wrapped} bare_signal_exi… | ||
gfldex | that's not to helpful, need to change a few bits | ||
masak | another good way to test your programs is to run them locally. | 13:33 | |
13:34
skids left
|
|||
gfldex | i may have found another bug and you wont like that one :) | 13:34 | |
r: gist.github.com/2519081 | |||
p6eval | rakudo 2a962e: OUTPUT«turn method into signal in sub trait_mod:<is> at /tmp/e5bpYL1Bk6:16turn non-method into signal in sub trait_mod:<is> at /tmp/e5bpYL1Bk6:300App::exit calledApp::exit called» | ||
gfldex | grrrr | ||
r: gist.github.com/2519081 | 13:36 | ||
p6eval | rakudo 2a962e: OUTPUT«0App::exit calledApp::exit called» | ||
gfldex | r: gist.github.com/2519083 | ||
p6eval | rakudo 2a962e: OUTPUT«App::exit called» | ||
gfldex | the only difference of those two gists is in line 33 | ||
it should call App::exit twice for both | 13:37 | ||
masak | please golf this, and I'll submit it. | ||
13:38
skids joined
|
|||
dalek | blets: 039be2a | (Herbert Breunung)++ | docs/appendix- (3 files): more repaired links |
13:41 | |
13:42
allbery_b joined
|
|||
arnsholt | o/ | 13:43 | |
gfldex | masak: that's as short as i can get it gist.github.com/2519182 | 13:45 | |
13:45
eviltwin_b left
|
|||
gfldex | masak: update: gist.github.com/2519182 | 13:51 | |
13:53
jaldhar joined
|
|||
masak tries to golf it further | 13:58 | ||
generally, if it contains 'use v6;', it's too long :P | 13:59 | ||
gfldex | masak: i got it a little shorter myself | ||
jnthn | .oO( and finally putts it in RT ) |
||
gfldex | gist.github.com/2519279 | ||
masak | still very long. | 14:00 | |
you can't see what's happening when it spans several lines like that. | |||
gfldex | i can put it all on one line if you like :) | ||
masak | and remove all the other cruft. | 14:01 | |
the 'say' is unnecessary. | |||
I think the '.elems' is the key component there. | |||
making the bug about lazy lists. | |||
nope. | |||
gfldex | can't be | ||
masak | the '.elems' is unnecessary too. | ||
but the '.slots' is necessary. | 14:02 | ||
14:05
leprevost joined
|
|||
gfldex | masak: not even that, update: gist.github.com/2519279 | 14:08 | |
where the heck does it take the @a from in the wrap({block}) ? | 14:09 | ||
jnthn | I'm not really surprised that doesn't work... | ||
The @a would be the one in the static lexpad I guess... | |||
Whereas when the mainline actually runs, it gets a fresh @a | 14:10 | ||
14:10
eviltwin_b joined
|
|||
gfldex | so it should either work or complain that @a is not declared? | 14:10 | |
jnthn | But it is declared | 14:11 | |
You're talking about two different @as | |||
gfldex | because of the -> ? | ||
jnthn | Because of BEGIN time | ||
That trait_mod runs at BEGIN time. | |||
masak | yes, it is BEGIN time. why does that make it two different @a ? | 14:12 | |
jnthn | sub foo() { my @a }; foo; foo; # how many @a ? | ||
14:13
allbery_b left
|
|||
gfldex | if you add @a.elems; right before $r.wrap it works | 14:13 | |
jnthn | Hm | ||
gfldex | and @a.elems is called at BEGIN indeed | ||
jnthn | Yeah... | ||
That may well be a case of "works by accident" | |||
You actually vivify the @a then | |||
I guess you vivify the one in the static lexpad. | 14:14 | ||
And then it gets copied | |||
nom: sub foo() { my @a; BEGIN { @a = 1,2,3 }; say @a; }; foo(); foo(); | |||
p6eval | rakudo 2a962e: OUTPUT«elements() not implemented in class 'Mu' in method REIFY at src/gen/CORE.setting:5280 in method REIFY at src/gen/CORE.setting:5527 in method reify at src/gen/CORE.setting:4691 in method reify at src/gen/CORE.setting:4678 in method gimme at src/gen/CORE.se… | ||
gfldex | but why does it get copied instead of forming a closure? | ||
jnthn | Wow. | ||
masak | here we go. | ||
r: role R { has @.s is rw }; multi trait_mod:<is>($r, :$x!) { $r does R; sub h(|$){ for $r.s { &^m() } }; $r.wrap(&h) }; sub b is x {}; push &b.s, { say "OH HAI" }; b | |||
p6eval | rakudo 2a962e: ( no output ) | ||
masak | r: role R { has @.s is rw }; multi trait_mod:<is>($r, :$x!) { $r does R; $r.s; sub h(|$){ for $r.s { &^m() } }; $r.wrap(&h) }; sub b is x {}; push &b.s, { say "OH HAI" }; b | ||
p6eval | rakudo 6c9661: OUTPUT«OH HAI» | ||
masak | note. | ||
only difference. | |||
'$r.s' | 14:15 | ||
masak submits rakudobug | |||
jnthn | :/ | ||
masak | whatever the cause or underlying subtleties with BEGIN time, that *shouldn't* happen. | ||
jnthn | OK, maybe I should find a way to make this not work at all. | ||
gfldex | but how do you carry state in a trait_mod:<is> then? | 14:16 | |
masak | jnthn: that sounds like a good start. | ||
masak does another RT ticket of massive bookkeeping | |||
gfldex++ # extending our limits :) | |||
gfldex | or to ask the question from a perl6user viewpoint: how do i do that correctly? | 14:17 | |
it's funny how one can find bugs in a language by actually using that language :) | |||
masak | how else would you find them? | 14:18 | |
gfldex | well, you have design by committee and then some magic | 14:19 | |
that's at least what managers tend to believe | 14:20 | ||
jnthn | masak: The bug you filed isn't to do with BEGIN time. | 14:22 | |
It's to do with .clone not doing the right kinda thing with arrays. | 14:23 | ||
Just worked out what's going on. | |||
masak | ok. | ||
I'm still editing it, so I can still change the subject line. :) | 14:24 | ||
jnthn | I suspect all the odd behavior we have here may actually be down to that kind of thing. | 14:25 | |
masak | rt.perl.org/rt3/Ticket/Display.html?id=112666 | ||
jnthn | I won't fix it right now, but basically, the $r.s causes some interals of the Array to come to life earlier, and then the (already known) .clone issue with Array kicks in and over-shares stuff. | 14:27 | |
14:30
lichtkind joined,
preflex_ joined
|
|||
dalek | Heuristic branch merge: pushed 28 commits to nqp/toqast by jnthn | 14:31 | |
lichtkind | shouldnt be there also a meta category for regex and other slangs? | ||
14:31
preflex left
|
|||
lichtkind | jnthn++ | 14:32 | |
14:32
preflex_ is now known as preflex
14:36
Chillance joined
|
|||
masak | a meta-category in what? | 14:36 | |
jnthn | What's a meta-category? :) | ||
lichtkind | grammatical metacat | ||
if you want to make your own class of regex thingies | |||
masak | lichtkind: to the extent that I understand what a metacategory is: no. there shouldn't. | 14:39 | |
I see 27 grammatical categories in S02. | 14:40 | ||
the only one I'd call a "meta-category" is the first one, 'category:' | |||
I don't think we need more than that. | 14:41 | ||
14:41
snearch left
|
|||
masak | STD.pm6 has 37 categories. <category sigil twigil special_variable comment version module_name value term numeric quote prefix infix postfix dotty circumfix postcircumfix quote_mod trait_mod initializer type_declarator scope_declarator package_declarator multi_declarator routine_declarator regex_declarator statement_prefix statement_control statement_mod_cond statement_mod_loop infix_prefix_meta_operator infix_postfix_meta_operator infix_circumfix_meta_operato | 14:45 | |
dalek | p/toqast: 9dbb0ea | masak++ | t/qast/qast.t: [t/qast/qast.t] belatedly update test count jnthn++ |
14:48 | |
masak | lichtkind: look at STD.pm6:4791, how Regex is defining its own categories in the 'category:' category. | 14:50 | |
and that's in the Regex grammar, so it definitely qualifies for your use case, "if you want to make your own class of regex thingies" :) | 14:51 | ||
14:51
godfrey999 left,
leprevost left
14:56
fhelmberger joined
|
|||
dalek | p/toqast: 6fe3c6c | jnthn++ | src/QAST/Operations.nqp: Add a way to register op compilation handlers at core and HLL level. |
15:03 | |
p/toqast: 29c96d3 | jnthn++ | t/qast/qast.t: Merge branch 'toqast' of github.com:/perl6/nqp into toqast |
|||
p/toqast: a4bd66d | jnthn++ | t/qast/qast.t: Test WVal node. |
|||
p/toqast: b54c728 | jnthn++ | / (2 files): Compile op 'list'; test. |
|||
masak | right, so a WVal is a value that's been registered in the World? | 15:05 | |
jnthn | Some world, somewhere. | 15:06 | |
masak | right. | ||
jnthn | May not be the world of the current compilation unit. May be a cross-ref. | ||
masak .oO( many-worlds interpretation ) | |||
jnthn | Main thing is we have a node for it now. :) | 15:08 | |
masak | \o/ | 15:09 | |
jnthn | The 6model <=> QAST integration conspiracy deepens! | ||
masak | the most beautiful thing about each refactor is how each layer becomes more accomodating and adapted to other layers. | ||
jnthn | masak: What QAST-y bits do you want to work on? | 15:10 | |
masak: Just the pirop mapping for now? | 15:11 | ||
I'm pondering doing conditionals (ops if and unless) next... | |||
masak | I'll work on the pirop mapping unless there is some other place where I could be of significantly more use. | 15:13 | |
jnthn | Go for it. | ||
masak | \o/ | ||
jnthn | If you want some pain, you can take on the keyed bits too. :) | ||
(That's the Qs that show up.) | |||
masak | sounds like masakistic fun! ;) | 15:14 | |
jnthn | (I think POST can do a little to support too.) | ||
Yeah. It's the only trick bit | |||
*tricky | |||
masak | hm, I might do .STORE before digging in, though. | ||
jnthn | STORE? | ||
*confused look* | |||
masak | as in groceries. | ||
jnthn | oh! | ||
masak | :P | ||
jnthn | Groceries are overrated. | ||
:) | |||
masak | troo | 15:15 | |
jnthn | ...I could do with some too though :) | ||
masak | there's beer in the fridge... :P | ||
jnthn | \o/ | ||
masak | ...but I think I should buy something non-liquid too. | ||
15:17
lichtkind left
|
|||
masak ↝ @groceries | 15:20 | ||
15:22
vlixes joined
15:25
geekosaur joined
15:28
eviltwin_b left
|
|||
gfldex | r: gist.github.com/2519842 | 15:33 | |
p6eval | rakudo 2a962e: OUTPUT«(signal SEGV)App::exit called» | ||
gfldex | that's bad, right? | ||
line 48 -> |$args # | is the offender | 15:34 | ||
15:38
eviltwin_b joined
|
|||
gfldex | changing -> |$args to -> $args? does segfault too | 15:38 | |
15:41
geekosaur left
|
|||
gfldex | and S06 states that -> |$args should work | 15:43 | |
arnsholt | jnthn: BTW, are argument types checked by Rakudo somewhere, or should Zavolaj do it itself? | 15:48 | |
15:48
Psyche^ joined
|
|||
TimToady | if you're calling C, it should just coredump :P | 15:49 | |
arnsholt | Dumping core makes everything better ^_^ | ||
jnthn | arnsholt: The current arrangement winds up with them getting shuffled straight off to the mapper. | 15:50 | |
moritz | arnsholt: I think checking the number of arguments shouldn't be too hard, and a good step to prevent the most commen segfaults | ||
jnthn | arnsholt: My plan is that Zavolaj will just do $cap ~~ $sig at some point. | ||
Apart from I didn't implement Signature.ACCEPTS(Capture) again yet. | |||
jnthn should really get around to that. | |||
Blocks on knowing a good way to do it :) | 15:51 | ||
arnsholt | Right. But that certainly sounds like a good approach =) | 15:52 | |
15:52
Patterner left
|
|||
moritz | fwiw the logic is there already, somewhere | 15:52 | |
jnthn | moritz: Is it? :) | ||
TimToady | I dunno, it seems like the sig should be involved in marshalling the args | ||
jnthn | moritz: If you mean "do what ng did" then NO NO NO NO | 15:53 | |
TimToady: It's introspected and used to feed the marshaller. | |||
moritz | the MAIN helper checks if any MAIN can be called with a given capture | ||
15:53
spaceships joined
|
|||
TimToady | introspection == design smell | 15:53 | |
jnthn | TimToady: This is EXACTLY THE RIGHT USE FOR IT. | ||
It basically does a .params.map to map them towards the thing the NQP NativeCall stuff in C land wants as in put. | 15:54 | ||
*input | |||
TimToady | so why can't the marshaller check it then | ||
jnthn | It could, it's just duplicate work. | ||
TimToady | so's calling ACCEPT | ||
jnthn | As in, we shouldn't implement signature binding in the marshaller, it just call .ACCEPTS to do it. | 15:55 | |
TimToady | maybe we're in violent agreement here | ||
jnthn | No, the design of what's there now assumes that "I have a Capture in the right shape" | ||
What we're missing is asking the signature "do you accept this capture" | |||
jnthn did design these pieces to fit together :) | 15:56 | ||
TimToady tries to figure out some other way to torment jnthn++ | |||
jnthn | TimToady: While we're on this though...guess I can ask something useful: would you expect a Signature to always be mapped back to a scope that it's a signature for? | 15:57 | |
At the moment, I have a Code Object -> Signature reference. | |||
Should there be something back the other way? | |||
TimToady | depends on the declarator, I'd think | 15:58 | |
jnthn | If yes, then the main implication is that a signature literal in code also implies generating a hidden-away Code object. | ||
TimToady | a bare :() doesn't map to anywhere | ||
a my () does | |||
jnthn | If it does that, then we have a lexpad in the right shape to feed the signature binder to. | ||
s/ to.// | |||
jnthn gets back to QAST, and will ponder that lot later... | 15:59 | ||
16:00
plobsing_ left
16:01
lichtkind joined
16:06
leprevost joined,
Psyche^ is now known as Patterner
16:07
oiig_ left,
leprevost left
|
|||
gfldex | r: gist.github.com/2519842 | 16:07 | |
p6eval | rakudo 2a962e: OUTPUT«(signal SEGV)» | ||
gfldex | masak: could you add gist.github.com/2519842 to RT112666 please? | ||
masak | gfldex: will do. | 16:08 | |
"While eating food and having a good time is useful and commendable, it also shows something about what the current focus of the team is oO" -- www.reddit.com/r/perl/comments/sm7c...was_a_cup/ | |||
this is probably the strangest criticism of the Perl 6 effort I've ever seen. | |||
I can only presume it comes from someone who doesn't eat food and have a good time. | 16:09 | ||
gfldex | you may want to tell that gerdr person how much money you take the a man hour | 16:10 | |
masak | the things I want to tell that gerdr person makes other parts of my brain override my reddit commenting privs ;) | 16:11 | |
jnthn | masak: If I didn't ever eat food and have a good time, I guess I'd have some strange views on stuff too :) | 16:12 | |
masak | but yeah, I can see the meta-message clearly: it's taking a long time. people are fidgety, especially outsiders who are looking in and seeing a partial view. | ||
arnsholt | I'm not sure I've made Zavolaj quite ready to talk to Mongrel2 yet, but oh well =) | 16:13 | |
masak | in my humble opinion, a hackathon is *such* a morale-booster, that the net productivity easily offsets both time taken off for coding dojo and for eating Vietnamese and generally having a good time. | ||
jnthn | Not to mention that a bunch of useful discussions happened over food anyway. | 16:14 | |
masak | perhaps if people were emotionless code-spewing robots, I might agree more. | ||
arnsholt | Having talked to people in meat-space is invaluable IMO | 16:15 | |
jnthn | arnsholt: Very much so. | ||
The bandwidth is vastly superior to what you get here. | |||
TimToady | people always falling into either/or thinking, except when they don't | 16:16 | |
*fall | |||
16:16
allbery_b joined
|
|||
TimToady | Either people fall into either/or thinking, or they don't... | 16:17 | |
arnsholt | Would replacing recursive descent parsing be such a huge memory win though, as chromatic seems to suggest? | ||
jnthn | I find recursive descent a misleading characterization. | 16:19 | |
flussence | .oO( chromatic made a constructive suggestion? I thought he was just sandbagging the conversation to try and make people agree with him again. ) |
||
16:19
eviltwin_b left
|
|||
jnthn | Recursive descent in the traditional sense doesn't do any of the declarative prefix / LTM stuff. | 16:20 | |
arnsholt | There's that as well | ||
TimToady | I think the real underlying point is that you can parse a single language faster than many languages, but this is taking the lesson backwards. | 16:21 | |
lalr and such is a useful optimization for a given langauge | |||
but our problem is that we're recalculating the set of languages over and over | |||
as a degenerate case, if you know the language hasn't changed, and the program hasn't changed, you can compile instantly | 16:22 | ||
arnsholt | True, true. Also the horrid horrid error reporting characteristics of LALR, if you ask me | ||
TimToady | partial recompilation is another way to slice it | ||
yes, error reporting was a big reason, but that doesn't prevent it from being a useful optimization | 16:23 | ||
you just regress to recursive descent if the bottom up fails | |||
arnsholt | Oh, that's a nifty idea | 16:24 | |
But I'm not sure I'd want to implement it =) | |||
TimToady | STD used to cache a set of common languages from run to run, but we dropped that somewhere along the way | 16:25 | |
16:26
Guest77831 is now known as x3nU
16:28
geekosaur joined
16:30
allbery_b left
16:31
eviltwin_b joined
16:32
birdwindupbird left
16:33
huf left
16:34
geekosaur left,
huf joined
16:43
bruges_ is now known as bruges
16:49
uvtc joined
16:50
allbery_b joined
|
|||
uvtc | Was happy to discover a link to Damian's "Perl 6 Update" talk. Added a link to it at <wiki.perl6.org/Categorized%20Extern...ideos>. Can anyone point me to any other "must-watch" Perl 6 videos/recorded-talks that we could link to? | 16:51 | |
16:51
allbery_b left
16:53
eviltwin_b left
|
|||
moritz | uvtc: if you can find any recording of jnthn++'s talk on Signatures, that would be really worth it | 16:54 | |
www.youtube.com/watch?v=dOsfmeWlw-U and www.jnthn.net/articles.shtml | 16:55 | ||
uvtc | moritz, I'd look for that at <www.jnthn.net/articles.shtml>, but the white-on-black colorscheme is burning my retinas. | 16:56 | |
:) | |||
moritz | uvtc: then turn down the brightness of your screen :-) | 16:57 | |
masak .oO( we give the people awesome presentations. the people complain about the color scheme. ) | |||
uvtc | Get off my lawn! | 16:58 | |
:) | |||
masak | what, you had horrible color schemes long before we did? :P | ||
jnthn reads console output and IRC with white on black all day... | |||
masak | white on black is the new black. | 16:59 | |
uvtc | masak, Oooh, that hurts. :) I happen to like low-contrast... | ||
masak | uvtc: I've never understood a preference for low-contrast. ever since I realized that high contrast improves readability, I've preferred high contrast. | ||
but it's a "de gustibus" thing, I know. | 17:00 | ||
jnthn has an eyesight condition that makes high-contrast desirable, which no doubt influences things he makes | |||
17:00
JimmyZ left
|
|||
masak prefers black on #ffd | 17:00 | ||
takes the edge off the white. | |||
jnthn | I tend to do something like that for presentations. | 17:01 | |
uvtc | I've been using this #222 on #f8f8f8 for example: www.unexpected-vortices.com/doc-not...cters.html and it feels just right. But everyone's {monitor,eyes,ambient lighting} is different. | 17:02 | |
17:02
preflex left
17:04
preflex joined
|
|||
masak | I suspect even #222 would be too un-black for my tastes. | 17:05 | |
it's just at the limit, I think. #111 is fine, #333 is already too bright. | 17:06 | ||
17:10
alvis` left
17:11
sporous left,
sporous joined
17:12
preflex_ joined,
preflex left
17:13
preflex_ is now known as preflex,
mucker joined
17:14
vlixes left
|
|||
flussence | all this talk of hex triplets just led to me finding a completely impractical feature in the webkit DOM inspector: you can press (↑|↓) to change numbers by 1 and shift+(↑|↓) to change them by :$base(10), which lets you play with the green/blue on colours in realtime. There doesn't seem to be a way to do :$base(100) though :( | 17:16 | |
masak | heh, people keep expecting :$var(100) to mean "the digits '100' interpreted in base $base"... :) | 17:20 | |
au | flussence: shift-fn- (↑|↓) wfm here | 17:21 | |
phenny | au: 18 Apr 14:53Z <[Coke]> tell au if you do add something for bless or anythign else, be sure to do a spectest first; I found some (to me) surprising) breakage, especially missing multi variants. | ||
au: 20 Apr 22:52Z <[Coke]> tell au I tried to add a ".Str" that could be invoked as a method on .Str, but my naive patch (now reverted) caused a conflict with the bare {{ Str }}; the table in Prim.hs doesn't seem to be able to handle aliases, so I can't say Str is the same as ~; so I tried to find where I could add a method to Any; couldn't see anything obvious (to a non haskell me) , but found Prelude.pm - figured that would be great, I can write it in | |||
au: 20 Apr 22:57Z <[Coke]> tell au at some point I realized if I did it for Str, I was just going to have to do it for all of the Cool types, so, lacking Cool, figured I'd just try to add it to Any. | |||
au | flussence++ # neat discovery | 17:22 | |
moritz | masak: I think that was metasyntactic :-) | 17:23 | |
masak | note to self: say that next time I write something that doesn't parse. :P | 17:27 | |
uvtc | moritz, thanks for that link to jnthn's talk, btw. link added. | 17:28 | |
masak | au! \o/ | ||
jnthn | There was a video of a talk I did some time in Oslo too | 17:33 | |
At NUUG | |||
Which I think was vaguely interesting. | |||
flussence | ooh, page up/down. figures I'd miss something obvious :) au++ | 17:34 | |
au | \o/ | ||
masak | that has a certain strange consistency to it. | 17:36 | |
gfldex | r: sub foo(Int $i, Str $s){}; sub bar(Int $i, Str $s){}; say &foo.signature ~~ &bar.signature; | ||
p6eval | rakudo 2a962e: OUTPUT«False» | ||
gfldex | NYI? | 17:37 | |
moritz | correct | ||
it falls back to Any ~~ Any | |||
which in turn falls back to === | |||
gfldex cant wait for Christmas | |||
moritz | me neither. Which is why I've stopped waiting :-) | 17:38 | |
17:38
birdwindupbird joined
|
|||
moritz | life is much more pleasant when you live in the present | 17:38 | |
17:38
fhelmberger left
|
|||
arnsholt | moritz: Where were we with sqlite again? | 17:39 | |
moritz | arnsholt: Malformed UTF-8 string | ||
flussence | p6: sub foo(Int $i, Str $s){}; sub bar(Int $i, Str $s){}; say &foo.signature.perl ~~ &bar.signature.perl; | ||
p6eval | pugs: OUTPUT«1» | ||
..niecza v16-23-gaa61ed5: OUTPUT«Potential difficulties: $i is declared but not used at /tmp/dXBSdfR6U2 line 1:------> sub foo(Int ⏏$i, Str $s){}; sub bar(Int $i, Str $s){} $s is declared but not used at /tmp/dXBSdfR6U2 line 1:------> sub foo(Int $i, Str [33… | |||
..rakudo 2a962e: OUTPUT«True» | |||
moritz | arnsholt: but often works with valgrind | ||
arnsholt: valgrind reports invalid reads | |||
flussence | n: sub foo(Int $, Str $){}; sub bar(Int $, Str $){}; say &foo.signature.perl ~~ &bar.signature.perl; | ||
p6eval | niecza v16-23-gaa61ed5: OUTPUT«True» | ||
flussence | there you go, workaround :) | 17:40 | |
arnsholt | Hmm. Right | ||
arnsholt valgrinds the test file | 17:43 | ||
dalek | p/toqast: 7da93fd | jnthn++ | src/QAST/Compiler.nqp: Correct misleading name. |
17:45 | |
p/toqast: 6980843 | jnthn++ | src/QAST/Operations.nqp: Implement operations if and unless; give them what should hopefully be decent native handling also. Can be optimized further for void context. |
|||
p/toqast: 115c75c | jnthn++ | t/qast/qast.t: Tests for if/unless on IVal. |
|||
arnsholt | moritz: Something's fishy with CArray and CPointer, I think | 17:53 | |
moritz | arnsholt: yes, probably | 17:54 | |
arnsholt: btw do we support stuff like a pointer do a double? | 17:55 | ||
arnsholt | I get two reads of the same pointer, just off the end of a block of 16 bytes | ||
Hmm. I wonder how large a CPointer body is | |||
arnsholt goes to look | 17:56 | ||
Hmm. SixModelObjectCommonalities is 16 bytes | 17:57 | ||
Oh! Maybe I've got a non-concrete CPointer object in child_objs | |||
moritz | arnsholt: and if you look for some inspiration, that's what we need to model for mysql using prepared statements and bind params: gist.github.com/2520846 | 17:58 | |
I wonder if it might be easier to write C functions that fill (and possibly read) them | 17:59 | ||
arnsholt | Hmm. Sized ints, unsigned might not be too hard | ||
Callbacks are a bit off though I think | 18:00 | ||
moritz | I think we can use NULL Pointers there for now | ||
arnsholt | jnthn: What kind of object is passed around in the C code for a non-concrete object? | ||
(If that makes any kind of sense to you) | 18:01 | ||
If it didn't: What kind of structure is the C-side representation of a non-concrete object? | |||
moritz | you mean, a type object? | 18:02 | |
arnsholt | Yeah | 18:03 | |
Cuz if it's just the SixModelObjectCommonalities, that explains a lot =) | 18:05 | ||
jnthn | type objects map to NULL | ||
Oh, wait, you mean... | |||
What does a type object actually have? | |||
In that case, yes, just the stuff in SixModelObjectCommonalities. | |||
Which means, an st and and sc. | |||
arnsholt | Right. Now I know what to fix | 18:07 | |
jnthn | OK :) | ||
arnsholt | Can't do it right now, but I'll get to it relatively soon | ||
Yay =) | |||
jnthn | class A { has $.x } | 18:08 | |
^ the type object is allocated here | |||
So there's no way it could be allocated with storage space too :) | |||
uvtc | I've always installed R* in the past into my ~/opt dir (into its own directory, in fact), because I didn't want to have lots of files spread out into the /usr/local subdirs. In fact, I just added a wiki article about it: wiki.perl6.org/Local%20and%20Isolat...udo%20Star . But when I look now in the R* readme, there's no mention of /usr/local ... (instead, it now uses an install/ subdir?) | 18:09 | |
moritz | uvtc: it uses install/ by default, but you can change that with perl Configure.pl --prefix=/usr/local/ or so | 18:10 | |
sorear | goood * #perl6 | ||
moritz | \o sorear | 18:11 | |
uvtc | moritz, Oh, that's a really nice default. | ||
moritz | sorear: I just notice that I never welcomed you in #perl6. So, welcome :-) | ||
arnsholt | jnthn: Certainly an excellent point ^_^ | 18:12 | |
uvtc | moritz, that totally removes the motivation for wanting to install R* into its own separate dir. I'll delete that wiki article. Nice. Thanks. | ||
sorear | :p | 18:14 | |
dalek | href="https://modules.perl6.org:">modules.perl6.org: 6f3320d | moritz++ | web/build-project-list.pl: update Mojo::UserAgent usage, uvtc++ |
18:22 | |
moritz | uvtc: fwiw I chose a bit different approach here, which happens to be the one that the documentation uses :-) | 18:23 | |
sorear | I would like to point out that #112634 would be trivial if we used LR(k) grammars like the rest of the world does | ||
uvtc | moritz, The issue that previously came up with regard to an automated way to generate html from module's Pod, was that it's a potential security problem. That is, if you have feather git clone modules and run `perl6 --doc=html ...` on them, arbitrary code in various phasers could be a problem. Would this problem be solved if the perl6 process to generate html were run in a ... not sure of the correct terminology here... chroot jail? | 18:32 | |
Is it difficult (or has anyone) set up Rakudo to run in a sandbox like that? | 18:34 | ||
18:34
bbkr left
|
|||
flussence | I think feather3 serves that purpose atm - it runs try.rakudo.org occasionally | 18:35 | |
that about as "arbitrary remote code execution" as you can get... | |||
uvtc | tadzik, ^^ | 18:36 | |
I wrote a similar sort of script (in another language, for another language), but all it does is: grab code from github, generate the docs, copy them to a web dir, and update the main index pointing to what docs are in the web dir. | 18:37 | ||
phenny, tell tadzik irclog.perlgeek.de/perl6/2012-04-28#i_5511648 | 18:44 | ||
phenny | uvtc: I'll pass that on when tadzik is around. | ||
uvtc | phenny, tell moritz irclog.perlgeek.de/perl6/2012-04-28#i_5511648 | ||
phenny | uvtc: I'll pass that on when moritz is around. | ||
18:44
uvtc left
18:49
kaare__ joined
18:51
NamelessTee joined
18:52
kaare_ left
18:54
kaare__ left
|
|||
gfldex | r: class A { our method b (Int $i) {} }; &A::b.wrap(sub (*@args){ say @args.elems } ); A::b(1); my $a = A.new; $a.b(1); | 19:01 | |
p6eval | rakudo 2a962e: OUTPUT«12» | ||
gfldex | why is there a difference? | ||
nvm | |||
moritz | the invocant :-) | 19:02 | |
phenny | moritz: 18:44Z <uvtc> tell moritz irclog.perlgeek.de/perl6/2012-04-28#i_5511648 | ||
19:03
geekosaur joined
|
|||
masak | r: class A { our method b (Int $i) {} }; &A::b.wrap(sub (*@args){ say @args.elems; callsame } ); A::b(1) | 19:04 | |
p6eval | rakudo 2a962e: OUTPUT«1Nominal type check failed for parameter ''; expected A but got Int instead in method b at /tmp/HxslAuHhLO:1 in any call_with_capture at src/gen/Metamodel.pm:2614 in block <anon> at src/gen/CORE.setting:407 in sub <anon> at /tmp/HxslAuHhLO:1 in any enter… | ||
19:12
GlitchMr left
19:13
mucker left
19:26
cognominal_ left
19:29
cognominal joined
19:30
alvis joined
|
|||
masak | hey, can the well-known formula in en.wikipedia.org/wiki/Fibonacci_num...expression be done with just integers? | 19:40 | |
I mean, complex numbers are just numbers on the form a + b sqrt(-1), right? | |||
could one create a custom class representing numbers on the form a + b sqrt(5), and define addition, multiplication, and division such that one never has to use floating-point numbers to calculate fibonacci numbers? | 19:41 | ||
19:42
preflex_ joined
|
|||
moritz knows an integer-only representation that can calculate fibonacci numbers :-) | 19:42 | ||
colomon | you can certainly create a class representing numbers of the form a + b * sqrt(5) | ||
19:42
eviltwin_b joined,
preflex left
|
|||
moritz | masak: the problem is just that raising a number to the power needs seem kind of iteration | 19:43 | |
19:43
preflex_ is now known as preflex
|
|||
masak | that's fine. | 19:43 | |
moritz | masak: so calculating that power boils down to the well-known iteration formula, if you are lucky. And to something more complex in the worse case | ||
masak | nod. | 19:44 | |
it's a mental exercise, not an optimal solution. | |||
colomon is very fuzzy on how a + b * sqrt(5) is useful in this context, though.... | |||
masak | colomon: all terms in that formula are on that form. | ||
moritz | modulo the /2 at the end :-) | 19:45 | |
masak | no, that's also on that form :) | ||
oh wait. | |||
yeah, I see what you mean. | |||
19:45
geekosaur left
|
|||
masak | so maybe the integers should represent halves... :) | 19:45 | |
(this is inspired by github.com/raganwald/homoiconic/bl...bonacci.md , by the way) | 19:46 | ||
colomon | it doesn't really help, does it? | ||
(I mean, adding halves) | 19:47 | ||
moritz | right, you need to store numbers of the form (a + sqrt(5) * b ) / 2**c | ||
masak | oh, indeed. | 19:48 | |
so its representation is a triple... | |||
colomon | but it's not closed or anything like that, is it? | ||
masak | yes, and that's my point. | 19:49 | |
(but I missed the /2) | |||
colomon | I mean, multiplying two Fib numbers doesn't necessary give you another Fib | ||
masak | no, but this field is bigger than just the fibs. | ||
moritz | but adding two gives you one :-) | ||
erm, not always | |||
never mind :-) | |||
masak | :P | ||
(a + bq)(c + dq) = ac + adq + bcq + 5bd = (ac + 5bd) + (ad + bc)q, and the latter is also part of the set. | 19:50 | ||
19:50
aindilis joined,
xinming joined
|
|||
masak | so these Q numbers are closed under multiplication. | 19:51 | |
the above again ignores the /2**c, but you can add it in and it'd still be closed, since it's just a power of 1/2. | |||
colomon | sure, a + b sqrt 5 (with a, b integers) is a perfectly reasonable set of numbers. (Is it a field?) | ||
masak | I wouldn't be surprised. | ||
sorear | yes, it is a field | 19:52 | |
masak | yes. | ||
colomon | sorear! \o/ | ||
masak | sorear! \o/ | ||
sorear | sqrt(5) is an algebraic number of degree 2 | ||
19:52
allbery_b joined
|
|||
sorear | if X is an algebraic number of degree N, you can get a field from the basis X^i for i \in [0,N) | 19:52 | |
masak | "degree 2" because you can get a rational root with a degree-2 polynomial? | 19:53 | |
sorear | yes | ||
19:54
xinming_ left
|
|||
masak can barely keep up with sorear if he's allowed to peek at Wikipedia ;) | 19:54 | ||
s/barely/just barely/ | |||
sorear | wikipedia's Galois theory materials suck | ||
I'd loan you my book if you were local | |||
it's suprisingly thin | |||
masak | I've always wanted to grok Galois theory. | ||
colomon is delighted that in this case he can follow sorear without externals aids. :) | |||
masak | yeah, I follow too now. it looks like a pretty result. | 19:55 | |
19:55
eviltwin_b left
|
|||
masak | look at that, that's beaooootiful: en.wikipedia.org/wiki/File:Algebraicszoom.png | 19:56 | |
sorear | however, there is an IMO much nicer way to get fibonacci numbers, without fussing with Galois theory or square roots of 5 | ||
first, consider pairs of numbers | |||
moritz | sorear: the matrixy stuff? | ||
sorear | yes, matrixes | ||
masak | right. that URL I posted did that. | 19:57 | |
sorear | there's a nice optimization of the matrix approach - the calculation never leaves a 2-dimensional subalgebra spanned by the initial matrix and I | ||
masak | ooh | ||
sorear | so you only need to track two coefficients, not 4 | 19:58 | |
masak | right. | ||
sorear | I beleive this is closely related to the HAKMEM algorithm | ||
which also uses a 2-dimensional algebra, but with less details | 19:59 | ||
masak | HAKMEM++ | 20:00 | |
moritz | masak: gist.github.com/2521684 | 20:01 | |
masak: it cheats at the end | |||
20:02
geekosaur joined
|
|||
colomon | class AN does Real .... ;) | 20:04 | |
moritz | colomon: NOOO :-) | ||
20:04
ggoebel__ left
|
|||
colomon | moritz: you know you want to do it.... | 20:04 | |
.... before I can. ;) | |||
20:05
allbery_b left
|
|||
moritz | the point is to never go through .Real or .Numeric or .Num | 20:05 | |
gist.github.com/2521684 udpated | 20:06 | ||
now without the cheaty parts | |||
20:06
ggoebel__ joined
|
|||
colomon | errr, confusion between a and b? | 20:06 | |
moritz | where? | 20:07 | |
colomon | Intize seems to assume b is the integer part, but your defining comment assumes it is a | ||
moritz | colomon: Intize is not Int | ||
colomon: it tries to extract an exact integer by dividing by sqrt(5) | 20:08 | ||
masak | moritz++ | ||
colomon | oh. okay, then, LTA method naming is my complaint. ;) | ||
moritz | because fib(n) = (phi**n - psi**n) / sqrt(5) | ||
colomon: better method names welcome :-) | |||
masak | I think .Int would've been fine in the end, since it's custom for the class ;) | 20:09 | |
what does AN stand for? | |||
moritz | but it's not the int representation of that number | ||
colomon | AFK | 20:10 | |
moritz | my previous method name was Int-by-div-sqrt5 | ||
sorear | What if, instead of the ring Q[sqrt(5)], you used Q[phi]? | 20:11 | |
masak | ok, I see. | ||
tadzik | 'evening | 20:13 | |
phenny | tadzik: 18:44Z <uvtc> tell tadzik irclog.perlgeek.de/perl6/2012-04-28#i_5511648 | ||
masak | tadzik! \o/ | ||
tadzik | \o/ | ||
did I miss anything cool? | 20:14 | ||
moritz | r: gist.github.com/2521684 | ||
p6eval | rakudo 2a962e: OUTPUT«21» | ||
moritz | tadzik: just a complicated way to calculate fibonacci numbers :-) | 20:15 | |
tadzik | eek | ||
well, 46 lines > 10 characters :) | |||
moritz blames masak | |||
masak | hee hee | ||
tadzik | :) | ||
moritz | masak: oh, and for calculating fibonacci numbers you can actually leave out c | 20:17 | |
masak | oh! yes. | ||
moritz | in this calculation, b == 0 mod 2 ** (c -1) always holds | ||
masak | nod. | 20:18 | |
hm, phi**2 = (1 + q)**2/4 = (1 + 2q + 5)/4 = (6 + 2q)/4 = (2 + 2q)/4 + 4/4 = phi/2 + 1 | |||
so (a + b phi)(c + d phi) = (ac + bd) + (bc + ad + bd/2) | 20:19 | ||
interesting algebra :) | |||
er, last paren times phi, 'course. | |||
(a + b phi)(c + d phi) = (ac + bd) + (bc + ad + bd/2) phi | 20:20 | ||
colomon | tadzik: you need to regenerate the Emmentaler page -- I keep on fixing modules. ;) | 20:23 | |
tadzik | hehe, right | ||
you can run it too :) | 20:24 | ||
moritz | how long does a run take? | ||
tadzik | <20 mins on my laptop | ||
colomon | tadzik: you shouldn't be tempting me to make it a local cron process. | 20:26 | |
tadzik | I don't need to. You already want it :) | 20:27 | |
jnthn | Where was the Emmentaler page again? | ||
Is it somewhere pernament enough we can link to it from modules.perl6.org? | |||
moritz | or I can make cheese.perl6.org redirect to it | 20:28 | |
jnthn | \o/ | ||
tadzik | it's currently tjs.azalayah.net/new.html, but it's just a place where I scp an html file | ||
I should move it to its repo | 20:29 | ||
I should have a handful of tuits tomorrow | |||
20:32
lichtkind_ joined
|
|||
lichtkind_ | what actually is the Iterator object type, in description stand just "Perl list"? | 20:33 | |
20:33
x3nU is now known as xenu
|
|||
dalek | p/toqast: c0b439f | jnthn++ | src/QAST/Compiler.nqp: Sketch in a BlockInfo to track per-block compilation state; tracker outer chain. |
20:33 | |
p/toqast: 16319cd | jnthn++ | src/QAST/Compiler.nqp: Start sketching out QAST::Var; not enough to do anything useful yet. |
|||
20:34
fglock left
|
|||
masak | sorear: phi is a degree-2 algebraic number too, right? | 20:35 | |
sorear: that bd/2 term causes me trouble. set b=d=1, and it comes out 1/2, which means I can't just use integers and get closure under multiplication. | 20:37 | ||
20:39
geekosaur left
|
|||
dalek | Iish/mysql-prepared: 29717ac | moritz++ | CREDITS: typo |
20:41 | |
Iish/mysql-prepared: 385fb81 | moritz++ | lib/DBDish/mysql.pm6: [mysql] some preparations for prepared statements |
|||
Iish/mysql-prepared: 1cba5bf | moritz++ | lib/DBDish/TestMock.pm6: add missing TestMock.pm6 file, torehaug++ |
|||
20:41
uvtc joined
|
|||
uvtc | tadzik, hi | 20:41 | |
20:41
geekosaur joined
|
|||
tadzik | hi uvtc | 20:43 | |
uvtc | Earlier I was asking about running `perl6 --doc=html ...` in a sandbox to generate docs for modules.perl6.org. I've been learning Clojure, and wrote a little script to do something for clojure libs (but in Python). It's at <github.com/uvtc/petit-lorange>. | ||
tadzik | yeah, seen that | ||
sandboxing is probably the way to go, yes | |||
dalek | Iish/mysql-prepared: a138cc5 | (Tore Haugland)++ | t/10-mysql.t: Fixed missing $database parameter to connect calls for two tests. Changed values of raiseerror from int to bool |
||
masak | who's Tore Haugland? | ||
tadzik | after integrating Emmentaler with modules.perl6.org somehow the next plan is to add some documentation to it as well | 20:44 | |
masak | yay | ||
uvtc | regardin Emmentaler, I think the table would look nicer (it would be wider) if the camelia logo had a <br/> after it. | ||
s/regardin/regarding/ | 20:45 | ||
tadzik, what does "Emmentaler" mean? | |||
tadzik | uvtc: it's a kind of cheese | ||
also, ask masak, it's his idea :) | |||
uvtc | mmmm.... cheeese.... | ||
tadzik | uvtc: re layout, I'm no HTML wizard, I first stole the HTML from perl6.org, then from perl6.org/compilers/features | 20:46 | |
dalek | Iish: 29717ac | moritz++ | CREDITS: typo |
||
Iish: 385fb81 | moritz++ | lib/DBDish/mysql.pm6: [mysql] some preparations for prepared statements |
|||
Iish: 1cba5bf | moritz++ | lib/DBDish/TestMock.pm6: add missing TestMock.pm6 file, torehaug++ |
|||
Iish: a138cc5 | (Tore Haugland)++ | t/10-mysql.t: Fixed missing $database parameter to connect calls for two tests. Changed values of raiseerror from int to bool |
|||
uvtc | I only mention that little petit-lorange script because I think something like that would work for modules.perl6.org. | ||
tadzik, I'm no html wizard either. (In fact, I'm actually the one who added the logo to the features page :) ) | 20:47 | ||
Ooops. Gotta go. Glad to hear about docs for modules.perl6.org being on the todo list. Bye. o/ | |||
20:47
uvtc left
|
|||
sorear | masak: yes, phi^2 - phi - 1 = 0 | 20:48 | |
masak | right. | 20:49 | |
phenny: tell uvtc that in my second talk ever, masak.org/carl/npw2009-november/talk.pdf -- I used a metaphor with Rakudo being a cheese with holes that we find by running the spectests, or by writing applications. this led to "Rakudo cheese" and "app cheese" being synonymous with testing Rakudo and the app space, respectively. hence, Emmentaler. | 20:50 | ||
phenny | masak: I'll pass that on when uvtc is around. | ||
masak | that talk is probably still my most appreciated talk, ever. I don't know how that happened. | 20:51 | |
I think it's because the audience was sitting really close, and it became cozy-like. | 20:52 | ||
jnthn remembers that workshop :) | 20:54 | ||
It was on the top story of a fairly tall building. | |||
So there was a nice view. | |||
20:56
jferrero joined
20:57
birdwindupbird left
20:59
eviltwin_b joined
21:02
geekosaur left
|
|||
masak | there was indeed. | 21:03 | |
I met a wild-eyed guy with messy hair at that workshop. I asked him "who did you say you were, again?" he said "I'm mst!" | 21:04 | ||
jnthn | :) | ||
And then there was the rooftop beer party... | 21:05 | ||
masak | hm, I musta been not drinking beer back then. | 21:06 | |
but I remember Gloria. :) | |||
she had TimToady whistle. :) | |||
lichtkind_ | mst rocks | ||
i like him | |||
masak | deep inside mst, there's a very nice person... because mst ate that person. :P | 21:07 | |
no, he's a hoopy frood, srsly. I just don't think he'll ever be a Perl 6er. | 21:08 | ||
I'm willing to be proven wrong, though. | |||
jnthn | masak: No, you didn't start on beer until you came to work at the same $dayjob place as me :P | 21:10 | |
dalek | p/toqast: 7179ed3 | masak++ | src/QAST/Operations.nqp: added the neg_i operation All tests in t/qast/qast.t now pass. |
21:11 | |
jnthn | .oO( now the test file ain't qass ) |
||
masak | jnthn: right, and this was 2009. | ||
21:17
[Coke] left,
[Coke] joined
|
|||
dalek | blets: 33a5516 | (Herbert Breunung)++ | docs/appendix- (2 files): add backlinks for grammatical categories and added these of the regex slang into Index A |
21:17 | |
21:27
allbery_b joined
|
|||
dalek | blets: b6abc8f | (Herbert Breunung)++ | docs/appendix- (2 files): backlink introspection methods |
21:29 | |
21:30
NamelessTee left,
eviltwin_b left
21:34
PacoAir left
|
|||
gfldex | i iz propaganda cat i tellz troof: gfldex.wordpress.com/2012/04/28/sig...-the-pros/ | 21:39 | |
masak | gfldex++ | 21:41 | |
gfldex: that last bit of wish-code 'connect(&$input.sig_changed, &$data.set_age);' makes no sense whatsoever. | 21:44 | ||
if I were you, I'd remove it from an otherwise excellent post. :) | |||
jnthn | masak: gfldex++ is hungering for a nice way to do a method dispatch but not actually dispatch, just get what we would dispatch to, I guess. | 21:45 | |
masak | yep, I get that. | ||
gfldex | i will leave it or i will forget about it | ||
masak | but the syntax he proposes is insane :) | ||
it... I... | |||
jnthn | masak: :) | ||
masak: Relax. :) | |||
gfldex | i'm not going to force you to use that syntax | ||
jnthn | masak: We don't actually *have* a good syntax for it at the moment though. | ||
masak | right, I know. | 21:46 | |
but that's not gonna be it, I can tell you that. | |||
jnthn | The right way involves a .^find_method | ||
No, there's a lot of reasons why it can't be the one in the post. | |||
gfldex | connect($sender, 'signal', $receiver, 'slot'); # is ugly | 21:47 | |
masak | I hear ya. | 21:48 | |
diakopter | I'll send your slot | ||
masak | gfldex: as an interim, you could define a class which holds an object and a method name. | 21:49 | |
and then an operator which creates that pair. | |||
gfldex | one thing I found strange (beside the segfault) is that when I do connect($obj, &Obj::wrong_method_name, $obj2, &Obj2::wrong_too);# rakudo complained fairly late | ||
masak | connect($sender :. 'signal', $receiver :. 'slot') | 21:50 | |
21:51
Patterner left
|
|||
jnthn | masak: Weren't we meant to be making it less ugly? :P | 21:51 | |
masak | or, hm, you could mix in a role to all classes that overrides postcircumfix:<( )> | ||
connect($sender<signal>, $receiver<slot>) | |||
I don't think it gets much prettier than that ;) | |||
jnthn | omg... | ||
gfldex | connect($sender, signal, $receiver, slot); # is something i would be happy with and what works with Qt thanks to the formidable c preprocessor | 21:52 | |
jnthn | You can do that with a textual macro I guess. | ||
gfldex | that's how they do it | ||
masak | yeah. I'll have no part in it. | ||
jnthn | masak: Oh come on, you know you want to... :P | ||
21:52
Psyche^ joined
|
|||
masak | I'm not insane enough yet to want it. | 21:52 | |
but I meant, I don't think it's a good solution API-wise in this case. | 21:53 | ||
or most of the time, really. | |||
gfldex | $receiver<slot> would either involve macros too or require changes to the slot | ||
masak | it breaks Least Surprise in a big way. | ||
gfldex | and i actually like it that you don't have to do anything at the slot side | ||
jnthn | Yeah, I like the loose coupling in this. | ||
masak | I didn't follow the bit that says it involves macros or requires changes to the slot. but never mind. | 21:54 | |
gfldex | you either untangle $receiver and <slot> with a macro or you mixin postcircumfix:< < > > (or however that is spelled) into the slot | 21:55 | |
what would be easy ofc | 21:56 | ||
dalek | blets: 36e9c52 | (Herbert Breunung)++ | docs/appendix- (2 files): backlink metaops |
21:57 | |
masak | r: class ObjSlot { has $.obj; has $.slot }; class Obj { method postcircumfix:<( )>($slot) { ObjSlot.new(:obj(self), :$slot) }; my Obj $o .= new; say $o<slot> | 21:58 | |
p6eval | rakudo 2a962e: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 2» | ||
masak | r: class ObjSlot { has $.obj; has $.slot }; class Obj { method postcircumfix:<( )>($slot) { ObjSlot.new(:obj(self), :$slot) } }; my Obj $o .= new; say $o<slot> | ||
p6eval | rakudo 2a962e: OUTPUT«postcircumfix:<{ }> not defined for type Obj in method gist at src/gen/CORE.setting:8667 in sub say at src/gen/CORE.setting:6555 in block <anon> at /tmp/unmjfs8D3g:1» | ||
masak | r: class ObjSlot { has $.obj; has $.slot }; class Obj { method postcircumfix:<{ }>($slot) { ObjSlot.new(:obj(self), :$slot) } }; my Obj $o .= new; say $o<slot> | ||
p6eval | rakudo 2a962e: OUTPUT«ObjSlot.new(obj => Obj.new(), slot => "slot")» | ||
masak | that's how I meant. | ||
22:07
ponbiki joined
22:10
ponbiki left,
ponbiki joined
22:14
lichtkind left
22:16
Psyche^ left
22:19
allbery_b left,
geekosaur joined
22:27
Psyche^ joined
22:29
Psyche^ is now known as Patterner
|
|||
masak | 'noight, #perl6 | 22:33 | |
22:36
eviltwin_b joined,
jferrero left
22:37
FACEFOX-DOT-COM left
22:39
geekosaur left
22:43
FACEFOX-DOT-COM joined,
FACEFOX-DOT-COM left
22:48
ponbiki left
22:51
FACEFOX-DOT-COM joined,
FACEFOX-DOT-COM left
22:52
uvtc joined
|
|||
uvtc | What exactly does "hai" mean? translate.google.com tells me it's "shark" in german. | 22:54 | |
phenny | uvtc: 20:50Z <masak> tell uvtc that in my second talk ever, masak.org/carl/npw2009-november/talk.pdf -- I used a metaphor with Rakudo being a cheese with holes that we find by running the spectests, or by writing applications. this led to "Rakudo cheese" and "app cheese" being synonymous with testing Rakudo and the app space, respectively. hence, Emmentaler. | ||
jnthn | uvtc: as in, "oh hai"? | 22:55 | |
22:55
FACEFOX-DOT-COM joined
|
|||
uvtc | Yes. "oh shark!" | 22:55 | |
jnthn | uvtc: No, it's just a deliberate misspelling of "hi", as in "hello" :) | ||
uvtc | Ah. thanks, jnthn | ||
tadzik, please forget what I said about "just adding a <br/> to Emmentaler to get the table to display right". I'm not an html designer, but I sometimes and caught playing one on TV. | 22:56 | ||
tadzik, though, it might all work out right if you added a legend, like the feature comparison matrix has. | 22:58 | ||
22:59
geekosaur joined
23:02
eviltwin_b left
|
|||
uvtc | phenny, please tell masak Thanks for the link to the slides to your November talk. | 23:03 | |
phenny, tell masak Thanks for the link to the slides to your November talk. | |||
phenny | uvtc: I'll pass that on when masak is around. | ||
uvtc | phenny dispenses with the pleasantries. | ||
23:09
eviltwin_b joined
23:12
geekosaur left
|
|||
jnthn -> sleep o/ | 23:14 | ||
uvtc | phenny, tell tadzik irclog.perlgeek.de/perl6/2012-04-28#i_5512561 | 23:15 | |
phenny | uvtc: I'll pass that on when tadzik is around. | ||
23:15
uvtc left
23:30
sudokode left
23:53
allbery_b joined
23:55
eviltwin_b left
|