»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
colomon | m: say map *.base(36), ^50; | 00:00 | |
camelia | rakudo-moar ce2631: OUTPUT«0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D» | ||
grondilu | m: say "9" before "A" | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
grondilu | m: say "9" before "12" | ||
camelia | rakudo-moar ce2631: OUTPUT«False» | ||
grondilu | :/ | 00:01 | |
colomon | m: say "9" lt "12" | ||
camelia | rakudo-moar ce2631: OUTPUT«False» | ||
colomon | m: say "9" < "12" | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
grondilu wants to create a infinite list of strings in lexicographic order | 00:02 | ||
timotimo | colomon: just idly clicking around in the call graph shows that report-box-diff takes three times as report-attributes-diff, which takes a bit longer than report-coordinate-diff | ||
grondilu though 'map *.base(36), 1..*' would do | |||
*thought | |||
colomon | m: say ('a', *.incr … *)['1000] | 00:03 | |
camelia | rakudo-moar ce2631: OUTPUT«===SORRY!=== Error while compiling /tmp/pyucksOVDJTwo terms in a rowat /tmp/pyucksOVDJ:1------> say ('a', *.incr ⏏… *)['1000] expecting any of: method arguments postfix i…» | ||
colomon | m: say ('a', *.incr … *)[1000] | ||
camelia | rakudo-moar ce2631: OUTPUT«===SORRY!=== Error while compiling /tmp/UurNBZoh9nTwo terms in a rowat /tmp/UurNBZoh9n:1------> say ('a', *.incr ⏏… *)[1000] expecting any of: method arguments postfix in…» | ||
colomon | m: my $a = 'a'l; say ('a', $a++ … *)[1000] | ||
camelia | rakudo-moar ce2631: OUTPUT«===SORRY!=== Error while compiling /tmp/SyZHX12yrFTwo terms in a rowat /tmp/SyZHX12yrF:1------> my $a = 'a'⏏l; say ('a', $a++ … *)[1000] expecting any of: postfix infix stopper …» | ||
colomon | m: my $a = 'a'; say ('a', $a++ … *)[1000] | 00:04 | |
camelia | rakudo-moar ce2631: OUTPUT«===SORRY!=== Error while compiling /tmp/yQ9dEYFWGbTwo terms in a rowat /tmp/yQ9dEYFWGb:1------> my $a = 'a'; say ('a', $a++ ⏏… *)[1000] expecting any of: postfix infix stopper …» | ||
grondilu | m: say 'a', *.incr ... 'z' | ||
camelia | rakudo-moar ce2631: OUTPUT«===SORRY!===No such method 'incr' for invocant of type 'Str'» | ||
colomon apparently cannot type | |||
or remember method names | |||
m: say ('a', *.succ … *)[1000] | |||
grondilu | m: say 'a', *.succ ... 'z' | ||
camelia | rakudo-moar ce2631: OUTPUT«===SORRY!=== Error while compiling /tmp/F505gfDY1KTwo terms in a rowat /tmp/F505gfDY1K:1------> say ('a', *.succ ⏏… *)[1000] expecting any of: method arguments postfix in…» | ||
rakudo-moar ce2631: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z» | |||
colomon | m: say 'a', *.succ ... 'zz' | ||
camelia | rakudo-moar ce2631: OUTPUT«a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp …» | ||
grondilu | colomon++ | ||
colomon | errr, come to think of it though, that's not lexicographic order | 00:05 | |
00:05
erkan joined
|
|||
colomon | m: say ('a', * ~ 'a' … *)[100] | 00:06 | |
camelia | rakudo-moar ce2631: OUTPUT«===SORRY!=== Error while compiling /tmp/wPQ0476j8iTwo terms in a rowat /tmp/wPQ0476j8i:1------> say ('a', * ~ 'a' ⏏… *)[100] expecting any of: postfix infix stopper infix…» | ||
colomon | m: say 'a', * ~ 'a' … * | ||
camelia | rakudo-moar ce2631: OUTPUT«===SORRY!=== Error while compiling /tmp/8K_pNKBdcvTwo terms in a rowat /tmp/8K_pNKBdcv:1------> say 'a', * ~ 'a' ⏏… * expecting any of: postfix infix stopper infix or met…» | ||
grondilu | well, what I do want is my strings to be as small as possible, and still be in some order | ||
timotimo | that's right, aa comes after a, not after z | ||
colomon | ah, well there's a definite order to the *.succ strings, they're just not in lexicographic order | ||
grondilu | how could I use more characters than just 'a'..'z'? | 00:07 | |
00:07
gfldex left
|
|||
grondilu | and I do need an infix comparison operator, though | 00:07 | |
colomon | oh, that's easy | ||
m: say 45.char | 00:08 | ||
camelia | rakudo-moar ce2631: OUTPUT«No such method 'char' for invocant of type 'Int' in block <unit> at /tmp/F8MtE_QS0l:1» | ||
colomon | m: say 45.chr | ||
camelia | rakudo-moar ce2631: OUTPUT«-» | ||
colomon | m: say (32..100).map(*.chr) | ||
camelia | rakudo-moar ce2631: OUTPUT« ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d» | ||
colomon | m: say (32..1000).map(*.chr) | ||
camelia | rakudo-moar ce2631: OUTPUT« ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ ^H …» | ||
colomon | etc | ||
timotimo | colomon: which line does src/gen/m-CORE.setting:1096 correspond to on your build? | ||
colomon | guess you'll run out of unicode at some point | ||
grondilu | I want an infinite list | ||
timotimo | what about src/gen/m-CORE.setting:8118? | 00:09 | |
00:09
gfldex joined
|
|||
timotimo | you could write a class that does Positional and implement at_pos by doing .chr :P | 00:09 | |
colomon | grondilu: I have a notion for you, but I'm answering timotimo first | 00:10 | |
timotimo: 1096: multi method Stringy(Mu:D $:) { self.Str } | |||
timotimo | huh, i wonder why that doesn't get spesh'd | ||
grondilu | :/ that would be a hassle. I don't get why '[before] *.base(36), 0..*' doesn't work :/ | ||
colomon | timotimo: 8118: GatherIter, $state := { | ||
timotimo | and what does it need the $ for? | ||
colomon | grondilu: because base 36 isn't in lexographical order any more than base 10 is | 00:11 | |
grondilu | std: say [Before] map *.base(26), ^50; | ||
camelia | std 53b3ca6: OUTPUT«===SORRY!===Two terms in a row (preceding is not a valid reduce operator) at /tmp/UF1Rlr_fdf line 1:------> say [Before] ⏏map *.base(26), ^50; expecting any of: feed_separator infix or meta-infix infixed…» | 00:12 | |
grondilu | m: say [before] map *.base(26), ^50; | ||
camelia | rakudo-moar ce2631: OUTPUT«False» | ||
timotimo | colomon: i don't have a line matching GatherIter,.*state | ||
colomon | timotimo: no, no, it's in GatherIter | ||
timotimo | oh | ||
colomon | the line is just | ||
$state := { | |||
timotimo | derp :) | ||
colomon | $state := { | ||
nqp::handle( $block(), | |||
'TAKE', SEQ($takings := nqp::getpayload(nqp::exception()); yield(); nqp::resume(nqp::exception()))); | |||
$takings := $SENTINEL; yield(); | |||
}; | |||
grondilu needs to read the WP page about lexicographic order | |||
colomon | to be precise | ||
timotimo | yes, now i found it :) | ||
and 1096 is inside class Mu, yes? | |||
colomon | timotimo: yes | 00:13 | |
m: sub lex($n) { 1001.chr x ($n div 1000) ~ ($n mod 1000).chr }; say (999..1111).map({ lex($_) }) | 00:15 | ||
camelia | rakudo-moar ce2631: OUTPUT«ϧ ϩ␀ ϩ ϩ ϩ ϩ ϩ ϩ ϩ ϩ ϩ ϩ ϩ ϩ ϩ | ||
00:15
gfldex left
|
|||
colomon | m: sub lex($n) { 127.chr x ($n div 126) ~ ($n mod 126).chr }; say (100..200).map({ lex($_) }) | 00:15 | |
camelia | rakudo-moar ce2631: OUTPUT«d e f g h i j k l m n o p q r s t u v w x y z { | } ^H␀ ^H ^H ^H ^H ^H ^H ^H ^H ^H ^H ^H ^H ^H | ||
00:16
Jerry__ joined
|
|||
colomon | hurmph | 00:16 | |
00:17
gfldex joined
00:20
kurahaupo_ joined
00:21
Jerry__ left,
Jerry90 joined
00:23
kurahaupo left
|
|||
colomon | grondilu: got it | 00:25 | |
grondilu: gist.github.com/colomon/196e74c18c504d1150c4 | 00:26 | ||
you can tweak @codes to control how quickly the string gets longer | |||
00:29
BenGoldberg joined
|
|||
grondilu | that's quite complicated | 00:29 | |
00:30
jnap joined
|
|||
grondilu | it's hard for me to believe it's not easier to create an infinite ordered list of strings :/ | 00:31 | |
00:31
jnap left
|
|||
grondilu | I could of course use map *.Str, 0..* but I wanted to compress things a bit | 00:32 | |
BenGoldberg | That wouldn't be in lexigraphical order. | ||
grondilu | I don't mind which kind of order as long as I have an order | 00:33 | |
BenGoldberg | Ok, nmind. | ||
grondilu | m: say [<] map *.Str, 0..100; # just checking | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
BenGoldberg | m: say [lt] map *.Str, 0..100; | 00:34 | |
camelia | rakudo-moar ce2631: OUTPUT«False» | ||
grondilu | m: say [<] map *.fmt("%x"), 0..100; # just checking | ||
camelia | rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/7b6S9eUV_b:1Error while creating error string: No exception handler located for warn» | ||
grondilu | wth? | ||
m: say 42.fmt("%x"); | 00:35 | ||
camelia | rakudo-moar ce2631: OUTPUT«2a» | ||
BenGoldberg | m: say *.fmt("%x"); | ||
grondilu | m: say map *.fmt("%x"), ^10; | ||
camelia | rakudo-moar ce2631: OUTPUT«WhateverCode.new()» | ||
rakudo-moar ce2631: OUTPUT«0 1 2 3 4 5 6 7 8 9» | |||
grondilu | m: say [+] map *.fmt("%x"), ^10; | ||
camelia | rakudo-moar ce2631: OUTPUT«45» | ||
grondilu | m: say [<] map *.fmt("%x"), ^10; | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
grondilu | m: say [<] map *.fmt("%x"), ^100; | 00:36 | |
camelia | rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/9mxEvrcN0K:1Error while creating error string: No exception handler located for warn» | ||
BenGoldberg | m: say [<] map *.fmt("%x"), ^99; | ||
camelia | rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/gMUfE6yx4z:1Error while creating error string: No exception handler located for warn» | ||
grondilu | m: say [<] map *.fmt("%x"), ^50; | ||
camelia | rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/FbFmoZlxcT:1Error while creating error string: No exception handler located for warn» | ||
grondilu | m: say [<] map *.fmt("%x"), ^20; | ||
camelia | rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/6Mw_CpU73e:1Error while creating error string: No exception handler located for warn» | ||
BenGoldberg | m: say [<] map *.fmt("%x"), ^11; | ||
camelia | rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/lc5aNFCnKB:1Error while creating error string: No exception handler located for warn» | ||
grondilu | m: say map *.fmt("%x"), ^20; | ||
camelia | rakudo-moar ce2631: OUTPUT«0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13» | ||
grondilu | j: say [<] map *.fmt("%x"), ^20; | 00:37 | |
camelia | rakudo-jvm ce2631: OUTPUT«(timeout)» | ||
grondilu | n: say [<] map *.fmt("%x"), ^20; | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Cannot parse number: a at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3757 (ANON @ 10)  at /home/p6eval/niecza/lib/CORE.setting line 3759 (NumSyntax.str2num @ …» | ||
BenGoldberg | m: say '9' < 'a'; | ||
camelia | rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/CnuFByDpmw:1Error while creating error string: No exception handler located for warn» | ||
BenGoldberg | Aha! | ||
grondilu | oh yeah | ||
n: say [<] map *.fmt("0x%x"), ^20; | 00:38 | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«True» | ||
BenGoldberg | n: say '9' < 'a'; | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Cannot parse number: a at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3757 (ANON @ 10)  at /home/p6eval/niecza/lib/CORE.setting line 3759 (NumSyntax.str2num @ …» | ||
BenGoldberg | n: say '9' < '0xa'; | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«True» | ||
BenGoldberg | p6: say '9' < 'a'; | ||
grondilu | yeah I must not forget 0 | ||
camelia | rakudo-parrot ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in any at gen/parrot/BOOTSTRAP.nqp:1221use of uninitialized value $/ of type Nil in string contextCannot call 'Real'; none of these signatures match::(Mu:U \v: *%_) in any at …» | ||
..rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/tmpfile:1Error while creating error string: No exception handler located for warn» | |||
..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Cannot parse number: a at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3757 (ANON @ 10)  at /home/p6eval/niecza/lib/CORE.setting line 3759 (NumSyntax.str2num @ …» | |||
grondilu | yeah I must not forget 0x | ||
camelia | ..rakudo-jvm ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in any at gen/jvm/BOOTSTRAP.nqp:1214Unhandled exception: use of uninitialized value $/ of type Nil in string context in warn (gen/jvm/CORE.setting:732) in warn (gen/jvm/CORE.setting…» | ||
BenGoldberg | niecza's error msg is sensible. rakudo's is less so. | 00:39 | |
grondilu | isn't there an extension of the printf format for base 36? | ||
00:40
Jerry90 left
|
|||
BenGoldberg | m: say 11.base(16); | 00:40 | |
camelia | rakudo-moar ce2631: OUTPUT«B» | ||
00:40
Jry joined
|
|||
grondilu | since Z is the last letter, it could be 0Z. so *.fmt("0Z%Z") | 00:40 | |
BenGoldberg | m: say '0' lt '00'; | 00:44 | |
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
grondilu | also, if I define infix:«<=>» on a custom type, aren't infix:«<» and infix:«>» automatically defined as well? | ||
timotimo | colomon: did you have time to try the jit with your code yet? | ||
grondilu | P5's overload do something like that IIRC | ||
*does | |||
colomon | grondilu: quick answer is no | ||
BenGoldberg | m: say [<] map 'a' x *, ^10; | ||
camelia | rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/UaKTibGN0A:1Error while creating error string: No exception handler located for warn» | ||
colomon | timotimo: I have not had time, sorry | ||
BenGoldberg | m: say [lt] map 'a' x *, ^10; # d'oh | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
timotimo | that's fine | ||
BenGoldberg | m: say [lt] map 'a' x *, ^1000; | ||
timotimo | i'm distracted at the moment anyway | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
BenGoldberg | Ta-da! Lexigraphical order achieved. | 00:45 | |
colomon | BenGoldberg: I already did that one, and grondilu said he wanted reasonable length. | ||
00:49
ClarusCogitatio joined,
xenoterracide joined
00:50
MilkmanDan left
|
|||
grondilu | .oO( use MONKEY_TYPING; augment class Int { multi method base($base, :$lexicographic!) {...} } ) |
00:50 | |
00:50
Akagi201_ joined
|
|||
colomon | grondilu: you can't make base lexicographic. | 00:50 | |
grondilu | damn it | 00:51 | |
I just want a base method so that $a.base($base) < $b.base($base) if and only if $a < $b | 00:52 | ||
in other words a base method that preserves integer order | |||
colomon | do you mean $a.base($base) lt $b.base($base) ? | 00:53 | |
00:53
MilkmanDan joined
|
|||
grondilu | yes | 00:53 | |
colomon | that can't work with any normal base, that was the point of my above comment. | ||
I don't understand why you think it might? | |||
grondilu | oh | ||
BenGoldberg | You mean a numeric encoding, not necessarily a base. Use the right terms, and people will be less confused ;) | ||
00:54
dayangkun joined
|
|||
grondilu | ok | 00:54 | |
fair point | |||
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(2); 1 ~ encode($n.chars-1) ~ $n.substr(1) }; say [lt] map { encode($_) }, ^200; | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
colomon | certianly a numeric encoding can be done, both BenGoldberg and I have suggested them | ||
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(2); 1 ~ encode($n.chars-1) ~ $n.substr(1) }; say map { encode($_) }, ^200; | ||
camelia | rakudo-moar ce2631: OUTPUT«0 10 1100 1101 1110000 1110001 1110010 1110011 11101000 11101001 11101010 11101011 11101100 11101101 11101110 11101111 111100000000 111100000001 111100000010 111100000011 111100000100 111100000101 111100000110 111100000111 111100001000 111100001001 1111000…» | ||
colomon | BenGoldberg++ # that's a lovely one | 00:55 | |
BenGoldberg | There's a name for it, but I forget what ;) | ||
That one is asymtotically optimal, if you don't mind that it produces bits :) | 00:56 | ||
grondilu | well you beat me. This one is too smart for me to get it quickly. I'll digest it and maybe I'll find a version that uses a larger alphabet. | 00:57 | |
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(2); 1 ~ encode($n.chars-1) ~ $n.substr(1) }; say [lt] map { ('0b'~encode($_)).Int.base(37) }, ^200; | ||
camelia | rakudo-moar ce2631: OUTPUT«base must be between 2 and 36, got 37 in method Str at src/gen/m-CORE.setting:13249 in method Stringy at src/gen/m-CORE.setting:1096 in sub infix:<lt> at src/gen/m-CORE.setting:1517 in sub at src/gen/m-CORE.setting:17995 in block <unit…» | 00:58 | |
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(2); 1 ~ encode($n.chars-1) ~ $n.substr(1) }; say [lt] map { ('0b'~encode($_)).Int.base(36) }, ^200; | ||
camelia | rakudo-moar ce2631: OUTPUT«False» | ||
BenGoldberg | I'm sure there's a way to do it, I'm just not thinking of it right now. | 00:59 | |
grondilu | you wanted to use :2[encode($_)] | ||
(though it does not help much) | |||
BenGoldberg | I meant, to make it base 36 for shorter strings, and still be a lexigraphical encoding. | 01:01 | |
grondilu | so my challenge is: find a sub f(Int $ --> Str) {...} such that f($a) lt f($b) if and only if $a < $b and with f($a) as short as possible. | ||
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(36); $n.substr(0,1) ~ encode($n.chars-1) ~ $n.substr(1) }; say map { encode($_) }, ^200; | ||
camelia | rakudo-moar ce2631: OUTPUT«0 10 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 F0 G0 H0 I0 J0 K0 L0 M0 N0 O0 P0 Q0 R0 S0 T0 U0 V0 W0 X0 Y0 Z0 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 110A 110B 110C 110D 110E 110F 110G 110H 110I 110J 110K 110L 110M 110N 110O 110P 110Q 110R 110S 110T…» | ||
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(36); encode($n.chars-1) ~ $n }; say map { encode($_) }, ^200; | 01:02 | |
camelia | rakudo-moar ce2631: OUTPUT«0 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0G 0H 0I 0J 0K 0L 0M 0N 0O 0P 0Q 0R 0S 0T 0U 0V 0W 0X 0Y 0Z 0110 0111 0112 0113 0114 0115 0116 0117 0118 0119 011A 011B 011C 011D 011E 011F 011G 011H 011I 011J 011K 011L 011M 011N 011O 011P 011Q 011R 011S 011T…» | ||
grondilu | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(36); $n.substr(0,1) ~ encode($n.chars-1) ~ $n.substr(1) }; say [lt] map { encode($_) }, ^200; | ||
camelia | rakudo-moar ce2631: OUTPUT«False» | ||
grondilu | maybe I should ask on stackexchange or something :) | 01:03 | |
BenGoldberg 's brain is tired. | |||
01:05
colomon_ joined
01:06
colomon left,
colomon_ is now known as colomon
|
|||
grondilu | or more precisely: given an alphabet @abc and a subset Word of Str where /^^<@abc>+$$/; find a sub f(Int $n --> Word) {...} such that f is bijective and f($a) lt f($b) iff $a < $b | 01:07 | |
(if such a bijection exists, which I'm not sure of) | 01:08 | ||
colomon | you left out the "short as possible" bit there... | 01:09 | |
good news: I just got a working smoke run | |||
grondilu | no need since I imposed an alphabet and a bijection | ||
colomon | bad news is I had to manually kill two run-away test file runs to get the smoke test to finish | 01:10 | |
grondilu: 'a' x $n is bijective and in your alphabet | 01:11 | ||
but it's the least short vaguely sane approach | |||
grondilu | yeah but you pick your own alphabet | ||
and it's injective, not surjective | |||
I mean what's f^-1("b")? | |||
01:12
FROGGS_ joined
|
|||
grondilu | (what I meant is that 'a' x $n works only if @abc = 'a') | 01:12 | |
colomon | ah, I see | ||
yeah, I don't see any obvious reason to believe that is possible. | 01:14 | ||
01:15
FROGGS left
|
|||
grondilu | I think it's possible and it's pretty easy to prove | 01:15 | |
both sets are totally ordered with a minimal element each. | |||
so you can remove the minimal elements and associate them. Then reiterate. | 01:16 | ||
colomon | :\ | 01:18 | |
grondilu | you don't agree? | ||
colomon | nope | ||
consider your alphabet | |||
do you agree that there are an infinite number of strings that start with "a"? | 01:19 | ||
grondilu | there is | ||
there are indeed I mean | |||
colomon | then how can you ever map a string that starts with 'b' to a number | ||
? | |||
by your method, I mean | |||
grondilu | damn it | 01:20 | |
dalek | ast: 7fc8efd | TimToady++ | S32-exceptions/misc.t: update to new P5var warnings |
01:21 | |
grondilu | you're right my method can not be surjective, it would give [\~] 'a' xx * again | 01:22 | |
I guess there's soething about lexicographic orders I simply don't fundamentally understand. | 01:24 | ||
colomon | grondilu: I think you might even be able to reverse your proof to prove why it's impossible to do. | ||
dalek | kudo/nom: 54cd8fb | TimToady++ | src/ (3 files): update to new P5var warnings Also a start on implementing sigil-only variables, which parse but produce an erroneous QAST at the moment. They do not, however, interfere with existing code, so in they go without a branch. :) |
||
grondilu | you mean by absurdo or something? Possibly indeed. | 01:25 | |
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(2); 1 ~ encode($n.chars-1) ~ $n.substr(1) }; say map { :2(reverse(encode($_))).base(36).reverse }, ^200; | ||
camelia | rakudo-moar ce2631: OUTPUT«Type check failed in binding $str; expected 'Str' but got 'Array' in sub unbase at src/gen/m-CORE.setting:7102 in block <unit> at /tmp/PFOwnT4B8D:1» | ||
BenGoldberg is confused. | 01:26 | ||
colomon | grondilu: suppose there *is* an bijective mapping for the first N numbers. | ||
find the longest string in those N strings. | 01:27 | ||
BenGoldberg | m: say 'abc'.reverse; # what's the right way to do this? | ||
camelia | rakudo-moar ce2631: OUTPUT«abc» | ||
colomon | then make a string of a's one character longer than that long string. | ||
BenGoldberg: 'abc'.flip | |||
grondilu | BenGoldberg: flip | ||
BenGoldberg | Ok. | ||
colomon | grondilu: that string of all a's will be lexographically before at least N/4 of the strings you already have | 01:28 | |
grondilu | colomon: well done | ||
so I must give up on requiring a bijection. Nevermind. The problem remains. Just need to rephrase it. | 01:29 | ||
BenGoldberg | You need a "universal coding", I think. | 01:33 | |
The encoding() function I gave was a variation of the "Elias Omega Coding", modified to be able to represent 0 | 01:34 | ||
grondilu | Interstingly enough, the set of strings with the lexicographic order is totally order, and yet when we take all successive smallest elements, we don't exhaust the set. I thoutht that was not possible. | ||
grondilu checks out Elias Omega Coding | 01:35 | ||
BenGoldberg | Also, besides reading the wikipedia page, you might pester the folks on ##math. | 01:36 | |
colomon | grondilu: the problem is that a longer string still fits in between shorter strings. | ||
I reckon the set of strings in an alphabet is uncountable. | 01:37 | ||
grondilu | BenGoldberg++ neat ideas for RC tasks | 01:38 | |
colomon: if the alphabet is finite, the set of strings is very much countable. | 01:39 | ||
actually, even with an infinite alphabet it's still countable | |||
colomon | hmmm, yeah, that seems right | 01:40 | |
grondilu | as long as the strings are finite | ||
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(10); 1 ~ encode($n.chars-1) ~ $n }; say [<] map { encode($_) }, ^200; # success! | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(36); 1 ~ encode($n.chars-1) ~ $n }; say [<] map { encode($_) }, ^200; # success! | 01:41 | |
camelia | rakudo-moar ce2631: OUTPUT«use of uninitialized value $/ of type Nil in string context in block <unit> at /tmp/XnsVMzS3q2:1Error while creating error string: No exception handler located for warn» | ||
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(36); 1 ~ encode($n.chars-1) ~ $n }; say [lt] map { encode($_) }, ^200; # success! | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
BenGoldberg | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(36); 1 ~ encode($n.chars-1) ~ $n }; say map { encode($_) }, ^200; # success! | ||
camelia | rakudo-moar ce2631: OUTPUT«0 101 102 103 104 105 106 107 108 109 10A 10B 10C 10D 10E 10F 10G 10H 10I 10J 10K 10L 10M 10N 10O 10P 10Q 10R 10S 10T 10U 10V 10W 10X 10Y 10Z 110110 110111 110112 110113 110114 110115 110116 110117 110118 110119 11011A 11011B 11011C 11011D 11011E 11011F 11…» | ||
grondilu | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(36); 1 ~ | 01:42 | |
camelia | rakudo-moar ce2631: OUTPUT«===SORRY!=== Error while compiling /tmp/ZiBlULt6dBBogus statementat /tmp/ZiBlULt6dB:1------> urn '0' unless $n; $n = $n.base(36); 1 ~⏏<EOL> expecting any of: postfix infix stopper…» | ||
grondilu | oops | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(36); 'b' ~ encode($n.chars-1) ~ $n }; say map { encode($_) }, ^200; | 01:43 | |
camelia | rakudo-moar ce2631: OUTPUT«a ba1 ba2 ba3 ba4 ba5 ba6 ba7 ba8 ba9 baA baB baC baD baE baF baG baH baI baJ baK baL baM baN baO baP baQ baR baS baT baU baV baW baX baY baZ bba110 bba111 bba112 bba113 bba114 bba115 bba116 bba117 bba118 bba119 bba11A bba11B bba11C bba11D bba11E bba11F bb…» | ||
grondilu | m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(36); 1 ~ encode($n.chars-1) ~ $n }; say [lt] map { encode($_) }, ^200; | ||
camelia | rakudo-moar ce2631: OUTPUT«True» | ||
grondilu | BenGoldberg++ | ||
m: sub encode($n is copy) { return '0' unless $n; $n = $n.base(36); 1 ~ encode($n.chars-1) ~ $n }; say map { encode($_).chars - .chars }, ^200; | 01:44 | ||
camelia | rakudo-moar ce2631: OUTPUT«0 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 …» | ||
grondilu | lol they are actually longer than the decimal encoding, though :) | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(36); 'b' ~ encode($n.chars-1) ~ $n }; say map { encode(10 ** $_) }, ^20; | ||
camelia | rakudo-moar ce2631: OUTPUT«ba1 baA bba12S bba1RS bba27PS bba3255S bba3LFLS bba45YC1S bba51NJCHS bba5GJDGXS bba64LDQPDS bba719XTF1TS bba7CRE66I9S bba83JLXPT2PS bba8ZG3D62R5S bba99UGXNORJLS bbaA2QGPCKVNG1S bbaARCN1HSSIGHS bbaB7LIEEXZX4KXS bbaC23Z405FZ79TDS» | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(36); 'b' ~ encode($n.chars-1) ~ $n }; say map { encode(10 ** $_).chars - $_ }, ^20; | 01:45 | |
camelia | rakudo-moar ce2631: OUTPUT«3 2 4 3 3 3 2 2 2 1 1 1 0 0 -1 -1 -1 -2 -2 -2» | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(36); 'b' ~ encode($n.chars-1) ~ $n }; say map { encode(10 ** $_).chars / $_ }, ^20; | ||
camelia | rakudo-moar ce2631: OUTPUT«Type check failed for return value; expected 'Int' but got 'Failure' in any return_error at src/vm/moar/Perl6/Ops.nqp:646 in method floor at /home/p6eval/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:1 in method Str at src/gen/m-COR…» | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(36); 'b' ~ encode($n.chars-1) ~ $n }; say map { encode(10 ** $_).chars / ($_+1) }, ^20; | ||
camelia | rakudo-moar ce2631: OUTPUT«3 1.5 2 1.5 1.4 1.333333 1.142857 1.125 1.111111 1 1 1 0.923077 0.928571 0.866667 0.875 0.882353 0.833333 0.842105 0.85» | ||
grondilu | well, I must add as a requirement that it must do better than the decimal encoding. That is f($a).chars <= $a.chars | 01:46 | |
at least for most $a | |||
BenGoldberg | When the numbers get big enough, it will be smaller than the base 10 version. | ||
grondilu | ok, I can believe that. | ||
(though I was planning on using that for relatively small numbers :) ) | 01:47 | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(36); 'b' ~ encode($n.chars-1) ~ $n }; say first { encode(10 ** $_).chars < $_ }, ^20; | 01:48 | |
camelia | rakudo-moar ce2631: OUTPUT«14» | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(36); 'b' ~ encode($n.chars-1) ~ $n }; say first { encode(10 ** $_).chars <= $_ }, ^20; | ||
camelia | rakudo-moar ce2631: OUTPUT«12» | ||
BenGoldberg | So, encoding(10**12) has a length of 12. | 01:49 | |
grondilu | that's pretty big | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(10); 'b' ~ encode($n.chars-1) ~ $n }; say first { encode(10 ** $_).chars <= $_ }, ^40; | ||
camelia | rakudo-moar ce2631: OUTPUT«Nil» | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(10); 'b' ~ encode($n.chars-1) ~ $n }; say first { encode(10 ** $_).chars <= $_ }, ^100; | ||
camelia | rakudo-moar ce2631: OUTPUT«Nil» | ||
grondilu | I guess I'll go with *.fmt("0x%x") then | 01:50 | |
01:50
nbrown__ left
|
|||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(36); 'b' ~ encode($n.chars-1) ~ $n }; say map { encode(10 ** $_).chars <= $_ }, 12..13; | 01:51 | |
camelia | rakudo-moar ce2631: OUTPUT«True True» | ||
BenGoldberg | m: sub encode($n is copy) { return 'a' unless $n; $n = $n.base(36); 'b' ~ encode($n.chars-1) ~ $n }; say map { encode(10 ** $_) }, 12..13; | ||
camelia | rakudo-moar ce2631: OUTPUT«bba7CRE66I9S bba83JLXPT2PS» | ||
BenGoldberg | Hmm... all of the 'overhead' is right at the front. Maybe we can encode it! | 01:52 | |
colomon | timotimo: oooh! moar_jit is rakudobrew config | 01:53 | |
recent addition. :) | 01:54 | ||
02:24
kyun joined
|
|||
kyun | NMAKE : fatal error U1077: “C:\ProgramData\Oracle\Java\javapath\java.EXE”: return code“0x1” | 02:30 | |
Oh, I build jvm backend faild | |||
colomon | timotimo: gist.github.com/colomon/8e89203b8d...nt-1290523 | 02:34 | |
02:35
noganex joined
02:38
noganex_ left
02:45
MilkmanDan left
02:49
MilkmanDan joined
03:01
kyun_ joined
03:03
kyun left,
kyun_ is now known as kyun,
mberends left
03:12
mberends joined
03:14
pochi_ joined
03:20
tphilipp joined,
tphilipp left,
rindolf joined
03:26
salv0 left
03:27
salv0 joined
03:50
xenoterracide left
03:59
raiph left
04:00
mr-foobar joined,
rindolf left
04:01
rindolf joined
04:04
kaare_ joined
04:06
Jry left
04:09
xenoterracide joined
04:10
[Sno] left
04:21
tphilipp joined
04:24
tphilipp left
04:26
xenoterracide left
04:27
anaeem1 joined
04:32
xenoterracide joined
04:37
tphilipp joined,
tphilipp left
04:39
tphilipp joined,
tphilipp left
04:40
tphilipp joined,
tphilipp left,
tphilipp joined
04:41
tphilipp left,
rindolf left,
tphilipp joined,
rindolf joined,
tphilipp left
04:48
Jry joined
04:54
jack_rabbit joined
04:55
hagiri joined
|
|||
hagiri | hi all | 04:55 | |
;) | 04:56 | ||
04:56
kaare_ left
04:57
BenGoldberg left
|
|||
jack_rabbit | ,r my $v=0;loop ($i=0;$i+12 < @nums.elems;$i++){my $w=[*] @nums[$i..($i+12)];if ($w > $v) {$v = $w;}};say $v; | 04:57 | |
r: my $v=0;loop ($i=0;$i+12 < @nums.elems;$i++){my $w=[*] @nums[$i..($i+12)];if ($w > $v) {$v = $w;}};say $v; | 04:58 | ||
camelia | rakudo-jvm 54cd8f: OUTPUT«(timeout)» | ||
..rakudo-{parrot,moar} 54cd8f: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileVariable '$i' is not declaredat /tmp/tmpfile:1------> my $v=0;loop ($i⏏=0;$i+12 < @nums.elems;$i++){my $w=[*] @ expecting any of: postfi…» | |||
jack_rabbit | r: my $v=0;loop (my $i=0;$i+12 < @nums.elems;$i++){my $w=[*] @nums[$i..($i+12)];if ($w > $v) {$v = $w;}};say $v; | ||
camelia | rakudo-{parrot,jvm,moar} 54cd8f: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileVariable '@nums' is not declaredat /tmp/tmpfile:1------> y $v=0;loop (my $i=0;$i+12 < @nums.elems⏏;$i++){my $w=[*] @nums[$i..($i+12)];if ( exp…» | ||
jack_rabbit | r: my @nums = [1..1000]; my $v=0;loop (my $i=0;$i+12 < @nums.elems;$i++){my $w=[*] @nums[$i..($i+12)];if ($w > $v) {$v = $w;}};say $v; | 04:59 | |
camelia | rakudo-{parrot,jvm,moar} 54cd8f: OUTPUT«0» | ||
jack_rabbit | r: my @nums = 1..1000; my $v=0;loop (my $i=0;$i+12 < @nums.elems;$i++){my $w=[*] @nums[$i..($i+12)];if ($w > $v) {$v = $w;}};say $v; | ||
camelia | rakudo-{parrot,jvm,moar} 54cd8f: OUTPUT«(timeout)» | ||
05:00
xenoterracide left
|
|||
jack_rabbit | Is there a reason the comparison operators need spaces on either side of them? | 05:02 | |
well.. I guess only sometimes? | 05:04 | ||
Is this a bug? | |||
r: my @nums = 1..50; my $v=0;loop (my $i=0;$i+12 < @nums.elems;$i++){my $w=[*] @nums[$i..($i+12)];if ($w>$v) {$v=$w;}};say $v; | |||
camelia | rakudo-{parrot,jvm,moar} 54cd8f: OUTPUT«2209723830420986880000» | ||
jack_rabbit | is fine, but | 05:05 | |
r: my @nums = 1..50; my $v=0;loop (my $i=0;$i+12<@nums.elems;$i++){my $w=[*] @nums[$i..($i+12)];if ($w>$v) {$v=$w;}};say $v; | |||
camelia | rakudo-{parrot,jvm,moar} 54cd8f: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileMissing blockat /tmp/tmpfile:1------> ++){my $w=[*] @nums[$i..($i+12)];if ($w>⏏$v) {$v=$w;}};say $v; expecting any of: postfix …» | ||
jack_rabbit | is an error. | ||
05:07
hagiri left
|
|||
TimToady | %foo<bar> is the postfix notation for a literal key, so less-than requires a space | 05:09 | |
05:09
rindolf left,
rindolf joined
|
|||
TimToady | Perl 6 is not optimized for golf | 05:10 | |
though when you think about it, real golf is not optimized for golf either... | 05:13 | ||
05:13
Zikomos joined
|
|||
TimToady | you can't use your putter to get from a term to an infix, you need a longer club :) | 05:14 | |
moritz | and much space on either side of the club :-) | ||
jack_rabbit | Makes sense. I was just curious. | 05:15 | |
05:15
ecocode_ joined
05:18
rindolf left,
rindolf joined
05:25
kaare_ joined
05:29
telex left
|
|||
jack_rabbit | so, there's no way I can tell to assign an infinite list to an array variable. Someone suggested a sub that returns the list. | 05:30 | |
But with this: sub rnd {(rand * 2).Int} ... *)}; | |||
rnd[0] varies. | |||
05:30
telex joined
|
|||
jack_rabbit | Is there some way to "memoize" this? | 05:30 | |
05:31
Zikomos left,
rindolf left,
rindolf joined
|
|||
jack_rabbit | this, rather: sub rnd {{(rand * 2).Int} ... *}; | 05:34 | |
moritz | m: my @rand := (rand * 2) xx *; say @rand[^5] for ^2 | 05:36 | |
camelia | rakudo-moar 54cd8f: OUTPUT«1.00679510450107 1.94302298007086 1.43152089303529 0.375055139916747 0.1563112430171441.00679510450107 1.94302298007086 1.43152089303529 0.375055139916747 0.156311243017144» | ||
05:36
[Sno] joined
|
|||
moritz | jack_rabbit: like this? | 05:36 | |
an array variable is exactly right for memoizing this | 05:37 | ||
and, if you can't assign, use binding (:=) | |||
jack_rabbit | hmm. the interpreter just spins like it's trying to realize the entire list. | 05:38 | |
only if there are no statements following the assignment, though. | 05:39 | ||
your example works fine. | 05:40 | ||
Is there a way to do the assignment without a follow-up statement in the interpreter? | 05:44 | ||
05:53
rindolf left,
rindolf joined
05:56
_thou left
06:01
rindolf left,
rindolf joined
06:02
SamuraiJack joined
06:12
rindolf left,
flussence joined,
rindolf joined
06:13
isacloud____ joined
06:18
mberends left
06:19
kyun_ joined
06:21
kyun_ is now known as kyunsiu,
itz left,
kyun left,
kyunsiu is now known as kyun
06:22
gfldex left
06:23
itz joined
06:27
mj41 joined
06:28
itz_ joined
06:30
itz left
06:32
Vlavv left
06:36
virtualsue joined
06:45
itz joined
|
|||
sergot | o/ | 06:46 | |
06:49
itz_ left
06:52
kyun_ joined,
kyun left
|
|||
sergot | m: say 1[1] | 06:54 | |
camelia | rakudo-moar 54cd8f: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/L2iPiNIiD9:1use of uninitialized value of type Nil in string context in block <unit> at /tmp/L2iPiNIiD9:1Error while creating error string: No exception handler …» | ||
06:54
_thou joined,
virtualsue left
|
|||
sergot | m: say 1; | 06:55 | |
camelia | rakudo-moar 54cd8f: OUTPUT«1» | ||
06:56
kyun_ is now known as kyun
06:58
_thou left
06:59
kurahaupo_ left
|
|||
sergot | m: <a a a b b c>.Set.say | 07:01 | |
camelia | rakudo-moar 54cd8f: OUTPUT«set(a, b, c)» | ||
sergot | m: <a a a b b c>.Set.fmt('%s').say | 07:03 | |
camelia | rakudo-moar 54cd8f: OUTPUT«abc» | ||
sergot | m: <a b c>.fmt('%s').say | ||
camelia | rakudo-moar 54cd8f: OUTPUT«a b c» | ||
07:12
FROGGS_ is now known as FROGGS
|
|||
sergot | TimToady: could you give us the answer here: rt.perl.org/Public/Bug/Display.html?id=121947 ? will be great :) | 07:17 | |
07:18
kurahaupo joined
07:30
rindolf left,
rindolf joined
07:33
virtualsue joined
07:45
donaldh joined
07:51
domidumont joined
07:54
darutoko joined
08:04
rindolf left,
rindolf joined
08:09
zakharyas joined
08:13
Ven joined
08:23
fhelmberger joined
08:29
skarn joined
08:31
virtualsue left
08:35
dakkar joined
08:36
tomaw- joined
08:40
SamuraiJack left
08:42
_thou joined
08:47
_thou left
08:51
JimmyZ joined
|
|||
JimmyZ | planeteria.org/perl6/ is for sale ... | 08:51 | |
moritz | oh noez | 08:52 | |
08:59
Jry left
09:03
virtualsue joined
09:07
JimmyZ left
09:10
virtualsue left
09:16
Ven left,
donaldh left,
salv0 left,
araujo left,
xinming left,
zoosha left,
pmichaud left
09:17
Ven joined,
donaldh joined,
salv0 joined,
araujo joined,
xinming joined,
zoosha joined,
pmichaud joined,
Pleiades` joined,
thilp_ joined,
tadzik joined,
pochi_ left,
Possum left,
_sri left,
moritz left,
sjohnson left
09:19
rindolf left,
rindolf joined
09:22
pochi joined
09:23
moritz joined,
Possum joined
09:27
Exodist joined,
stux|RC-only joined
09:30
_sri joined,
yeltzooo joined,
silug joined,
\00 joined,
ingy joined,
sjohnson joined
09:34
pecastro joined
09:38
nebuchad` joined
09:46
lizmat_ joined
09:47
fling joined,
Gruber joined,
bonsaikitten joined,
Juerd_ joined
09:48
oetiker_ joined,
eviltwin_b joined
09:49
nhayashi joined
09:50
geekosaur left,
Grrrr left,
eviltwin_b is now known as geekosaur,
Juerd_ is now known as Juerd
09:51
jnthn left,
jnthn joined,
Ven left
10:11
ilogger2 joined,
ChanServ sets mode: +v ilogger2
10:12
ivan`` joined
10:15
aborazmeh joined
10:20
virtualsue joined
10:23
colomon_ joined
10:24
anaeem___ joined
10:25
psch joined
10:26
jnthn_ joined,
japhb_ joined
10:27
rindolf joined
10:29
nbrown__ joined
10:30
_thou joined
10:33
ClarusCogitatio_ joined
10:34
colomon_ is now known as colomon
10:35
donaldh joined,
_thou left
10:38
Ven joined
|
|||
donaldh | .tell jnthn NQPMatch objects are getting through add_inlining_info_if_possible in QAST::Want objects | 10:38 | |
yoleaux | donaldh: I'll pass your message to jnthn. | ||
lizmat_ | r: $ | 10:39 | |
donaldh | .tell jnthn this is an odd one - gist.github.com/donaldh/f5502df973ec2b41a9c2 fixes it, but why? | ||
yoleaux | donaldh: I'll pass your message to jnthn. | ||
camelia | ( no output ) | ||
moritz | donaldh: is this about what keeps the parse tree alive / in memory? | 10:40 | |
lizmat_ | std: $ | ||
camelia | std 53b3ca6: OUTPUT«ok 00:00 121m» | ||
10:40
virtualsue left
|
|||
donaldh | moritz: causes matches and the CORE.setting text to get serialized into the compiled setting. | 10:41 | |
lizmat_ | there are spectests for bare sigils that are supposed to fail with "anonymous $sigil variable outside of declaration" | ||
judging from std, this test seems faulty rather than the code | |||
moritz | lizmat_: then it seems those are outdated | ||
lizmat_ | well, it's just that they started failing after my latest pull | 10:42 | |
Ah, I see TimToady is busy with 54cd8fb6d9f43e147c06665f357ccccfb6f749cb | |||
lizmat_ fixed the tests | |||
moritz | TimToady++ # getting rid if "Non-declarative sigil is missing its name" | 10:43 | |
it always took me a minute to understand what that meant | 10:44 | ||
dalek | ast: 60951ad | (Elizabeth Mattijsen)++ | S03-operators/context.t: Fix tests now that bare sigils are ok |
10:45 | |
moritz | hoelzro: re "Include the offending variable name in uninitialized warning", commit 5f583edc15d779d2b200ca2850abca889107cc32: -- I intentially removed that, because it reported wrong variable names too often | 10:47 | |
hoelzro: like vars from the setting, which are of no interest to the user | 10:48 | ||
10:50
mattp___ joined,
immortal joined,
rindolf left
10:51
Tene_ joined,
smash_ joined,
brother| joined,
btyler_ joined,
cxreg joined,
rindolf joined,
anocelot joined,
revdiablo joined,
hoelzro_ joined,
sergot_ joined,
jnthn joined
|
|||
lizmat | std: $@ | 10:51 | |
camelia | std 53b3ca6: OUTPUT«ok 00:01 121m» | ||
moritz | m: $@ | 10:52 | |
camelia | rakudo-moar 54cd8f: OUTPUT«===SORRY!===Unknown QAST node type NQPMu» | ||
moritz | that's LTA | ||
masak submits rakudobug | 10:53 | ||
lizmat | m: sub f { f(|$) } | ||
camelia | rakudo-moar 54cd8f: OUTPUT«===SORRY!===Cannot find method 'returns'» | ||
lizmat | std: sub f { f(|$) } | ||
camelia | std 53b3ca6: OUTPUT«ok 00:01 125m» | ||
moritz | TimToady: ^^ return self if $name eq '$' || $name eq '@' || $name eq '%' || $name eq '&'; this probably leaves $/.ast undefined/NQPMu | ||
hoelzro: perl6/doc htmlify.p6 spits out many "use of uninitialized value of type Nil in string context in any enter at src/gen/m-Metamodel.nqp:3080" warnings; do you know where those come from? | 10:55 | ||
10:55
betterwo1ld left,
Tene left,
anocelot_ left,
jnthn_ left,
sergot left
|
|||
masak | moritz: it's a recent change in rakudo. | 10:56 | |
m: say ~Nil | |||
camelia | rakudo-moar 54cd8f: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/A16vG05IMp:1» | ||
masak | things like this are probably the culprit: | ||
m: say ~(42 if 0) | |||
camelia | rakudo-moar 54cd8f: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/JKr1gM4VQY:1» | ||
10:56
Celelibi joined
|
|||
lizmat | std: "$" | 10:56 | |
camelia | std 53b3ca6: OUTPUT«ok 00:01 122m» | ||
lizmat | m: "$" | ||
camelia | ( no output ) | 10:57 | |
masak | moritz: TimToady ruminated over them in the backlog, that `if` is a tricky one here -- whether it should give back () or Nil | ||
10:57
betterworld joined,
rindolf left
10:58
rindolf joined
|
|||
dalek | ast: 40c5a41 | (Elizabeth Mattijsen)++ | S32-exceptions/misc.t: More test fixups after TimToady++'s work |
10:58 | |
11:00
nbrown__ left
11:02
mj41 joined,
dakkar joined
11:03
JTABCU5B joined,
Celelibi left,
dg joined,
timotimo joined
11:04
Celelibi joined
|
|||
lizmat | r: my @a=({:a<1>}, {:b<1>}, {:a<1>}); my $with = &[evq]; @a .= uniq(:$with)); say @a | 11:07 | |
camelia | rakudo-moar 54cd8f: OUTPUT«===SORRY!===Cannot find method 'returns'» | ||
..rakudo-{parrot,jvm} 54cd8f: OUTPUT«===SORRY!===No such method 'returns' for invocant of type 'NQPMu'» | |||
lizmat | this seems to segfault in some situations during spectesting | ||
lizmat is investigating | 11:08 | ||
FROGGS | evq? | 11:09 | |
nwc10 | lizmat: it might well be irclog.perlgeek.de/moarvm/2014-08-29#i_9262222 | ||
FROGGS | r: my @a=({:a<1>}, {:b<1>}, {:a<1>}); my $with = &[eqv]; @a .= uniq(:$with)); say @a | ||
lizmat | src/Perl6/Actions.nqp:6940 | ||
camelia | rakudo-{parrot,jvm,moar} 54cd8f: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileUnexpected closing bracketat /tmp/tmpfile:1------> ); my $with = &[eqv]; @a .= uniq(:$with)⏏); say @a» | ||
FROGGS | r: my @a=({:a<1>}, {:b<1>}, {:a<1>}); my $with = &[eqv]; @a .= uniq(:$with); say @a | ||
camelia | rakudo-{parrot,jvm,moar} 54cd8f: OUTPUT«{"a" => "1"} {"b" => "1"}» | 11:10 | |
11:10
vike left
|
|||
lizmat | FROGGS: what is the diff ? | 11:11 | |
FROGGS | s/evq/eqv/ and s/))/)/ | ||
masak | m: say (1, 2, 3) ~~ (1, 2, Int) | ||
camelia | rakudo-moar 54cd8f: OUTPUT«False» | ||
masak | why doesn't the above match? | ||
lizmat | aha! | ||
11:11
Ven left
|
|||
masak | or rather, what happens in that match? | 11:11 | |
FROGGS | m: &[baz] | ||
camelia | rakudo-moar 54cd8f: OUTPUT«===SORRY!===Cannot find method 'returns'» | ||
FROGGS | LTA | 11:12 | |
masak submits rakudobug | |||
FROGGS | masak++ | ||
masak | I reiterate my question, though: why doesn't `(1, 2, 3) ~~ (1, 2, Int)` match? | 11:13 | |
:) | |||
FROGGS | m: say (1, 2, 3) ~~ (1, 2, 3) # doesnt it only call Accepts on the list? | ||
camelia | rakudo-moar 54cd8f: OUTPUT«True» | ||
lizmat | m: say &[evq].WHAT | ||
camelia | rakudo-moar 54cd8f: OUTPUT«===SORRY!===Cannot find method 'returns'» | ||
lizmat | that's the root of the problem, I would think | ||
FROGGS | m: say (1, 2, 3) »~~« (1, 2, Int) # masak: you meant that? | 11:15 | |
camelia | rakudo-moar 54cd8f: OUTPUT«True True True» | ||
masak | FROGGS: well, you can do that and it works. | ||
11:15
vike joined
|
|||
masak | FROGGS: but I'm more wondering why ~~ on the whole parcel doesn't DWIM and smartmatch 3 against Int. | 11:16 | |
lizmat | hmmm.... it;s just another LTA error message, the failing test code has eqv, not evq :-( | ||
FROGGS | that feels weird... | ||
11:18
telex joined,
brother| is now known as brother,
rindolf left
11:19
cognome_ joined,
rindolf joined
|
|||
masak | or rather, since `(1, 2, 3) ~~ (1, 2, Int)` is False but `3 ~~ Int` is True, what kind of matching does happen, element-wise? | 11:20 | |
m: say (1, 2, (3, 4)) ~~ (1, 2, (3, 4)) | |||
camelia | rakudo-moar 54cd8f: OUTPUT«False» | ||
masak | o.O | ||
FROGGS | hmmm | ||
masak | clearly my intuition about this is way off. | 11:21 | |
FROGGS | rakudo/src/core/Parcel.pm:11: multi method ACCEPTS(Parcel:D: $topic) { self.list.ACCEPTS($topic) } | ||
11:21
Alina-malina joined,
synopsebot joined,
avuserow_ joined
|
|||
FROGGS | m: say (1, 2, 3) ~~ (1, 2, *) | 11:22 | |
camelia | rakudo-moar 54cd8f: OUTPUT«True» | ||
11:22
apejens joined
|
|||
FROGGS | masak: it checks using === on the elems | 11:22 | |
11:22
Woodi joined,
Ulti joined
|
|||
masak | m: say (3, 4) === (3, 4) | 11:24 | |
camelia | rakudo-moar 54cd8f: OUTPUT«False» | ||
11:24
lestrrat joined
|
|||
masak | FROGGS: that's just sad. | 11:24 | |
I vote for === being changed to ~~ for the elements. | 11:25 | ||
dalek | ast: d755436 | (Elizabeth Mattijsen)++ | S32-exceptions/misc.t: Add RT number |
||
masak | furthermore, I vote for the abolition of *, which is seldom used and mostly muddling up the semantics of list/parcel matching. | ||
it has no "model integrity". | |||
FROGGS | masak: I am already spectesting that | ||
masak | and it's more-than-subsumed by the awesome matching powers of signatures. | ||
11:26
oetiker joined
|
|||
jnthn | masak++ # reporting the issue that bit me today :) | 11:27 | |
yoleaux | 28 Aug 2014 16:00Z <japhb> jnthn: When you're awake again, can you look at gist.github.com/japhb/a452a0a8dd7bd5682e1c ? I'm concerned by *both* the weird NPE when threading, but also the fact that having threads <= items causes apparent lockup. I would think the tasks would just share threads in the pool in the normal fashion, making for slow results, but no lock. | ||
28 Aug 2014 22:46Z <flussence> jnthn: Is this a bug, or am I grossly misunderstanding how S17 works? irclog.perlgeek.de/perl6/2014-08-28#i_9260839 | |||
10:38Z <donaldh> jnthn: NQPMatch objects are getting through add_inlining_info_if_possible in QAST::Want objects | |||
10:39Z <donaldh> jnthn: this is an odd one - gist.github.com/donaldh/f5502df973ec2b41a9c2 fixes it, but why? | |||
dalek | ast: 23abe1b | (Elizabeth Mattijsen)++ | S32-list/uniq.t: Mark test as skip because of segfault |
||
jnthn | omfg, that's a lot of messages | ||
11:27
bowtie joined,
mhasch joined,
bowtie is now known as Guest36225
|
|||
nwc10 | jnthn: there's also a few nopastes from me in #moarvm | 11:27 | |
jnthn | Yeah, noticed... | 11:28 | |
That channel is rather easier to backlog :) | |||
11:28
Ulti_ joined,
[Coke]_ joined
11:29
carlin joined,
arnsholt_ joined,
diakopte1 joined
11:30
apejens_ joined,
perlpilot joined,
Ulti left,
apejens left
|
|||
timotimo | o/ | 11:31 | |
colomon | timotimo: I got some JIT timings for you last night. | 11:33 | |
gist.github.com/colomon/8e89203b8d...nt-1290523 | |||
also, channel in general: I figured out that what's been blocking smoke testing for the last few days are hangs in Test-ClientServer and Chess | 11:35 | ||
I got a successful run last night | |||
11:35
dayangkun joined
|
|||
FROGGS | ohh! | 11:35 | |
colomon | by killing those tests manually | ||
FROGGS | do tell | ||
ahh | |||
colomon | 02-simple-socket.t hangs in the former | ||
pgn.t in the latter | 11:36 | ||
dalek | ast: 2b3a12a | (Elizabeth Mattijsen)++ | S32-exceptions/misc.t: Add test for #122646 |
||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122646 | ||
11:36
BenGoldberg joined
|
|||
FROGGS | masak: that's the spectest using ~~: gist.github.com/FROGGS/80b086660badcf365e5a | 11:38 | |
running a unmodified now | |||
colomon: btw, v5 should be build- and testable now | 11:40 | ||
masak | FROGGS: only the first and maybe the last two look relevant, methinks. | 11:41 | |
FROGGS | masak: I think the same | ||
colomon | FROGGS: do tests fail in v5 at the moment? | ||
FROGGS | colomon: it will just run sanity tests, so it should pass | 11:42 | |
masak | food & | ||
colomon | hmm, they failed in the smoke run last night. | ||
FROGGS | colomon: because it did not use Build.pm, but it should now | ||
colomon | oh, very recent change, eh? | ||
FROGGS | colomon: 5 minutes :o) | 11:43 | |
colomon | FROGGS++ | ||
11:43
cotto joined
|
|||
jnthn | dinner & | 11:43 | |
11:43
epochbell joined
11:45
SHODAN joined
11:46
zacts joined
|
|||
colomon | smoke test done: host07.perl6.com:8080/report | 11:47 | |
there's an extra batch of build failures there that didn't happen ten hours ago. :\ | 11:48 | ||
11:48
rindolf left,
rindolf joined
|
|||
nwc10 | jnthn: current --profile-comile ccl4.org/~nick/profile-1409312777.79459.html.gz | 11:51 | |
(or without .gz if your connection is fine with about 4M | |||
FROGGS | masak: only t/spec/integration/advent2010-day12.t fails due to the change | 11:54 | |
masak: fails with: Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏bar' (indicated by ⏏) | 11:55 | ||
dalek | kudo/nom: b6b3f55 | (Elizabeth Mattijsen)++ | src/core/ (2 files): A bare 'say' is now an exception |
||
FROGGS | lizmat++ # ohh nice! | ||
dalek | ast: fd376fc | (Elizabeth Mattijsen)++ | S32-exceptions/misc.t: Add test for bare say exception |
||
lizmat | it's runtime, not compile time yet | 11:56 | |
late lunch& | |||
hoelzro_ | moritz: I have a fix for the ~Nil problem; I'm just going to test it real quick | 11:58 | |
12:00
hoelzro_ is now known as hoelzro
|
|||
hoelzro | ok, my patch fixes perl6/doc | 12:06 | |
waiting for spectest | |||
12:07
kaleem joined
12:11
mattp_ joined
12:13
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg,
mattp___ left
12:14
smash_ left
12:15
xinming joined
12:18
dayangkun left,
arnsholt_ left
12:19
arnsholt joined
12:20
BizarreCake joined
|
|||
moritz | hoelzro: but why does it try to stringify Nil? did it do that before the S17 merge too? | 12:23 | |
12:23
smash joined
12:24
xenoterracide joined
|
|||
hoelzro | it's because Mu.Stringy used to unconditionally call .Str | 12:24 | |
I changed it yesterday so it doesn't, but I have a fix I'm testing right now for that | |||
12:25
araujo joined
12:26
dayangkun joined
12:28
rindolf left
12:29
rindolf joined
12:32
kaleem left
12:39
xenoterracide left
|
|||
moritz | hoelzro: then my real question is, is it new that htmlify calls Nil.Stringy? | 12:42 | |
hoelzro | moritz: if you interpolate Nil into a string, it calls Stringy | ||
it probably happens somewhere! | |||
moritz | hoelzro: let me rephrase | ||
hoelzro: htmlify makes quite some assumptions regarding the generated Pod tree | |||
hoelzro: and I don't want any regressions due to changed parsing or Pod tree to go unnoticed | 12:43 | ||
hoelzro: so I wonder if these Nil interpolations point to some new, deeper problem, or if they existed before, and were silent | |||
hoelzro | ah ha | ||
moritz | hoelzro: did you diff the output before and after the merge, for example? | 12:44 | |
hoelzro | I did not | ||
moritz | s/output/generated files/ | ||
hoelzro | I can do that later today | ||
moritz | that would be cool | ||
also I noticed that it became much slower | |||
it ran in 41m18s today | |||
I remember more like 15 to 20m | |||
hoelzro | wow | ||
I'll test timing too | 12:45 | ||
moritz | not sure if that's due to the many new wornings, or something else | ||
hoelzro | I just ran it 45 minutes ago or so; it definitely didn't take 40 minutes | ||
12:49
Ulti_ is now known as Ulti
|
|||
hoelzro | ok, my fix for the Stringy stuff is clean | 12:53 | |
dalek | kudo/nom: 7c8a4a7 | (Rob Hoelz)++ | src/Perl6/Grammar.nqp: Fix problems with incomplete POD |
12:54 | |
kudo/nom: 187d75c | (Rob Hoelz)++ | src/core/Mu.pm: Still invoke $.Str from Stringy |
|||
hoelzro | lizmat++ nice work on the bare say! | ||
I'm seeing a bunch of warnings even before my S26 merge | 12:56 | ||
12:56
guru joined,
xfix joined,
anaeem___ left,
guru is now known as Guest99782
12:57
anaeem1 joined,
Guest99782 is now known as ajr_,
anaeem1 left
|
|||
moritz | hoelzro: isn't Mu.Stringy a relatively hot path? | 12:59 | |
I'm kinda worried about introducing a dynamic var there | |||
m: my $x := Nil; '' ~ $x | 13:00 | ||
camelia | rakudo-moar b6b3f5: OUTPUT«use of uninitialized value of type Nil in string context in block <unit> at /tmp/CWh1EV7PTJ:1» | ||
hoelzro | hmm, you're probably right | 13:01 | |
the dynamic var is only created for undefined invocants, though, if that helps | 13:02 | ||
FROGGS | that's what it was at the release: github.com/rakudo/rakudo/blob/5dd1...Mu.pm#L402 | ||
moritz | hoelzro: yes, might help | 13:04 | |
FROGGS | do we need the variable name in that warning at all? | 13:07 | |
I mean, this often led to leaking internal variable names | |||
13:10
perlpilot is now known as PerlJam
|
|||
hoelzro | well, we don't *need* it | 13:12 | |
it's just a very nice-to-have, especially for people coming from Perl 5 | 13:13 | ||
13:13
rindolf left,
rindolf joined
|
|||
flussence | colomon: I've hacked around that Test-ClientServer/t/ hang for the time being, hope that helps. | 13:14 | |
BenGoldberg | m: my $a = 'abc'; $a R~= 'd'; say $a; # how do I make this produce 'abcd' ? | 13:16 | |
camelia | rakudo-moar b6b3f5: OUTPUT«Cannot modify an immutable Str in block at src/gen/m-CORE.setting:17800 in block at src/gen/m-CORE.setting:17812 in block <unit> at /tmp/45fd9tO_tI:1» | ||
flussence | (it's ironic that that problem's in a bit of code that exists entirely to *prevent* test lockups...) | ||
13:16
ivanshmakov left
|
|||
BenGoldberg | m: my $a = 'abc'; $a [R~]= 'd'; say $a; # This doesn't work, either. | 13:17 | |
camelia | rakudo-moar b6b3f5: OUTPUT«Not enough positional parameters passed; got 0 but expected 2 in block at src/gen/m-CORE.setting:17812 in block <unit> at /tmp/FFzbNQsN_Y:1» | ||
FROGGS | m: my $a = 'abc'; 'd' R~= $a; say $a; | ||
camelia | rakudo-moar b6b3f5: OUTPUT«abcd» | ||
BenGoldberg | Oops, I mistated my goal: I want 'dabc' | ||
FROGGS | BenGoldberg: you have to swap the operands when you use R | ||
ohh | |||
[Coke]_ | m: say | 13:18 | |
BenGoldberg needs more coffe | |||
camelia | rakudo-moar b6b3f5: OUTPUT«Unhandled exception: Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at <unknown>:1 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295) from sr…» | ||
[Coke]_ | m: say() | ||
camelia | rakudo-moar b6b3f5: OUTPUT«Unhandled exception: Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at <unknown>:1 (/home/p6eval/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295) from sr…» | ||
13:18
[Coke]_ is now known as [Coke]
|
|||
PerlJam | BenGoldberg: my $a = "abc"; $a = "d$a"; # :-) | 13:18 | |
[Coke] | std: say | ||
camelia | std 53b3ca6: 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/7LcH6qoC9G line 1:------> say⏏<EOL>Check failedFAILED 00:00 120m» | ||
[Coke] | std: say() | ||
camelia | std 53b3ca6: OUTPUT«ok 00:01 121m» | ||
BenGoldberg | n: say() | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«» | ||
FROGGS | BenGoldberg: I'm afraid, I think you have to do it the 'long' way | 13:19 | |
BenGoldberg | Oh well :) | ||
m: sub encode($n is copy) { my $m = 0; my $rest = ''; while ($n) { $n = $n.base(10); ++$m; $rest = $n~$rest; $n = $n.chars-1; }; $m.base(36)~$rest; }; say [lt] map { encode($_) }, ^2000 | 13:20 | ||
camelia | rakudo-moar b6b3f5: OUTPUT«True» | ||
BenGoldberg | grondilu, there's a solution for you ^ :) | ||
PerlJam | m: my $a = 'abc'; $a=($a.flip ~ 'd').flip; say $a # this is the *long* way :) | 13:21 | |
camelia | rakudo-moar b6b3f5: OUTPUT«dabc» | ||
BenGoldberg | m: sub encode($n is copy) { my $m = 0; my $rest = ''; while ($n) { $n = $n.base(36); ++$m; $rest = $n~$rest; $n = $n.chars-1; }; $m.base(36)~$rest; }; say [lt] map { encode($_) }, ^2000 | 13:22 | |
camelia | rakudo-moar b6b3f5: OUTPUT«True» | ||
[Coke] | n: use Test; eval_dies_ok('say', 'what'); | ||
PerlJam | BenGoldberg: you can shorten $n = $n.base(10) to $n.=base(10); That'll help mitigate those extra chars you had to use to prepend | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«ok 1 - what» | ||
[Coke] | M: use Test; eval_dies_ok('say', 'what'); | ||
13:22
ivanshmakov joined
|
|||
[Coke] | m: use Test; eval_dies_ok('say', 'what'); | 13:22 | |
camelia | rakudo-moar b6b3f5: OUTPUT«Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument in sub eval_exception at lib/Test.pm:319 in sub eval_dies_ok at lib/Test.pm:240 in sub eval_dies_ok at lib/Test.pm:238 in bloc…» | ||
BenGoldberg | m: sub encode($n is copy) { my $m = 0; my $rest = ''; while ($n) { $n = $n.base(36); ++$m; $rest = $n~$rest; $n = $n.chars-1; }; $m.base(36)~$rest; }; say map { encode($_) }, ^40; | ||
camelia | rakudo-moar b6b3f5: OUTPUT«0 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 1G 1H 1I 1J 1K 1L 1M 1N 1O 1P 1Q 1R 1S 1T 1U 1V 1W 1X 1Y 1Z 2110 2111 2112 2113» | ||
BenGoldberg | m: sub encode($n is copy) { my $m = 0; my $rest = ''; while ($n) { $n = $n.base(36); ++$m; $rest = $n~$rest; $n = $n.chars-1; }; $m.base(36)~$rest; }; say map { encode($_).chars - $_.Str.chars }, ^100; | 13:24 | |
camelia | rakudo-moar b6b3f5: OUTPUT«0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2» | ||
BenGoldberg | It is a nearly-universal numeric coding, whose outputs are at most 2 letters longer than ordinary base 10. | 13:25 | |
13:26
gmunoz joined
|
|||
BenGoldberg | And, unlike ordinary base 10, the results are in lexigraphical order :) | 13:26 | |
13:26
gmunoz is now known as zoosha
|
|||
hoelzro | moritz: I found no performance issues, but I did find a regression | 13:35 | |
the section links aren't being correctly generated | |||
I have to start getting to work, but I'll check it out tonight | 13:36 | ||
[Coke] | m: my $::x | 13:37 | |
13:37
rindolf left
|
|||
camelia | ( no output ) | 13:37 | |
[Coke] | m: my $::x = 3; say $::x; | ||
camelia | rakudo-moar b6b3f5: OUTPUT«===SORRY!=== Error while compiling /tmp/B2xaa_Iy_oVariable '$x' is not declaredat /tmp/B2xaa_Iy_o:1------> my $::x = 3; say $::x⏏; expecting any of: postfix» | ||
13:37
rindolf joined
|
|||
dalek | ast: 2759035 | (Elizabeth Mattijsen)++ | S32-exceptions/misc.t: TODO test for bare say being a compile time error |
13:40 | |
[Coke] | m: say (3+4i).reals.fmt("%d %d") | 13:41 | |
camelia | rakudo-moar 187d75: OUTPUT«No such method 'item' for invocant of type 'NQPMu' in method message at src/gen/m-CORE.setting:12938» | ||
[Coke] | lizmat: see also S16-io/bare-say.t | ||
lizmat | std: print | 13:43 | |
camelia | std 53b3ca6: OUTPUT«===SORRY!===Unsupported use of bare 'print'; in Perl 6 please use .print if you meant $_, or use an explicit invocant or argument at /tmp/q3iLRLpKId line 1:------> print⏏<EOL>Check failedFAILED 00:00 120m» | ||
lizmat | std: print() | ||
camelia | std 53b3ca6: OUTPUT«ok 00:00 121m» | ||
lizmat | I'm not sure what one would mean by 'print()' that wouldn't warrant the same error | 13:44 | |
[Coke] | no clue, just reporting about the old ticket. | ||
carlin | m: my $x = "foobar"; say $x.split | 13:46 | |
camelia | rakudo-moar 187d75: OUTPUT«Cannot call 'split'; none of these signatures match::(Cool: Regex $pat, Any $limit = { ... }, Any :all($all), *%_):(Cool: Cool $pat, Any $limit = { ... }, Any :all($all), *%_):(Str:D: Regex $pat, Any $limit = { ... }, Any :all($all), *%_):(Str:…» | ||
carlin | m: my $x = "foobar"; say $x[2] | ||
camelia | rakudo-moar 187d75: OUTPUT«Index out of range. Is: 2, should be in 0..0 in method gist at src/gen/m-CORE.setting:13255 in sub say at src/gen/m-CORE.setting:14193 in block <unit> at /tmp/0S0eb1ZMJF:1» | ||
carlin | ah, my local rakudo was busted | 13:54 | |
13:55
rindolf left,
rindolf joined
|
|||
BenGoldberg | A bare say at least might be expected to produce a newline. A bare print seems useless, unless we want to change the spec to it uses $_ like perl5. | 13:57 | |
[Coke] | m: my $x = "hi"; say $x[0]; | ||
camelia | rakudo-moar 187d75: OUTPUT«hi» | ||
lizmat | fwiw, a bare say in p5 prints a newline | ||
timotimo | i would like for say; to generate a newline | ||
lizmat | oops, no: in p5 it takes $_ | 13:58 | |
and that's what TimToady is against (for good reasons, I might add :-) | |||
timotimo | yeah | ||
lizmat | $ perl5.20.0 -E '$_=42; say' | ||
42 | |||
timotimo | well, i'd also accept say doing the newline thing only if you "use idontcareaboutperl5" | 13:59 | |
huf | no v5; at the top? | ||
timotimo | maybe like that, yeah | 14:00 | |
grondilu | m: sub f returns Int { 1/1 }; say f' # shouldn't there be automatic promotion to Int? | 14:02 | |
camelia | rakudo-moar 187d75: OUTPUT«===SORRY!=== Error while compiling /tmp/O0w0DKeXjeTwo terms in a rowat /tmp/O0w0DKeXje:1------> sub f returns Int { 1/1 }; say f⏏' # shouldn't there be automatic promot expecting any of: argu…» | ||
timotimo | m: try eval "say"; say $!.WHAT; say $!.perl; | ||
camelia | rakudo-moar 187d75: OUTPUT«===SORRY!=== Error while compiling /tmp/RLWzU96VhOUndeclared routine: eval used at line 1» | ||
timotimo | m: try EVAL "say"; say $!.WHAT; say $!.perl; | 14:03 | |
camelia | rakudo-moar 187d75: OUTPUT«Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument in block <unit> at /tmp/rvw2qgoPEO:1» | ||
lizmat | timotimo [Coke] : working on making it a compile time error | ||
timotimo | ... huh? | ||
lizmat | m: { try EVAL "say"; say $!.WHAT; say $!.perl; } | 14:04 | |
camelia | rakudo-moar 187d75: OUTPUT«Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument in block <unit> at /tmp/h5PR5W9Fom:1» | ||
lizmat | hmmm... | ||
m: { try EVAL "say"; say $!.WHAT; say $!.perl; }; 1 | |||
camelia | rakudo-moar 187d75: OUTPUT«Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument in block <unit> at /tmp/oNtKmX_AxD:1» | ||
timotimo | i wasn't able to find where that error message is currently implemented | ||
lizmat | atm, it is a say MMD candidate | ||
14:04
rindolf left
14:05
rindolf joined
14:06
_thou joined
|
|||
dalek | kudo/nom: 1450e3e | (Elizabeth Mattijsen)++ | src/core/IO.pm: Remove bare say as a candidate We need a more comprehensive approach |
14:06 | |
timotimo | theoretically, you could have "no v5" implemented in pure perl6 by wrapping the multi sub say() candidate and just { print "\n" } instead | 14:07 | |
if it's a compile-time error, that's going to be harder to "fix" | 14:08 | ||
oh well | |||
it's a step in the right direction. | |||
i'm all for errors exploding at compile time rather than at run time | |||
lizmat | if say wouldn't have a 'say (|) candidate', the optimizer would already have been complaining at compile time | 14:13 | |
timotimo | ah | ||
PerlJam | Seems to me you just add a "say" term (just like "now") that calls $*W.throw() | 14:14 | |
lizmat | PerlJam: but that would be a runtime error, no? | ||
jnthn | Oh yay...I have a big bottle of Belgian in the fridge, the AC is cranked up, and I've no work to get up for in the morning. That makes for at lesat a couple of hours hacking time. :) | ||
timotimo | yays, jnthn :) | 14:15 | |
lizmat: $*W is a compile-time construct | |||
nwc10 | the great firewall of China doesn't stop beer getting in? | 14:16 | |
[Coke] | jnthn: good evening. | ||
PerlJam | granted, there's probably some hidden difficulty behind my "just" :) | 14:17 | |
jnthn | nwc10: No, just googl emaps requests getting in/out :) | ||
o/ [Coke], timotimo | |||
I should probably backlog properly, but - why aren't we stealing precisely the STD solution for say? :) | |||
[Coke] | I figure if it was easy, someone would have done it 4 years ago? ;) | 14:18 | |
jnthn | Ok, fine, I'll do it :P | ||
jnthn looks at STD | |||
timotimo | don't waste precious jnthn time for such little details :P | ||
jnthn: i'll have a look | 14:19 | ||
lizmat wonders where jnthn looks at STD | |||
jnthn | Well, this one comes up again and again, and I'd like to see it nails. | ||
std: say | |||
PerlJam | ah, STD is more general too in that it fixes this for many things. | ||
camelia | std 53b3ca6: 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/ltWTMfGTPT line 1:------> say⏏<EOL>Check failedFAILED 00:01 120m» | ||
TimToady | except, of course, that it just uses a list | ||
rather than having a trait | |||
PerlJam | aye | ||
jnthn | Ah, there... | ||
TimToady | or a signature | ||
14:19
PotatoGim^Home joined
14:20
PotatoGim^Home left
|
|||
timotimo | ah, yeah, it has the %deftrap thing | 14:20 | |
jnthn: OK, you can do it :P | |||
jnthn | :P | ||
PerlJam waits for the future to become slightly more distributed ;) | |||
14:20
PotatoGim^Home joined
|
|||
jnthn has also found a nice Indian restaurant here :) | 14:21 | ||
lizmat wonders (again) where everybody looks at STD | |||
nwc10 | jnthn: that seems to happen to you surprisingly often | ||
jnthn | lizmat: github.com/perl6/std/blob/master/STD.pm6 | ||
TimToady | jnthn: I'm this close to having anonymous rvalue variables working; they successfully declare a variable, but then lose track of it somewhere | ||
timotimo | huh? i don't even know what "anonymous rvalue variables" is for :S | ||
jnthn | nwc10: Well, it got to the point that eating Chinese/Korean noms each day was starting to overwhelm my stomach, so something more familiar to it is nice to find. :) | ||
TimToady | so if I say: $; $ANON_VAR__1 = 42; say $ANON_VAR__1 then it prints 42 | 14:22 | |
but $ = 42 gets a NQPMu | |||
jnthn | A NQPMu where, exactly? | ||
TimToady | I don't know how to answer that, which is part of the problem :) | 14:23 | |
14:23
aborazmeh left
|
|||
jnthn | Does it leak into Perl 6 land? | 14:23 | |
Or does it crop up during compilation? | 14:24 | ||
It may be easiest for me to look at a patch; working on the death trap first. :) | |||
TimToady | m: $ = 42 | 14:25 | |
camelia | rakudo-moar 187d75: OUTPUT«===SORRY!===Unknown QAST node type NQPMu» | ||
TimToady | an older version, but shows the issue | 14:26 | |
nwc10 | jnthn: it was more the "nice" part. You seem to have consistent good luck in finding reasonable Indians | ||
timotimo | hm, so maybe it expects to build a QAST::Var somewhere, but if the name isn't set it doesn't end up assigning to the $var that would hold it | ||
and then it puts $var into the qast tree without checking? | |||
jnthn | nwc10: Research. ;) | 14:29 | |
nwc10: I've found the odd bad one, but online reviews are good for avoiding many of the sucky ones. | |||
dalek | kudo/nom: c711b1e | TimToady++ | src/Perl6/Actions.nqp: latest version of rvalue $ |
14:30 | |
nwc10 | do you have a co-worker who always seens to end up going to gigs where all the Indians are LTA, and he/she has no idea why that happens? :-) | ||
jnthn | TimToady: That often means you incorporated something into the QAST tree that was undefined; most often due to .ast on something make wasn't called on :) | ||
nwc10: No, actually I have many co-workers who also like Indian noms, so we share tips :) | 14:31 | ||
TimToady | but it's in the same path as a normal token variable, so it oughta return the ast the same way from there upward | ||
jnthn | At one place we got it down to the level of "don't eat at X on a Monday 'cus the usual chef is off that day and it sucks, but any other day is wonderful" :) | ||
nwc10 | jnthn: so if everyone is busy, clients who are in places with good Indians seem to get priority for gigs? :-) | ||
14:32
mberends joined
|
|||
nwc10 | oh gosh | 14:32 | |
mberends: MoarVM is fast! | |||
TimToady | well, faster :) | ||
nwc10 | I suppose that's true too. | 14:33 | |
timotimo | nwc10: that seems like a response to something, but i don't see what it's in response to ... !? | ||
nwc10 | partly, that I've not seen mberends in ages | ||
mberends | nwc10: yes! I'm currently at DebConf14 and one of my goals here is to become Debian Maintainer for MoarVM :-) | 14:34 | |
dalek | kudo/nom: dd580df | (Elizabeth Mattijsen)++ | src/core/Exception.pm: We don't need no bare exception either |
||
nwc10 | mberends: cool | ||
mberends: I don't know how many architectures it's currently portable to | |||
lizmat | one of these days I hope to be able doing some commits that I don't need to revoke a few hours later | ||
[Coke] | nwc10: nobody sees mberends. | 14:35 | |
nwc10 | at one point it has worked on x86_64, x86, arm and ppc | ||
PerlJam | lizmat++ I was just looking at that. Apparently we already have X::TypeCheck::Argument which does that job already | ||
mberends | nwc10: surely just amd64 | ||
[Coke] | you're just talking to yourself, it seems. :) | ||
There he is! whew. | |||
timotimo | the first bunch of yapceu talk recordings have been uploaded: www.youtube.com/user/yapceu/videos | ||
AFAICT no perl6-related videos yet | |||
[Coke] | I even see him in backscroll a bit. weird! :) | ||
hugme: hug mberends | |||
hugme hugs mberends | |||
tadzik | mberends: it runs on my ARM phone just fine :) | 14:36 | |
nwc10 | mberends: I fail to think of an actually funny response to that, so all I can think of is "isn't it heresy in debian to just think of x86_64?" | ||
mberends hugs [Coke] | |||
nwc10 | the crazy bit was that ppc (big endian) was fairly easy, and ARM wasn't | ||
I don't have access to anything else useful, and haven't had time to check them recently. | 14:37 | ||
14:37
Alula_ joined
|
|||
masak | mberends! \o/ | 14:37 | |
mberends: I've *missed* you! :D | |||
mberends | tadzik: that's awesome, must try it on my Nexus 4 | ||
nine | moritz: I managed to write a failing test with only inline Perl 5: github.com/niner/Inline-Perl5/comm...6a7895dcc4 | ||
mberends hugs masak extra hard :D | |||
masak | FROGGS: t/spec/integration/advent2010-day12.t is the only file that fails? that's telling me we're onto something here. | ||
masak feels extra hug'd :) | |||
nwc10 | mberends: getting moarvm on debian (and hence rakudo available on more-than-just-parrot) would be really $expletive useful. | 14:38 | |
tadzik | mberends: well, "just fine" is maybe a bit of an overstatement. It did run, but running nqp on top of it resulted in a mysterious sigpipe | ||
japhb_ | jnthn: re: the gist I sent you yesterday ... is it expected that if I create promises in a tree (starting tasks that themselves make promises), I need a fair amount of threads just to make any progress at all under r-j? | ||
14:38
japhb_ is now known as japhb
|
|||
nwc10 | mberends: please ask for help if stuck, although I can't promise that I can answer | 14:38 | |
mberends | nwc10: thanks, I make no promises about timescales either | 14:39 | |
masak | m: say "bar" ~~ (15..25) | ||
camelia | rakudo-moar 187d75: OUTPUT«False» | ||
nwc10 | mberends: so, in the big mushy window after "this week" but "before Christmas"? :-/ | ||
jnthn | japhb: If you use "await" a bunch it's not smart enough (anywhere) to give the thread back to the scheduler for the time being. | ||
japhb | (anywhere) meaning "any back end"? | ||
Also: ah, hmmm. | 14:40 | ||
jnthn | japhb: That'll likely happen on MoarVM at some point in the not too distant future. On the JVM...continuation barrier stuff...mumble...argh...so yeah :) | ||
japhb | heh | ||
14:40
rindolf left
14:41
rindolf joined
|
|||
jnthn | (I really want to do it on JVM too, it's just I tried it once, and know there's some work to do) | 14:41 | |
japhb | Is there a better construction for my "outer loops" than what I gist'ed? | ||
(Meaning, one that doesn't trip over that problem?) | |||
14:42
donaldh left
|
|||
lizmat | I'm considering adding an "abspath" attribute to IO::Handle | 14:42 | |
japhb | lizmat: as a cache, to avoid having to compute it if someone asks? | 14:43 | |
lizmat | which would contain the absolute path | ||
14:43
smash left
|
|||
lizmat | yes, because now we get a "rel2abs" call for every file test operation | 14:43 | |
14:43
guru joined,
ajr_ left
|
|||
lizmat | and that's expensive | 14:44 | |
14:44
guru is now known as Guest53698,
Guest53698 is now known as ajr_
|
|||
lizmat | method abspath { $!abspath //= rel2abs($!path) } # something like that | 14:44 | |
japhb | Yeah, it is. I haven't been able to follow the discussion -- was there any progress in making rel2abs any less expensive, or has it just hit a wall that we can't improve right now? (And if so, what is that wall?) | 14:45 | |
14:45
SamuraiJack joined
|
|||
lizmat | for Unix we can simplify, but not for Win | 14:45 | |
14:45
BizarreCake left
|
|||
lizmat | in the best case, rel2abs is: return self.canonpath($path) if self.is-absolute($path); | 14:46 | |
the canonpath is rather extensive and involved | 14:47 | ||
mberends | nwc10: yes, definitely between next week^Wmonth and Christmas :-/ | ||
japhb | nodnod | ||
lizmat | I guess I could make the canonpath a multi | 14:48 | |
japhb | lizmat: But is it *correct*? There are so many edge cases in path canonicalization, I'm wondering if we even handle it properly (where "as well as Perl 5" would be a good start) | ||
14:48
smash joined
|
|||
lizmat | one with and one withhout :$parent | 14:48 | |
japhb: I only know that if a change the smallest thing, I get spectest errors :-) | |||
*I | 14:49 | ||
14:49
denis_boyun_ joined
|
|||
japhb nods in appreciation of that particular pain | 14:50 | ||
lizmat | I guess another thing making this slow, is the forced runtime lookup of methods | 14:51 | |
method rel2abs( |c ) { $SPEC.rel2abs( |c ) } | |||
14:52
rindolf left
14:55
ajr joined,
ajr_ left
|
|||
masak | m: set(1, 2) ~~ set(1, 2, 3) | 14:56 | |
camelia | ( no output ) | ||
14:56
ajr is now known as Guest66751
|
|||
masak | m: say set(1, 2) ~~ set(1, 2, 3) | 14:56 | |
camelia | rakudo-moar 1450e3: OUTPUT«False» | ||
14:56
Guest66751 is now known as ajr_
|
|||
masak | m: say set(1, 2) (<) set(1, 2, 3) | 14:56 | |
camelia | rakudo-moar 1450e3: OUTPUT«True» | ||
14:57
bjz joined
|
|||
lizmat | m: say set(1, 2) (<) bag(1, 2, 3) | 14:58 | |
camelia | rakudo-moar 1450e3: OUTPUT«True» | ||
lizmat | m: say set(1, 2) (<) bag(1, 1, 2, 3) | ||
camelia | rakudo-moar 1450e3: OUTPUT«True» | ||
lizmat | m: say set(1, 2) (<) bag(2, 3) | ||
camelia | rakudo-moar 1450e3: OUTPUT«False» | ||
lizmat | seems to work? | ||
masak | yes :) | 14:59 | |
14:59
fhelmberger_ joined,
fhelmberger_ left
|
|||
masak is thinking about smartmatching | 14:59 | ||
14:59
rindolf joined
|
|||
masak | here is the draft of my change so far: gist.github.com/masak/1322886ed7092c522bd8 | 15:00 | |
a. smartmatch on lists/parcels becomes structural; that is, it does ~~ on its elements. the fallout is that `(1, 2, 3) ~~ (1, 2, Int)` does what I expect. | |||
b. the funky behavior with whatevers in lists/arrays/parcels goes away. whatevers now mean only "whatever". tadzik++'s example in the advent post then actually becomes correct. :) | 15:01 | ||
lizmat | and how would that work for (1,2,3,4) ~~ (1,2,anyothernumber of ints) | 15:02 | |
15:02
H2O1 joined,
PotatoGim^Home left
|
|||
masak | m: say (1, 2, 3, 4) ~~ :(1, 2, *@ints where { .all ~~ Int }) | 15:02 | |
camelia | rakudo-moar 1450e3: OUTPUT«False» | ||
masak | hrm. | 15:03 | |
jnthn | std: my $s = set; | ||
camelia | std 53b3ca6: OUTPUT«===SORRY!===The 'set' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/4Znrem_HlD line 1:------> my $s = set⏏;Check failedFAILED 00:01 123m» | ||
jnthn | S02-types\set.rakudo.moar fails like that | ||
15:03
kaare_ joined
|
|||
lizmat | actually, I just realize an abspath wouldn't speed up Perl6 start time | 15:03 | |
masak | m: say (1, 2, 3, 4) ~~ :(1, 2, *@ints where { .all >>~~>> Int }) | ||
camelia | rakudo-moar 1450e3: OUTPUT«True» | ||
masak | \o/ | ||
15:03
H2O1 left
|
|||
lizmat | as each path (except one) is only ever checked once during startup anyway | 15:03 | |
masak | lizmat: when you want to do fancy stuff like "any number of X", what you want is not a smartmatch against a simple sequence. making sequences do that fragile/weird logic in the first place was crazy. | 15:04 | |
doubly so after signatures turned out to do all that better. | |||
lizmat | ok, just checking :-) | ||
jnthn | is $s, set⏏.new(5), '(|) has correct precedence.'; | 15:05 | |
bah :) | |||
masak | jnthn: Set :) | ||
jnthn | Right :) | ||
15:05
donaldh joined
|
|||
masak | lizmat: it's OK, I want this proposal to be challenged. that's why I didn't just commit it directly :) | 15:05 | |
lizmat | the coercer has the same name as the type | ||
jnthn | TimToady: I get a failure in S32-str/substr-rw.t claiming "Unsupported use of $$ variable; in Perl 6 please use $*PID" over is($$r⏏, "gloop", '$r referent is eq to the sub | 15:06 | |
masak | m: say (1, 2, 3, 4, 5) >>~~>> Int | ||
camelia | rakudo-moar 1450e3: OUTPUT«True True True True True» | ||
jnthn | TimToady: Related to your recent patches? I don't see right off how it could be my one... | 15:07 | |
TimToady: Also another test has a "can't find method returns" | |||
Bah, I'll just push this thing then we can distribute triage :) | 15:08 | ||
dalek | kudo-star-daily: 94f4ab8 | coke++ | log/ (14 files): today (automated commit) |
||
kudo/nom: e616060 | jonathan++ | src/Perl6/Grammar.nqp: Add deftrap mechanism from STD. Catches say; and similar mistakes. |
15:09 | ||
timotimo | hurm. i cannot build rakudo-moar on a vserver i'm on because there's a 300 seconds cpu time ulimit | 15:10 | |
TimToady | jnthn: found the problem, kinda | ||
Ulti | >>~~>> just need a <3 operator to go with that | ||
jnthn | japhb: I can't see any issues in the code you sent me right away... | ||
TimToady | in Action variable, there's a make $past at the end, but it doesn't seem to work | ||
if I put an explicit make $past in my branch and return, it works | 15:11 | ||
timotimo | wait, 300 seconds should be enough | ||
TimToady | hang on, I'll test and push | ||
jnthn | timotimo: Dunno what the hardware you have is like but on my box I can build all of Moar/NQP/Rakudo in under 300s :) | ||
timotimo | after 1:11 minutes it gets "Terminated" | ||
jnthn | .oO( A server *so* fast 300s time-dilates to 71s! ) |
15:13 | |
timotimo | 2009216maxresidentk | 15:14 | |
m: say 2009216 / 1024; say 2009216 / 1024 / 1024; | |||
camelia | rakudo-moar 1450e3: OUTPUT«1962.1251.916138» | ||
timotimo | 2gb of ram | ||
could be the cause for the kill | |||
stack size (kbytes, -s) 10240 - but we shouldn't get past that limit, right? | 15:15 | ||
dalek | kudo/nom: 3d233ed | TimToady++ | src/Perl6/ (2 files): oddly, need explicit make $past; return; It should fall through and do the 'make $past' at the end of the function but doesn't. (Also, remove a useless line from check_variable.) |
||
TimToady | there, that version works, but I don't know why it's different | ||
timotimo | TimToady: you have a "my $past" in the inner scope | 15:16 | |
TimToady | ah! | ||
timotimo | that's why the $past at the end of the function ends up NQPMu | ||
dalek | ast: 42e5824 | jonathan++ | S0 (2 files): A couple of fixes for the deftrap rule. STD rejected these two before; now Rakudo does also. |
||
TimToady | timotimo++ | ||
timotimo is pleased with himself | |||
jnthn | heh, nice, does that mean I needn't look at it? :) | 15:17 | |
timotimo | i hope so :) | ||
TimToady feels appropriately stupid :) | |||
timotimo | blame your recent eye troubles | ||
TimToady | jnthn: yes, that's preciselyu what it means | ||
well, and that I'm a lousy programmer :) | 15:18 | ||
jnthn | std: say() | ||
camelia | std 53b3ca6: OUTPUT«ok 00:01 121m» | ||
jnthn | That isn't meant to be an error, right? | ||
('cus we have a spectest that things it is, and I'm about to nuke it) | |||
*thinks | |||
dalek | kudo/nom: 114ba1d | TimToady++ | src/Perl6/Actions.nqp: remove stupid 'my' spotted by timotimo++ |
||
TimToady | say() and say '' are both fine, I think, and likewise set(), to indicate emptiness explicitly | 15:19 | |
timotimo | std: say() | 15:20 | |
camelia | std 53b3ca6: OUTPUT«ok 00:01 121m» | ||
timotimo | m: say() | ||
camelia | rakudo-moar 1450e3: OUTPUT«» | ||
timotimo | m: say | ||
camelia | rakudo-moar 1450e3: OUTPUT«» | ||
timotimo | i'm fine with say() working and say complaining | ||
it's a bit less pretty, but it'll still get the point across | |||
tadzik | masak: which example? | ||
masak | tadzik: irclog.perlgeek.de/perl6/2014-08-29#i_9263844 | 15:22 | |
tadzik: FROGGS was spectesting making ~~ structural, and it had exactly one failure in that file. | |||
FROGGS++ | |||
[Coke] | m: say for 1 | 15:23 | |
camelia | rakudo-moar 1450e3: OUTPUT«» | ||
[Coke] | m: say for 1 | ||
camelia | rakudo-moar 1450e3: OUTPUT«» | ||
[Coke] | oh, are we not caught up here? | ||
timotimo | exactly | ||
it should work as expected after the next update | |||
[Coke] | jnthn: "say for 1" dies as expected. "say for 1" does not. | 15:24 | |
std: say for 1 | |||
masak | TimToady: any thoughts on gist.github.com/masak/1322886ed7092c522bd8 ? | ||
camelia | std 53b3ca6: 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/Ceno6bWhot line 1:------> say⏏ for 1Check failedFAILED 00:01 121m» | ||
[Coke] | std: say for 1 | ||
camelia | std 53b3ca6: 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/gbC6IdRsb7 line 1:------> say⏏ for 1Check failedFAILED 00:01 121m» | ||
jnthn | [Coke]: Yeah, just noticed that. wtf. | 15:26 | |
dalek | ast: 06159ea | jonathan++ | S16-io/bare-say.t: Unfudge passing tests; toss a bogus one. |
15:27 | |
15:29
rindolf left,
rindolf joined
|
|||
jnthn | [Coke]: Fixed it locally, so now bare-say.t can pass in full | 15:30 | |
timotimo | looking forward to seeing what caused that behavior %) | 15:31 | |
15:31
rindolf left
|
|||
jnthn | Well, I kinda cheated on the fix. | 15:32 | |
:) | |||
lizmat | m: do { return 42 } | ||
camelia | ( no output ) | ||
timotimo | does that mean say for 1 will still fail now? :P | ||
lizmat | hmmm.. that segfaults locally | ||
timotimo | and after that say for 1? :D | ||
masak | m: do { return 42 }; say "I will survive" | 15:33 | |
camelia | ( no output ) | ||
masak | lizmat: well, *something* is wrong. | ||
(and it's in RT at least once already) | |||
lizmat | yeah, I know: I was just wondering about the segfault | ||
easy segfaults are the best food of the debugger :-) | 15:34 | ||
cxreg | after all these years i still <3 electricfence | 15:36 | |
15:43
tphilipp joined
|
|||
dalek | kudo/nom: a98d264 | jonathan++ | src/Perl6/Grammar.nqp: Make "say for 1;" complain also. |
15:53 | |
jnthn | m: say; | ||
camelia | rakudo-moar dd580d: OUTPUT«» | ||
jnthn | ENOTYET... | ||
dalek | ast: 927f3e1 | jonathan++ | S16-io/bare-say.t: Unfudge "say for 1;" test. |
15:54 | |
15:54
tphilipp left
|
|||
dalek | ast: 1059587 | TimToady++ | S03-operators/context.t: update for anonyvars |
15:55 | |
jnthn read that as "annoyvars" :) | |||
TimToady | m: say ++$ | 15:57 | |
camelia | rakudo-moar dd580d: OUTPUT«===SORRY!===Cannot find method 'returns'» | ||
TimToady | not there yet | ||
so, who owned "planeteria"? | 15:59 | ||
15:59
MilkmanDan joined
16:01
jack_rabbit joined
|
|||
TimToady | it's kind of a pity we can't just upload our newly compiled version to run under camelia immediately... | 16:01 | |
or run camelia on a machine with enough cores to recompile as soon as a change comes it | 16:04 | ||
16:06
virtualsue joined
16:09
virtualsue left
16:21
xinming left
16:24
cognome_ left
|
|||
lizmat | not ok 3 - Calling sub if without parens parsefails | 16:24 | |
jnthn TimToady ^^^ | |||
16:25
cognome joined
|
|||
lizmat | from t/spec/S02-lexical-conventions/one-pass-parsing.t | 16:25 | |
16:25
raiph joined
|
|||
lizmat | also: not ok 253 - alternation and conjunction (&|) - parse error | 16:26 | |
from t/spec/S05-mass/rx.t | |||
TimToady | probably anonyvar collision there | 16:28 | |
jnthn | TimToady: Which one? Or both? | ||
I can't imagine the latter is mine; first one may be... | 16:29 | ||
TimToady | the latter | ||
probably parsing & as a variable somehow | |||
16:29
cognome left
|
|||
TimToady | but I'll look at the &| one | 16:29 | |
m: say ++$ | 16:30 | ||
camelia | rakudo-moar dd580d: OUTPUT«===SORRY!===Cannot find method 'returns'» | ||
lizmat | $ 6 'say ++$' | ||
1 | |||
jnthn | std: sub if() { "#foo" }; say if; | ||
camelia | std 53b3ca6: 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/kG_B89Ln4H line 1:------> sub if() { "#foo" }; say⏏ if;Confused at /tmp/kG_B89Ln4…» | ||
jnthn | Rakudo now matches that error | 16:31 | |
TimToady | note that 'if' is a kind of terminator | ||
jnthn | But the test wants it to be Confused. | ||
So, the test wants an update | |||
TimToady | it is confused, in std | ||
std: sub if() { "#foo" }; say if(); | 16:32 | ||
camelia | std 53b3ca6: OUTPUT«ok 00:01 126m» | ||
lizmat | all current fails: gist.github.com/lizmat/d0968a1791e605f52ba1 | ||
jnthn | I guess it does both | ||
But throws_like now sees the first... | |||
TimToady | yes, std is being more lazily panicky | ||
lizmat | throws_like just makes sure it dies for the right reason | ||
dalek | line-Perl5: 2e80595 | nine++ | / (3 files): Allow passing Perl 6 objects through Perl 5 space. Create Perl 5 objects for Perl 6 objects passed to Perl 5 methods. Use an "unwrap" callback to get back the Perl 6 object if a wrapped object is returned by a Perl 5 method. |
16:33 | |
jnthn | lizmat: If you want an easy patch to do, making the patch I did throw a typed exception could be nice... | ||
lizmat: And then update that S02 test to look for it | |||
TimToady | it's not necessary to follow STD slavishly there | ||
lizmat | if it shouldn't die, or differently from the test, the test should be adapted | ||
jnthn | Oh, wait... | ||
It *is* a typed already... | |||
TimToady | though the Confused is perhaps useful information as to why say has no argument | ||
lizmat | if it is X::AdHoc, it isn't :-) | ||
TimToady | Any is a type too :P | 16:34 | |
16:34
denis_boyun_ left
|
|||
TimToady | maybe we should rename Any to AdHoc :) | 16:34 | |
dalek | ast: 7910209 | jonathan++ | S02-lexical-conventions/one-pass-parsing.t: Sync test to expect same error STD gives. |
||
jnthn | Well, STD calls sorryobs in this case. | 16:35 | |
TimToady | which is lazyish | ||
jnthn | So we get an X::Obselete | ||
nine | It really makes me nervous that this Inline::Perl5 stuff works with so little hassle. This ought to be much more complicated. | ||
lizmat | actually, renaming X::AdHoc to X::Die would make sense to me | ||
16:35
SAA2TAD joined
|
|||
lizmat | or X::Died | 16:35 | |
jnthn | or X::pired :P | ||
TimToady | nine: well, have you looked at diakopter's design to see where your design is going to break? | ||
nine | TimToady: not at all. Where can I find it? | 16:36 | |
TimToady | well, it's in his grant proposal | ||
jnthn | Oh heck, I need to implement DESTROY stuff for nine++ too, don't I... :) | ||
lizmat | I thought most of the design was in diakopter's head ? | ||
nine | jnthn: yes, pretty please :) | ||
TimToady | dunno if there's a separate document somewhere offhand | ||
lizmat | jnthn: well, *some* code to be executed at GC expulsion would be nice | ||
jnthn | lizmat: Yeah, the GC changes are not too bad | 16:37 | |
lizmat: It's where to run the code that's tricky. | |||
TimToady | I'm sure diakopter++ would be glad to foist some of the work off on nine++ | ||
16:37
BizarreCake joined
|
|||
carlin | using NativeCall, I have a CStruct that `has int $.v`, how do I use that to pass to a C function? `some_struct.new(v => 42)` doesn't work | 16:37 | |
lizmat | TimToady: I hope so too | 16:38 | |
16:38
jdv79 joined
|
|||
nine | TimToady: what I can find in his grant proposal is completely different from my implementation. | 16:38 | |
jdv79 | where is the planet site now? | ||
i wanted to find the link to that json lib integration so i could test the speed with the new rakudo but that's the only place i know to find that link | 16:39 | ||
jnthn | carlin: Dunno off hand but maybe check the nativecall README, or failing that the cstruct tests... | ||
nwc10 | jnthn: Josette is already busy that weekend, so can't make the APW in Salzburg :-( | ||
It's also Pycon Ireland | 16:40 | ||
TimToady would prefer to attend Pyron Iceland | 16:41 | ||
jnthn | nwc10: Aww | ||
TimToady | but I guess they've closed their airspace or so | 16:42 | |
dalek | kudo/nom: 4887ae5 | (Elizabeth Mattijsen)++ | src/core/IO.pm: Make filetests only check for existence once |
||
btyler_ | jdv79: github.com/kanatohodets/p6-json-jansson ? I'm still working on it, but I'd love feedback if you end up playing with it | ||
jnthn | Only over the immediate surroundings afaik | 16:43 | |
It's "only" a fissure eruption, last I checked... | |||
jdv79 | jansson - that's it | ||
jnthn | Probably quite pretty from a distance. :) | ||
TimToady | well, but that's where the Pyron is :) | ||
jnthn | But not ash spewing...yet. :) | ||
jnthn got to see Eyjafjallajokull errupting and since then has kinda hoped to have chane to see more volcanic stuff at some point :) | 16:45 | ||
*chance | |||
TimToady saw Mt St Helens erupt...from 150 miles away... | 16:47 | ||
16:48
domidumont joined
|
|||
lizmat is getting lost in the maze that is IO IO::Handle IO::Path and IO::Spec | 16:49 | ||
16:50
dayangkun left
|
|||
jnthn | lizmat: You and me both... :) | 16:50 | |
16:52
ajr_ left
16:53
donaldh left
16:54
rindolf joined
|
|||
tony-o | btyler_: looks p cool | 16:54 | |
btyler_ | tony-o: thanks! I think I'm going to change the api a bit, "from-json(<foo>, True)" isn't a great way to declare that you want a handle on a jansson object instead of a core p6 data structure | 16:56 | |
lizmat | hmmm.... according to spec, IO::Handle should *not* be doing IO::FileTestable | ||
btyler_ | but otherwise I feel ok about it. colomon++ spotted some bugs, the worst of which I fixed, will probably pull from his repo at some point this weekend | ||
lizmat | is that a problem in the spec? or a problem in the implementation ? | ||
also: according to spec (S32/Str), a bare say or print should warn, not die | 16:58 | ||
"As with C<print>, the compiler will warn you if you use a bare sub C<say> | |||
without arguments." | |||
About IO::FileTestable: the spec states: "If you apply that role to a class, that class must provide a C<Str> method which returns the full path." | 17:00 | ||
TimToady: is "full path" the same as "absolute path", and is therefore the .Str of IO faulty atm ? | |||
TimToady lost track of everything IO about 87,000 years ago | 17:01 | ||
lizmat | so "slushy" would be a good description of the current state of IO | 17:02 | |
tony-o | lol | ||
17:04
rindolf left,
BizarreCake left
|
|||
TimToady | m: say lol | 17:04 | |
camelia | rakudo-moar a98d26: OUTPUT«» | ||
lizmat | m: lol | ||
camelia | ( no output ) | ||
17:05
rindolf joined
|
|||
lizmat | .oO( silently laughing out load ) |
17:05 | |
TimToady | well, that's why people invented "lol" | ||
cuz you can't hear it | |||
17:05
dakkar left
|
|||
lizmat | for Dutch people, "lol" just means "fun" | 17:06 | |
with "lollig" being "funny" | |||
huf | yeah, that's how we use it too, pretty much | ||
it's a word. | |||
TimToady wonders if it's etymologically related to "droll" | |||
huf | hmm.... i think our "lol" is a bit more schadenfreude-liek | 17:07 | |
has the connotations of "what has this idiot done again?" | |||
lizmat | you can have "lol" on your own... | 17:08 | |
17:08
itz_ joined
17:12
kaare_ left
|
|||
huf | you can lol if you want to | 17:13 | |
you can leave your friends behind... | 17:14 | ||
17:17
gfldex joined
17:19
donaldh joined
17:22
donaldh left
17:23
rindolf left,
rindolf joined
17:25
itz joined
17:27
itz_ left
|
|||
[Coke] | (planeteria) site admin is working on the issue, please be patient. | 17:28 | |
17:28
zacts left
|
|||
dalek | kudo/nom: 6a6b5d0 | TimToady++ | src/core/List.pm: gist should, like, give you the tl;dr of the list |
17:29 | |
rl6-roast-data: d4ca3cc | coke++ | / (6 files): today (automated commit) |
|||
17:30
BizarreCake joined
|
|||
[Coke] | hey, someone borked the spectests. | 17:30 | |
TimToady | yes, there's still a bit of fallout from the anonyvars | ||
[Coke] | jvm: 49, moar: 68; moar-jit: 67; parrot: 731 | ||
TimToady | but it's not all my fault | 17:31 | |
[Coke] | (as of rakudo 54cd8fb, spectest 7fc8efd) | ||
grondilu | p6: subset LinComb of Hash where *.values.all ~~ Numeric; say (my % = a => 1, b => -1) ~~ LinComb | ||
[Coke] | likely story. :) | ||
17:31
itz_ joined
|
|||
TimToady | m: say ++$ | 17:31 | |
camelia | rakudo-jvm 4887ae: OUTPUT«(timeout)» | ||
..rakudo-{parrot,moar} 4887ae, niecza v24-109-g48a8de3: OUTPUT«False» | |||
rakudo-moar 4887ae: OUTPUT«1» | |||
17:31
itz left
|
|||
TimToady | say what? | 17:31 | |
oh, that's you | 17:32 | ||
or, rather, not you | |||
[Coke] ponders a script that does a roast blame on people. | 17:33 | ||
"200 new failures: possible culprits include:" | |||
hoelzro | [Coke]++ # knowing full well I will probably often appear in that listing | ||
[Coke] | Seriously, though, I'll see if I can clean those for tomororw. | 17:34 | |
nwc10 | 0) Jon Orwant, for throwing coffee mugs in the first place | ||
etc | |||
17:34
zacts joined
|
|||
grondilu | mayb camelia should reply with username: | 17:34 | |
I mean nick: | |||
TimToady | some of them may be transients | 17:35 | |
lizmat | jnthn: from a performance point of view, would it make sense to just add a fallback to IO::Spec that would install the right IO::Spec::xxx method at runtime | 17:37 | |
rather than the class method -> variable class.method approach right now? | |||
17:37
rindolf left
17:38
rindolf joined
|
|||
lizmat | to prevent this kind of mapping: method rel2abs( |c ) { $SPEC.rel2abs( |c ) } | 17:38 | |
TimToady | m: say 1...* | 17:39 | |
lizmat | possibly doing this in the optmizer? | ||
camelia | rakudo-moar 4887ae: OUTPUT«(timeout)» | ||
nwc10 | Rakudo 2014.05 doesn't build on NQP 2014.05 on MoarVM 2014.05 on PPC :-( | ||
grondilu | so with this new $++ thing I remembered there is a (state $)++ in RC's evolutionary algorithm. So I try it before I change it and I got: | ||
Internal error: invalid thread ID in GC work pass | |||
nwc10 | so, didn't nail that bug back then | ||
:-( | |||
grondilu wonders if there was not some test for RC regressions | 17:40 | ||
issue was in rosettacode.org/wiki/Evolutionary_a...thm#Perl_6 | |||
zacts | hi | ||
TimToady | zacts: lo | ||
zacts | lo | 17:41 | |
TimToady | and behold | ||
17:41
shlomif joined,
rindolf left,
shlomif is now known as rindolf
|
|||
grondilu | (the $++ seems to work, though. No idea why) | 17:43 | |
grondilu meant the $++ version of the same code | 17:44 | ||
zacts | $++ looks kind of scary to me, coming from perl5. is that $+ with a +? or is $ the default variable? I have much to learn. | 17:46 | |
17:46
telex left
|
|||
moritz | zacts: an anonymous variable $ being ++ed | 17:46 | |
zacts | ah ok | ||
moritz | m: say ++(state $) for ^10 | 17:47 | |
camelia | rakudo-moar 4887ae: OUTPUT«12345678910» | ||
BenGoldberg | Say grondilu, did you see my solution for your problem? | ||
m: sub encode($n is copy) { my $m = 0; my $rest = ''; while ($n) { $n = $n.base(36); ++$m; $rest = $n~$rest; $n = $n.chars-1; }; $m.base(36)~$rest; }; say [lt] map { encode($_) }, ^2000 | 17:48 | ||
camelia | rakudo-moar 4887ae: OUTPUT«True» | ||
17:48
telex joined
|
|||
grondilu | m: sub encode($n is copy) { my $m = 0; my $rest = ''; while ($n) { $n = $n.base(36); ++$m; $rest = $n~$rest; $n = $n.chars-1; }; $m.base(36)~$rest; }; say map { encode($_).chars }, ^10 | 17:49 | |
camelia | rakudo-moar 4887ae: OUTPUT«1 2 2 2 2 2 2 2 2 2» | ||
grondilu | m: sub encode($n is copy) { my $m = 0; my $rest = ''; while ($n) { $n = $n.base(36); ++$m; $rest = $n~$rest; $n = $n.chars-1; }; $m.base(36)~$rest; }; say uniq map { encode($_).chars }, ^1000 | ||
camelia | rakudo-moar 4887ae: OUTPUT«1 2 4» | ||
grondilu | hum not bad | ||
BenGoldberg++ | |||
BenGoldberg | :) | ||
It does have a limitation: if $m exceeds 36, then it won't be lexigraphically sorted. On the other hand, you would need truly gargantuan numbers to do that, so it's not a practical concern. | 17:52 | ||
grondilu | ok | ||
is decoding easy? | 17:54 | ||
BenGoldberg | I think so. | ||
Split off the first character, decode that char in base 36; that's the number of times to go through the inner loop. | |||
dalek | ecs: 6ab1396 | TimToady++ | S02-bits.pod: .gist only prints 100 entries of long lists |
17:56 | |
BenGoldberg | Then... hmm..... | ||
TimToady | m: say 1...* | ||
ENOTYET | |||
camelia | rakudo-moar 4887ae: OUTPUT«(timeout)» | ||
hoelzro | are dynamic variables specific to a single compilation unit? | 17:58 | |
ex. if I have $*VAR_NAME in my module, and someone else uses that same variable name in another module, will they interfere? | |||
nwc10 | mberends: sorry, looks like I ran out of time in May and never figured out how to get Rakudo itself building on PPC | ||
mberends: sorry, part 2, NQP used to work, but seems to be bust | |||
bisecting | 17:59 | ||
dalek | kudo/nom: 32cb14d | TimToady++ | src/core/List.pm: off-by-one on gist's tl;dr |
||
18:00
lizmat_ joined
|
|||
moritz | hoelzro: perl6/doc htmlify.p6 is back to < 10min with latest rakudo | 18:01 | |
18:01
rindolf left
18:02
rindolf joined
|
|||
TimToady guesses that's de-pessimizing push | 18:02 | ||
moritz | possible | ||
hoelzro | moritz: yeah, performance wasn't an issue when I tried it this morning | 18:03 | |
but the generated Pod doesn't match up yet | |||
I'll fix that after work | |||
jnthn | TimToady: About push: the reason it became pessimized wasn't so much the special case for item and avoiding the *@foo, afaict | ||
TimToady: It wsa the callsame and the fact that ruins the optimizer's ability to avoid building *%_ | 18:04 | ||
TimToady: I *think* if we can do the special case and avoid he callsame we may come out ahead... | |||
TimToady | well, the old n-ary push was not as efficient as the new one, especially for many values | 18:06 | |
but it was certainly beating the unary one in this case | |||
jnthn | Oh, there's a new n-ary push? | 18:07 | |
that may well have shifted the balance since I did the original opt | |||
I don't commit opts on guesswork; I certainly woulda measured that one at the time. | 18:08 | ||
TimToady | yes, it just does a splice rather than pushing one at a time | ||
jnthn | If you want to see an interesting profile about push, though, see the while push one in perl6-bench | ||
It spent - last I checked - > 30% of its time in sink, somehow... | |||
TimToady | that's just one-arg | ||
jnthn | I think 'cus it was sinking the list after the push, since push returns the list itself... | 18:09 | |
TimToady | I haven't got around to adding @a.push(@a) yet | ||
which is blazingly faster than it used to be | |||
for larger N | |||
18:09
molaf__ joined
|
|||
jnthn | :) | 18:09 | |
18:11
lizmat_ is now known as lizmat
|
|||
moritz | tadzik++ # panda, rebootstrap.pl | 18:12 | |
BenGoldberg | grondilu, here's a decoding function written in perl5: | 18:14 | |
eval: use warnings; sub unencode { local $_ = shift; s/(.)//; my $m = $1 or return 0; my $n = 1; for my $mm ( 1 .. $m ) { warn "[$m;$n;$mm;$_]\n"; s/(.{$n})// or die; $n = $1 }; $_ }; [ unencode("3114562949953421312") ]; | |||
I'm sure it can be easily be rewritten in perl6... but I'm not good at golfing, yet :) | 18:15 | ||
lizmat | the more I look at it, I think IO::Path is overenginieered and mostly useless | ||
a lot of effort is spent converting IO::Path to Str and vice-versa | 18:16 | ||
grondilu | p6: role Foo {}; my %h = ("foo" but Foo) => 1; say %h.keys[0] ~~ Foo; | ||
camelia | rakudo-{parrot,jvm,moar} 4887ae, niecza v24-109-g48a8de3: OUTPUT«False» | ||
18:16
perfectredneck joined
|
|||
grondilu | so Hash keys can not have a role attached to them? | 18:17 | |
lizmat | typed hashes can contain anything, including objects with roles attached to them? | ||
or is that not what you mean? | |||
TimToady | m: role Foo {}; my %h{Any} = ("foo" but Foo) => 1; say %h.keys[0] ~~ Foo; | ||
camelia | rakudo-moar 4887ae: OUTPUT«True» | ||
TimToady | grondilu: ^^ | 18:18 | |
grondilu | oh, ok | ||
grondilu is not quite familiar with typed structures | |||
18:18
perfectredneck left
|
|||
lizmat | some subs even have a Str candidate in the spec: | 18:18 | |
multi sub visitdir(Str:D) | |||
multi sub visitdir(IO::Path:D) | |||
nine | moritz: do you have some time to look at my strange method call problem? | ||
jnthn | nine: What is the problem, ooc? | 18:19 | |
nine: Is it a MOP-related thing? | |||
jnthn might be able to give a hint if so... | 18:20 | ||
nine | jnthn: yes, you might. I managed to write a test with only inline Perl 5: github.com/niner/Inline-Perl5/comm...6a7895dcc4 | ||
jnthn: we're using add_fallback to pass through method calls on Perl5Objects to the Perl 5 interpreter: github.com/niner/Inline-Perl5/blob...5.pm6#L247 | 18:22 | ||
jnthn: but there's strange calls to "sink" and in the test, $!perl5 seems to end up being a Perl5Object instead of a PerlInterpreter | |||
jnthn | nine: Yes, that's because things in void context do .can('sink') or so | 18:23 | |
Perl5Object.^add_fallback(-> $, $ { True }, | |||
That means you're claiming you support *every* method. | |||
You migh try adding a method sink() { self } in Perl5Object | 18:24 | ||
Eventually, though, we really should write a Perl5HOW meta-object... | |||
That way we can even have Perl 5 object dispatches go through the method cache rather than the slow path. | 18:25 | ||
18:27
rindolf left
18:28
rindolf joined
|
|||
nine | jnthn: ok that takes care of the "sink" problem. But there's still the following error: paste.scsys.co.uk/420296 caused by $!perl5 being a Perl5Object instead of a PerlInterpreter. I really have no idea why. The code seems to be very straight forward. | 18:29 | |
jnthn | My latest talk slides are now linked from jnthn.net/articles.shtml | 18:30 | |
18:31
brrt joined
|
|||
brrt | \o | 18:31 | |
18:31
guru joined
18:32
guru is now known as ajr_
|
|||
dalek | line-Perl5/transparent_method_call_regression: 71dcdeb | nine++ | lib/Inline/Perl5.pm6: Add a sink method to Perl5Object as suggested by jnthn++ Apparently can('sink') may be called on Perl5Objects in some situations. Since we claim to support _any_ method, we have to provide a somewhat sane implementation. |
18:32 | |
ajr_ | 150 miles away sounds like a good distance at which to view Mt. St. Helens erupt. | 18:33 | |
dalek | ast: 48160f2 | TimToady++ | S03-operators/context.t: anonymous & doesn't make a lot of sense |
||
BenGoldberg | If I could, I'd watch Mt. St. Helens erupt from Iceland, and vice versa. ;) | 18:34 | |
dalek | kudo/nom: 9a9da9f | TimToady++ | src/Perl6/Grammar.nqp: anonymous & doesn't make a lot of sense (and causes bugs in rx parsing of &) |
||
jnthn | nine: Hmm....what on earth... | ||
nine: You're sure it's actually that the value is changing? | 18:35 | ||
TimToady | m: say 1...* | 18:36 | |
camelia | rakudo-moar 32cb14: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8…» | ||
lizmat | given a file "foo" with "foo" in it, and "bar" with "bar in it: | ||
this seems *very* wrong to me: | |||
$ 6 'my $h = "foo".IO.open; $h.open("bar"); say $h.lines' | |||
bar | |||
TimToady | m: say 1,1...* | ||
camelia | rakudo-moar 32cb14: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...» | ||
18:36
denis_boyun_ joined
|
|||
dalek | line-Perl5/call_backs: a563d94 | nine++ | / (3 files): Failing call backs |
18:36 | |
TimToady | notice that's rakudo's ... there | ||
lizmat | in other words, you can open another file on an open file handle, and it will read from the new file from there one | 18:37 | |
*on | |||
is this intended as a feature? or is this a bug? | |||
TimToady | but what kind of output is that.... | ||
BenGoldberg | lizmat, That's not very different from how perl5 does it. | ||
Or stdio. | |||
Reusing a handle isn't that uncommon. | 18:38 | ||
brrt | ooh TimToady i meant to bug you about the recent div spec change | ||
lizmat | that it changes the file handle *itself* ? | ||
BenGoldberg | ? | ||
jnthn | TimToady: wtf, why the 1 1 1... | ||
brrt | that's a spesh or jit error | 18:39 | |
TimToady | m: say (1,1...*) | ||
camelia | rakudo-moar 32cb14: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...» | ||
TimToady | cool! | ||
brrt | bug! | ||
TimToady | m: say (1,1.1...*) | ||
camelia | rakudo-moar 32cb14: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 6.7 6.8 6.9 7 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 8 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 9 9.1 …» | ||
brrt | :-) | ||
TimToady | wow | 18:40 | |
nine | jnthn: I put a warn $!perl5 in there and I get a line with: Perl5Object<139780065295616> in block at /home/nine/Inline-Perl5/lib/Inline/Perl5.pm6:237 | ||
jnthn | 57 is a magical number | ||
BenGoldberg | m: say ('a',1.1...*); | ||
camelia | rakudo-moar 32cb14: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 -54.9 -55.9 -56.9 -57.9 -58.9 -59.9 -60.9 -61.9 -62.9 -63.9 -64.9 -65.9 -66.9 -67.9 -68.9 -69.…» | ||
BenGoldberg | m: say (3,'a'...*); | ||
camelia | rakudo-moar 32cb14: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci c…» | ||
brrt | what the | ||
TimToady | m: say (0, 1/10 ... 1) | ||
camelia | rakudo-moar 32cb14: OUTPUT«1 2 3 4 5 6 7 8 9 10 11» | ||
18:40
SamuraiJack left
|
|||
jnthn | 100 = number of iterations of a loop for OSR to trigger + 8 = number of trace iterations... | 18:40 | |
TimToady | there's a spectest failing from this one | ||
brrt | i can imagine | 18:41 | |
TimToady | specifically that 0, 1/10 one | ||
brrt | what i wanted to bug about: integer division rounds to <negative infinity | zero > | ||
which one? | |||
TimToady | integration/advent2013-day15.t | ||
lizmat | BenGoldberg: indeed, I'm surprised... | 18:42 | |
and this is a good thing because ? | |||
I mean, in Perl 6 the old handle at the OS level will probably stay open, as we don't DESTROY | |||
TimToady | m: say ~(0, 1/10 ... 1) | ||
camelia | rakudo-moar 32cb14: OUTPUT«0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1» | ||
nine | jnthn: $!perl5 is actually the same as self in that case. | ||
jnthn | lizmat: Feels like a wtf to me... | ||
TimToady | ooh, it's something about my gist change | 18:43 | |
BenGoldberg | I'm not saying it's a good thing, just not a surprising thing. | ||
TimToady | m: say (0, 1/10 ... 1).gist | ||
camelia | rakudo-moar 32cb14: OUTPUT«1 2 3 4 5 6 7 8 9 10 11» | ||
TimToady | huh | ||
lizmat | it's surprising to me.. :-) | ||
jnthn | lizmat: Well, the VM GCs IOHandles and will close them... | ||
lizmat: So we're not *too* bad from that angle. | |||
lizmat: Unless the original handle makes gen2. | |||
From data I'm seeing at present, full collection frequency wants to becme a function of bytes promoted | 18:44 | ||
lizmat | ok, but still, you run the risk of running out of OS handles pretty soon in some applications that way | ||
BenGoldberg | If you reopen the same handle to a different file, the old c-level filedescriptor gets closed right away, instead of having to wait for GC. | ||
TimToady | oh, duh, I'm an idgit | ||
BenGoldberg | Or at least, it should. | ||
lizmat | pretty sure it doesn't in rakudo atm | 18:45 | |
jnthn | BenGoldberg: That's now how things actually work unless we make it so | ||
And what lizmat said | |||
lizmat | it's just doing a nqp::bindattr | ||
and that doesn't know about filehandles | |||
jnthn | To me, trying to do .open on a dhnel a second time is likely to be a bug. | ||
*handle | |||
So better to whine, I think... | |||
lizmat | feels "DOS"sy to me | ||
TimToady | testing fix | 18:46 | |
lizmat | as in MS-DOSsy | ||
BenGoldberg | If we run out of OS-level filehandles, does it trigger a GC? | ||
nwc10 | BenGoldberg: no. (I know that already) | ||
TimToady | though I don't understand why it worked around my nested $_ binding bug halfway through | 18:47 | |
probably indicates a different bug | |||
18:47
ggherdov left
|
|||
brrt | we have a known inlining-related bug in moar with $_ | 18:48 | |
jnthn | brrt: We...do? | 18:49 | |
brrt | aye | ||
dalek | kudo/nom: 1ff1d30 | TimToady++ | src/core/List.pm: don't use $_ two different ways previous .gist patch did just that, TimToady-- |
||
jnthn | Ticket? | ||
brrt | you probably have missed that since flight | ||
let me see that | |||
TimToady | would that account for my buggy code getting the right (wrong) $_ after 57? | 18:50 | |
brrt | github.com/MoarVM/MoarVM/issues/127 jnthn | ||
jnthn | TimToady: As I said, 57 is a *very* suspect number | ||
lizmat | TimToady: not sure whether that fix isn't just circumventing a spec bug | ||
*spesh / jit | |||
TimToady | what I just said | ||
18:51
ggherdov joined
|
|||
TimToady | it just showed the other bug by accident | 18:51 | |
brrt | i'd note that the old behaviour (div int rounding to zero) never caused one spectest to fail :-) | ||
TimToady | by compensating for my mistake partway through :) | ||
18:52
elfphiltrum joined,
elfphiltrum left
|
|||
TimToady | unfortunately, I tested the sequence 1...* so I didn't see the error, and wrote off the failure in integration as some Rat problem | 18:53 | |
wasn't until I tried the 1,1...* here to get the gist to fit into camelia's limit that I spotted the goofup | 18:54 | ||
lizmat finally sees the goofup | 18:55 | ||
TimToady | yes, it sort of doesn't register at first | 18:56 | |
m: say 1,1,*+*...* | 18:57 | ||
camelia | rakudo-moar 32cb14: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 591286729879 956722026041 1548008755920 2504730781961 4052739537881 6557470319842 106102098577…» | ||
TimToady | we now get an answer to that from camelia | ||
jnthn | brrt: Thanks, got a fix for #127 locally | ||
brrt | jnthn++ | ||
TimToady | even if it's still the wrong answer in the first 57 spots | ||
jnthn | Nemozem inline le getlexouter... :) | 18:58 | |
TimToady | wow, and that's the exact bug I hit...how lucky I am! :) | ||
brrt | :-) | 18:59 | |
TimToady | escape analysis should be really easy on anonymous variables | 19:00 | |
jnthn | Pushed the fix. | ||
brrt | jnthn++ | 19:01 | |
19:01
rindolf left
|
|||
jnthn | And yeah, guess that one got lost in my travel blind spot :) | 19:01 | |
FROGGS | o/ | ||
jnthn | o/ FROGGS | 19:02 | |
19:02
rindolf joined
|
|||
TimToady | jnthn: you weren't living in interesting times | 19:03 | |
brrt | \o FROGGS | ||
TimToady | good grief, how did it get to be lunchtime already? | 19:04 | |
jnthn | You think you got it bad. It's got to be 3am here... :P | ||
TimToady | which city? | 19:05 | |
jnthn | Shenzhen | ||
TimToady | wow, I even know where that is now... | ||
jnthn | :) | ||
FROGGS | m: [&baz] | ||
camelia | rakudo-moar 32cb14: OUTPUT«===SORRY!=== Error while compiling /tmp/bDTNoZdkZUUndeclared routine: &baz used at line 1. Did you mean '&bag'?» | 19:06 | |
jnthn | My last time in China was in Beijing. My weather app told me the sky was clear every day. I saw a blue sky one day out of 7 thanks to smog. | ||
FROGGS | m: [[&baz]] | ||
camelia | rakudo-moar 32cb14: OUTPUT«===SORRY!=== Error while compiling /tmp/NBXzhwwfJTUndeclared routine: &baz used at line 1. Did you mean '&bag'?» | ||
FROGGS | ohh, somebody fixed that | ||
jnthn | Here I've seen it every day. :) | ||
So at least the air here isn't so bad. :) | |||
19:08
Ven joined
|
|||
Ven chuckles at colomon++'s IRC client inserting "…" instead of "..." | 19:11 | ||
colomon | Ven: it's downright evil. | 19:12 | |
Ven | makes backlogging a bit funier :-) | ||
colomon | distressingly, I think it may be general OS X behavior instead of just my IRC client. :\ | 19:13 | |
19:13
mberends left
|
|||
TimToady | I suppose .gist could use … too | 19:15 | |
Ven | colomon: it is, but it doesn't happen on ,ine | 19:16 | |
TimToady | your l has gone commatose | 19:17 | |
Ven | stackoverflow.com/questions/1917898...able-types <- oh, Perl6 can do that ;) | 19:18 | |
Ven is writing an answer | |||
19:19
rindolf left
19:20
rindolf joined
|
|||
jnthn | Time for some sleep, before I accidentally get myself back onto European time... & | 19:20 | |
brrt | sleep well :-) | ||
TimToady | o/ | 19:21 | |
now we can Break All The Things | |||
actually, if .gist is supposed to be human readable, it should use etc. instead of ... :) | 19:23 | ||
well, ... translates better to other languages, except maybe Latin | 19:24 | ||
Ven | stackoverflow.com/questions/1917898...6#25574936 <- answered with PErl6 :) | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...d=25574936 | ||
Ven | calm down, synopsebot | ||
we're not there yet. | |||
brrt | m: my int $i = 8; my int $y = -3; say $i div $y; | 19:25 | |
camelia | rakudo-moar 32cb14: OUTPUT«-3» | ||
brrt | m: my int $i = 8; my int $y = 3; say $i div $y; | ||
camelia | rakudo-moar 32cb14: OUTPUT«2» | ||
Ven | ^ if anybody has to fix my answer, feel free to :) | ||
brrt | p6: my int $i = 8; my int $y = -3; say $i div $y; | 19:26 | |
camelia | rakudo-jvm 32cb14: OUTPUT«(timeout)» | ||
..rakudo-{parrot,moar} 32cb14: OUTPUT«-3» | |||
..niecza v24-109-g48a8de3: OUTPUT«===SORRY!===Malformed my at /tmp/tmpfile line 1:------> my⏏ int $i = 8; my int $y = -3; say $i div Parse failed» | |||
19:27
domidumont left
|
|||
brrt | ok, i won't be complaining anymore :-) | 19:30 | |
TimToady | p6: my int $i = 8; my int $y = 0; say $i div $y; | 19:32 | |
camelia | rakudo-jvm 1ff1d3: OUTPUT«(timeout)» | ||
..niecza v24-109-g48a8de3: OUTPUT«===SORRY!===Malformed my at /tmp/tmpfile line 1:------> my⏏ int $i = 8; my int $y = 0; say $i div $Parse failed» | |||
..rakudo-moar 1ff1d3: OUTPUT«Division by zero in block <unit> at /tmp/tmpfile:1» | |||
..rakudo-parrot 1ff1d3: OUTPUT«(signal )» | |||
brrt | why does that cause a timeout on the jvm? | 19:33 | |
or is that the jvm's way of dying | |||
TimToady | j: say "hi" | 19:34 | |
camelia | rakudo-jvm 1ff1d3: OUTPUT«hi» | ||
TimToady | beats me | ||
Ven | TimToady: camelia-r-j only is able to say. | 19:35 | |
19:35
Ven left
|
|||
TimToady | m: say 1,1,*+*...* | 19:36 | |
camelia | rakudo-moar 1ff1d3: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 70140873…» | ||
TimToady | that's better | ||
j: say 1,1,*+*...* | |||
camelia | rakudo-jvm 1ff1d3: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309 3524578 5702887 9227465 14930352 24157817 39088169 63245986 102334155 165580141 267914296 433494437 701408733…» | ||
19:37
brrt left
19:38
dwarring joined
|
|||
moritz | mm: say (1, 1, *+* ... *).gist.chars | 19:41 | |
m: say (1, 1, *+* ... *).gist.chars | |||
camelia | rakudo-moar 1ff1d3: OUTPUT«1174» | ||
TimToady | 100 seems about the right limit to me; unlikely to interfere with printing small lists, and not so long it scrolls off your screen | 19:45 | |
I also don't bother to check .infinite | 19:46 | ||
if it's not infinite, I'd have to check .elems, and that could be huge, or effectively infinite | |||
m: my @a = 1..*; say @a | 19:47 | ||
camelia | rakudo-moar 1ff1d3: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8…» | ||
TimToady | works there too | ||
19:56
mberends joined
19:57
Ven joined,
Ven left
20:02
mberends left
20:04
Ven joined
20:05
cognome joined
|
|||
nwc10 | jnthn: other PPC "bug" was solved with fadd779... Update to simpler MAST::Label API. | 20:13 | |
ie was trying to use too old an NQP | 20:14 | ||
raiph | .oO( subset Probability of Num where 0.0 <= * <= 1.0; ??? .oO( % of Probability always total 1.0; ??? ) ) |
||
20:16
beastd joined,
rindolf left
|
|||
nwc10 | botherit, Rakudo still unhappy | 20:17 | |
Ven | sometimes, I see posts about TCL, and I really laugh. | 20:19 | |
Like, well, you may badmouth php, but when you see how terrible tcl is... hahaha | |||
20:21
[Sno] joined
|
|||
[Coke] | I would say that tcl has a consistency that php lacks. | 20:21 | |
20:22
molaf__ left
|
|||
Ven | [Coke]: it's consistently offering the worst the world has to offer | 20:24 | |
tadzik | naah | ||
zacts | I've decided to specifically put on my portfolio/resume that I don't know php, and I specifically won't do anything php related. | 20:25 | |
they'll have to use someone else for that | 20:26 | ||
20:26
MilkmanDan left
|
|||
Ven | zacts: I put that I know it, but the last time a recruiter called for a php job, I said "sorry, I'd rather be programming" | 20:27 | |
20:31
MilkmanDan joined
|
|||
[Coke] | Ven: I respectfully disagree. | 20:31 | |
Ven | [Coke]: let's :) | ||
20:32
Ven left
|
|||
nine | How can a typed private attribute of an object get a value of a different type?! | 20:44 | |
20:45
ivanshmakov left
|
|||
TimToady | binding? | 20:46 | |
20:46
Ven joined
|
|||
TimToady | m: my Int $x; $x := "foo"; say $x.WHAT | 20:46 | |
camelia | rakudo-moar 1ff1d3: OUTPUT«Type check failed in binding; expected 'Int' but got 'Str' in any bind_error at src/vm/moar/Perl6/Ops.nqp:221 in block <unit> at /tmp/2vMWNk6dgO:1» | ||
TimToady | nope, checks there | ||
nine | TimToady: this is the complete source of the class: gist.github.com/niner/11490afd74ede2af7b8b | 20:47 | |
20:49
ivanshmakov joined
|
|||
TimToady | you aren't deriving Perl5Object from Perl5Interpreter or some such? | 20:51 | |
nine | TimToady: not that I know of | ||
TimToady | maybe the Opaque is overflowing somehow? | ||
you on 32 or 64-bit? | 20:52 | ||
nine | 64 | ||
TimToady | if something is assuming 32 and something else assuming 64, you could get that sort of damage | ||
nine | Changeing the order of attributes in that class changes the error message. I now get: No such method 'call' for invocant of type 'Perl6::Metamodel::ContainerDescriptor' | ||
diakopte1 | o_O | 20:53 | |
nine | And if I put a dummy Int in between those two attributes I get Cannot call method 'isa' on a null object | 20:54 | |
I suspect, my code is not at fault here ;) | 20:55 | ||
diakopte1 | not solely, anyway ;) | ||
20:57
nbrown__ joined
|
|||
nine | If I change the private attributes to public ones and remove the BUILD method the errors disappear. | 20:59 | |
21:00
tphilipp joined
21:03
itz joined
|
|||
moritz | nine: if you make them public, but keep the BUILD, what happens? | 21:03 | |
nine | moritz: Cannot find method 'STORE' in submethod BUILD at /home/nine/Inline-Perl5/lib/Inline/Perl5.pm6:262 | 21:05 | |
Ven | no cont? | 21:06 | |
raiph | m: subset Probability of Num where 0.0 <= * <= 1.0; # Is this a solution to question part `1` in SO question (as answered by ven++ at stackoverflow.com/a/25574936/1077672)? What about a solution to part `2`? | ||
camelia | ( no output ) | ||
21:06
itz_ left,
dolmen joined
|
|||
Ven | hahaha someone downvoted my perl6 answer on that SO question | 21:07 | |
nine | Ven: cont? | ||
Ven | nine: container | ||
21:08
nbrown__ left
21:09
amkrankr1leuen left
21:10
amkrankruleuen joined,
amkrankruleuen left,
amkrankruleuen joined
|
|||
moritz | nine: this is getting weirder and weirder | 21:10 | |
21:11
mj41 left
|
|||
Ven | TimToady: subsets can't get a type parameter, can they? So, we can't subset a role[::T], right? | 21:11 | |
nine | moritz: jnthn gave some advice: irclog.perlgeek.de/perl6/2014-08-29#i_9266406 | 21:13 | |
21:13
avuserow_ left
|
|||
Ven 's trying to find the second part to raiph++'s answer | 21:14 | ||
raiph | .oO( raiph thought so, in a bubbly kinda way ) |
21:15 | |
nine | moritz: I fear I know just too little about Perl 6 to make real progress here :/ | ||
Ven | role DPD[::T] { has @.values where [+] == 1; } | 21:16 | |
raiph: ^ how does that sound? | |||
raiph | m: role DPD[::T] { has @.values where [+] == 1; } # ven: really? | 21:17 | |
camelia | rakudo-moar 1ff1d3: OUTPUT«===SORRY!=== Error while compiling /tmp/da9kDOkt2LPreceding context expects a term, but found infix == insteadat /tmp/da9kDOkt2L:1------> ole DPD[::T] { has @.values where [+] ==⏏ 1; } # ven: really?» | ||
Ven | [+] *, whoops | ||
raiph | m: role DPD[::T] { has @.values where [+] * == 1; } # ven: really!? | 21:18 | |
TimToady | * doesn't usually work in argument position | ||
camelia | rakudo-moar 1ff1d3: OUTPUT«Unhandled exception: Could not instantiate role 'DPD':Not enough positional parameters passed; got 1 but expected 2 at <unknown>:1 (/home/p6eval/rakudo-inst-2/languages/nqp/lib/Perl6/Metamodel.moarvm:specialize:4294967295) from src/gen/m-Metamo…» | ||
Ven | true. | ||
raiph | m: role DPD { has @.values where [+] * == 1; } | 21:19 | |
camelia | ( no output ) | ||
TimToady | * won't work there | ||
21:19
tphilipp left
|
|||
Ven | TimToady: I'm using *.values now anyway | 21:19 | |
raiph: updated | |||
TimToady | you still have a proecedence problem | 21:20 | |
Ven | 1 ==, then ! | ||
TimToady | or [+](@.values) | ||
moritz | nine: well, the part about method sink { self } is worth trying, at least | 21:21 | |
TimToady | or { ([+] @$_ ) == 1 } or so | ||
Ven | @.values? | ||
it's a Map, just [+](.values) I think | |||
TimToady | okay | 21:22 | |
Ven | because, well, since it's a "Map"(whatever *that* is), I switched back to $.values | ||
I'll rename it... | |||
dalek | line-Perl5: 67dfcac | moritz++ | lib/Inline/Perl5.pm6: give Perl5Object a no-op sink method |
||
moritz | nine: if it doesn't work, just revert the commit that made the attributes private | 21:23 | |
21:25
mberends joined
21:30
BizarreCake left
21:37
dwarring left
21:38
Ven left
21:41
ggoebel111119 joined
21:46
guru joined,
guru is now known as Guest59771
21:47
jdv79_ joined
21:48
itz_ joined
21:51
yeltzooo9 joined
21:52
itz left,
ajr_ left,
jdv79 left
22:01
rindolf joined
22:02
cognome left
22:03
cognome joined
22:07
cognome left
22:11
_sri joined,
silug joined,
\00 joined,
ingy joined,
sjohnson joined
|
|||
dalek | line-Perl5/call_backs: 1baec29 | nine++ | / (3 files): Implement parameterless callbacks |
22:14 | |
line-Perl5/call_backs: 5ea1c61 | nine++ | / (2 files): Implement passing parameters to call backs We now can pass Perl 6 objects to Perl 5 code and have that code call methods on the Perl 6 objects and pass parameters to them. |
22:16 | ||
22:16
Guest59771 left
|
|||
dalek | line-Perl5/call_backs: 10aa036 | nine++ | / (3 files): Implement parameterless callbacks |
22:16 | |
line-Perl5/call_backs: 770eb5c | nine++ | / (2 files): Implement passing parameters to call backs We now can pass Perl 6 objects to Perl 5 code and have that code call methods on the Perl 6 objects and pass parameters to them. |
|||
line-Perl5: 10aa036 | nine++ | / (3 files): Implement parameterless callbacks |
|||
line-Perl5: 770eb5c | nine++ | / (2 files): Implement passing parameters to call backs We now can pass Perl 6 objects to Perl 5 code and have that code call methods on the Perl 6 objects and pass parameters to them. |
|||
diakopte1 | dalek-- | ||
22:19
mberends left
|
|||
spider-mario | nqp on parrot builds with various -Werror=… parameters | 22:21 | |
this causes problems, as it also builds dyncall with those | |||
but dyncall doesn’t try to avoid those warnings | 22:22 | ||
22:25
skarn joined
22:26
skarn is now known as Guest21595
|
|||
spider-mario | and once built, it doesn’t appear to know its version number | 22:28 | |
$ nqp-p --version | |||
This is nqp version built on parrot 6.7.0 revision 0 | |||
22:35
BenGoldberg left
22:36
cognome joined
22:39
mberends joined
22:41
donaldh joined
|
|||
donaldh noticed some spam in RT that needs deleted rt.perl.org/Ticket/Display.html?id=122651 | 22:41 | ||
22:42
Guest21595 left,
Guest21595 joined,
Guest21595 is now known as skarn
22:45
donaldh left
22:46
cognome_ joined,
cognome left
|
|||
colomon | nine++ | 22:52 | |
spider-mario | even after patching nqp so it prints “This is nqp version 2014.08 built on parrot 6.7.0 revision 0”, Rakudo’s Configure.pl thinks it’s too old… what’s going on? :/ | 22:55 | |
dalek | kudo/nom: 7467ee8 | (Rob Hoelz)++ | src/core/Pod.pm: Add :content in Pod::Block constructor, but warn about deprecation |
22:57 | |
c: 0a5229d | (Rob Hoelz)++ | lib/Pod/Convenience.pm6: Don't use deprecated contents attribute |
22:58 | ||
22:58
xragnar_ joined,
xragnar_ is now known as xragnar
|
|||
hoelzro | .tell moritz I fixed up and checked the docs; they're fine now! | 22:58 | |
yoleaux | hoelzro: I'll pass your message to moritz. | ||
23:00
denis_boyun_ left
23:16
avuserow_ joined
23:20
mberends left
23:24
gfldex left
|
|||
dalek | kudo/nom: d8c8342 | TimToady++ | src/core/List.pm: first whack at implementing .plan |
23:25 | |
23:26
mbaby joined
|
|||
TimToady | > perl6 -e 'my @a = 1,2,3; @a.plan(4..*); say @a' | 23:26 | |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 ... | |||
23:27
mbaby left
|
|||
TimToady | unfortunately, hangs if you try to subscript into the lazy part | 23:28 | |
23:28
mbaby joined
|
|||
TimToady | but it's a start | 23:28 | |
23:29
mbaby left,
je joined
23:37
dolmen left,
itz joined
23:38
nbrown__ joined,
cognome_ is now known as cognome,
mberends joined
23:39
itz_ left
23:51
nbrown__ left,
itz_ joined
23:52
itz left
23:58
itz joined
23:59
itz_ left
|