»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:05 telex left 00:06 telex joined 00:08 ifim joined 00:11 Zoffix left 00:16 sprocket joined
Juerd Meh, pack/unpack a* does not round-trip for non-ascii strings :( 00:16
00:17 BenGoldberg joined
Juerd Is pack a* doing Str instead of Buf a design flaw? 00:17
00:18 BenGoldberg left
timotimo zengargoyle: er, dunno? 00:23
arnsholt: oh, i didn't see the half second timeout
00:24 Psyche^_ left 00:26 BenGoldberg joined, g4 left, g4 joined
Juerd github.com/Juerd/p6-mqtt/blob/master/mqtt.p6 # Yay, I can send "hello world" to an MQTT server! 00:28
Can't send anything non-ascii yet, though :|
I don't really understand Perl 6 pack/unpack, even though I've been using them for the past few hours. 00:29
Or maybe I don't understand Bufs. I don't know where I'm failing exactly.
00:30 uxfi joined 00:31 Psyche^ joined, uxfi left 00:33 ifim` joined
BenGoldberg m: say pack( "A4 C n*", "perl6", 42, qw,3 5 7 11, ); 00:34
camelia rakudo-moar 317746: OUTPUT«Buf:0x<70 65 72 6c 2a 00 03>␤»
BenGoldberg m: say pack( "A4 C n*", "perl6", 42 ); 00:35
camelia rakudo-moar 317746: OUTPUT«Cannot shift from an empty Array␤ in block <unit> at /tmp/ybMpVp6z9x:1␤␤Actually thrown at:␤ in block <unit> at /tmp/ybMpVp6z9x:1␤␤»
BenGoldberg m: say pack( "A4 C n*", "perl6", 42, 0 );
camelia rakudo-moar 317746: OUTPUT«Buf:0x<70 65 72 6c 2a 00 00>␤»
BenGoldberg m: say pack( "A4 C n*", "perl6", 0x42, 0 );
camelia rakudo-moar 317746: OUTPUT«Buf:0x<70 65 72 6c 42 00 00>␤»
BenGoldberg m: say pack( "A4 C n*", "perl6", 0x42, 0xab, 0xcd );
camelia rakudo-moar 317746: OUTPUT«Buf:0x<70 65 72 6c 42 00 ab>␤»
BenGoldberg m: say pack( "A4 C n*", "perl6", 0x42, 0xab, 0xcd, 0xef ); 00:36
camelia rakudo-moar 317746: OUTPUT«Buf:0x<70 65 72 6c 42 00 ab>␤»
Juerd pack ignores numbers on most types
BenGoldberg m: say pack( "A4 C n*", "perl. the rest of this string should be ignored.", 0x42, 0xab, 0xcd, 0xef ); 00:37
camelia rakudo-moar 317746: OUTPUT«Buf:0x<70 65 72 6c 42 00 ab>␤»
Juerd To be precise, the 'amount' suffix is only used on A, a, and x.
00:37 ifim left
Juerd So n* is just n. 00:37
BenGoldberg What *I* don't understand is why it's ignoring the * suffix on the n
Juerd Because there's no code to do anything with it :)
BenGoldberg Hmm... 00:38
It ought to throw a NYI, then! :P
Juerd Oh, I'm mistaken about the Aax list.
No, I wasn't. It's just A, a, and x... 00:39
pink_mist ... or is it? :P
Juerd I didn't really mind that I couldn't do C4, for example, but I really needed length prefixes like n/a*
But now I'm stuck with the whole ascii/binary/str/buf-thing that either I don't understand, or is implemented wrong. 00:40
I'm having Perl 5.6 flashbacks. 00:41
flussence last I heard a few days/weeks ago, pack and unpack were supposed to be replaced or redone, or something. I agree they're pretty awful right now.
00:41 khw joined
BenGoldberg is tempted to suggest cheating, and using Inline::Perl5 00:41
Juerd Redoing it may be the right solution. pack isn't extensible, but it being able to define your own types can come in handy 00:42
Because I was wrapping pack anyway, I used the opportunity to introduce 'm', for MQTT length encoding.
github.com/Juerd/p6-mqtt/blob/master/MyPack.pm lines 41..53 00:43
pink_mist you mean github.com/Juerd/p6-mqtt/blob/mast...pm#L41-L53 00:47
line 61 saddens me :( 00:48
Juerd Me too.
Couldn't find a way to let pack just include another Buf. 00:49
00:54 perlawhirl left
timotimo what is that supposed to do? 00:55
because isn't unpack("a*") the same as .decode("ascii")?
Juerd I have already-packed data that I want to include in another call to pack 00:56
timotimo m: my $res = pack("a*", "hello world"); say $res.perl; say $res.unpack("a*").perl; say $res.decode("ascii").perl
camelia rakudo-moar 317746: OUTPUT«Buf.new(104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100)␤"hello world"␤"hello world"␤»
timotimo ah, so something you'd use ~ for?
Juerd Yes, but in a pack tempalte, because I'm recursively calling mypack
s/tempalte/template/
I'm handing as much as I can off to the original pack 00:57
timotimo right
damn.
that's a use case that i totally didn't expect, but it makes a whole lot of sense
Juerd You'd need it if you wanted to make pack() itself recursive like this too :)
(Not saying that recursion is a good solution, but it's a solution.) 00:58
01:01 johan left
Juerd Also, pack is currently a sub, but it would be more symmetrical if it were a list method. 01:05
(...).pack.unpack.pack.unpack is nicer than pack(pack(...).unpack).unpack 01:06
Python's split/join has the same asymmetry
01:09 znpy left 01:10 Humbedooh left
BenGoldberg Maybe the best solution for packing/unpacking won't be a simple string template, but a class object. 01:14
class MyTemplate is repr('CStruct') { ... stuff here ... }; my MyTemplate $deserialized = MyTemplate.unpack( $buf ); # something like this. 01:16
01:17 ifim` left, uruwi joined
uruwi ping 01:17
timotimo could someone check if "return Failure.new(X::AdHoc.new('foo'))" is semantically the same as "fail 'foo'"?
Juerd That would make a lot of simple scripts much more complicated. On the other hand, it would also make them much more readable.
uruwi m: sub a { fail 'foo'; } sub b { return Failure.new(X::AdHoc.new('foo')); } say a eqv b; 01:19
camelia rakudo-moar 317746: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tfy7NnPvGs␤Strange text after block (missing semicolon or comma?)␤at /tmp/tfy7NnPvGs:1␤------> 3sub a { fail 'foo'; }7⏏5 sub b { return Failure.new(X::AdHoc.new␤ expecting any of:␤ inf…»
timotimo because the first one can be done a hundred thousand times in 4 seconds, the latter takes 66 seconds for the same task
oh
uruwi m: sub a { fail 'foo'; }; sub b { return Failure.new(X::AdHoc.new('foo')); }; say a eqv b;
camelia rakudo-moar 317746: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rz8BvYUOcw␤Undeclared routine:␤ eqv used at line 1␤␤»
uruwi m: sub a { fail 'foo'; }; sub b { return Failure.new(X::AdHoc.new('foo')); }; say a == b;
camelia rakudo-moar 317746: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pMFPtgSXap␤Preceding context expects a term, but found infix == instead␤at /tmp/pMFPtgSXap:1␤------> 3re.new(X::AdHoc.new('foo')); }; say a ==7⏏5 b;␤»
timotimo actually, i meant to say 'fail X::AdHoc.new("foo")'
changing fail to return Failure.new(...) seems to make no difference
BenGoldberg m: my $x = (-> { fail 'foo' })(); say $x; 01:20
camelia ( no output )
BenGoldberg m: my $x = (-> { fail 'foo' })(); say so $x;
camelia ( no output )
timotimo a pointy block is transparent to "return"
BenGoldberg m: sub bar { fail 'foo' }; my $x = bar; say so $x; 01:21
camelia rakudo-moar 317746: OUTPUT«False␤»
BenGoldberg m: sub bar { fail 'foo' }; my $x = bar; say $x;
camelia rakudo-moar 317746: OUTPUT«foo␤ in sub bar at /tmp/PWSYki1R0E:1␤ in block <unit> at /tmp/PWSYki1R0E:1␤␤Actually thrown at:␤ in block <unit> at /tmp/PWSYki1R0E:1␤␤»
01:21 yeahnoob joined
timotimo oh, huh 01:21
return Failure.new("oh no!") is actually slower than "fail 'oh no!'" apparently ?!?
BenGoldberg m: sub bar { return Failure.new( 'foo' ) }; my $x = bar; say $x;
camelia rakudo-moar 317746: OUTPUT«foo␤ in block <unit> at /tmp/dDggPiRBce:1␤␤Actually thrown at:␤ in block <unit> at /tmp/dDggPiRBce:1␤␤»
BenGoldberg Fail also produces 'in sub bar' .. 'in block <unit>' ... 01:24
timotimo oh, interesting. so do we rely on the Failure.new to chop off the right amount of entries from the backtrace of the exception it builds? 01:29
if we could give a named parameter or something that'd let us do this, that'd be pretty fantastic
m: sub bar { fail X::AdHoc.new("oh no!") }; bar() 01:30
camelia rakudo-moar 317746: OUTPUT«Default constructor for 'X::AdHoc' only takes named arguments␤ in sub bar at /tmp/kAMa6cG3Id:1␤ in block <unit> at /tmp/kAMa6cG3Id:1␤␤»
timotimo oh, perhaps that's why it's much faster %)
yeah, that's it 01:31
i was testing the performance of a regular exception vs a failure
01:34 BenGoldberg left, Ben_Goldberg joined
dalek t-ZMQ: ce00850 | arnsholt++ | lib/Net/ZMQ/Socket.pm:
Pass flags in all Net::ZMQ::Socket.send multis.

This fixes the broken test in t/00-basic.t.
01:46
01:47 n0xff joined 01:50 adu joined
Ben_Goldberg m: sub foo { ( $ //= Failure.new('foo') ); try { say foo() } for 1..10; 01:53
camelia rakudo-moar 317746: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1dPo4x_2lm␤Missing block (taken by some undeclared routine?)␤at /tmp/1dPo4x_2lm:1␤------> 3w('foo') ); try { say foo() } for 1..10;7⏏5<EOL>␤»
Ben_Goldberg m: sub foo { ( $ //= Failure.new('foo') ); do try { say foo() } for 1..10;
camelia rakudo-moar 317746: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nuoW4VJEsu␤Missing block (taken by some undeclared routine?)␤at /tmp/nuoW4VJEsu:1␤------> 3foo') ); do try { say foo() } for 1..10;7⏏5<EOL>␤»
Ben_Goldberg m: sub foo { ( $ //= Failure.new('foo') ); for 1..10 { try { say foo() } }; 01:54
camelia rakudo-moar 317746: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NwTtD8WdQ9␤Missing block (taken by some undeclared routine?)␤at /tmp/NwTtD8WdQ9:1␤------> 3oo') ); for 1..10 { try { say foo() } };7⏏5<EOL>␤»
Ben_Goldberg m: sub foo { ( $ //= Failure.new('foo') ) }; for 1..10 { try { say foo() } };
camelia ( no output )
Ben_Goldberg m: sub foo { ( $ //= Failure.new('foo') ) }; my $start = time; for 1..100 { try { say foo() } }; say time - $start;
camelia rakudo-moar 317746: OUTPUT«0␤»
Ben_Goldberg m: sub foo { ( fail 'foo' ) }; my $start = time; for 1..100 { try { say foo() } }; say time - $start; 01:55
camelia rakudo-moar 317746: OUTPUT«0␤»
01:55 dayangkun_ joined 02:01 Actualeyes joined 02:05 Sgeo_ left, Zoffix joined 02:07 skids joined 02:08 tokuhiro_ joined, Ben_Goldberg left, softmoth_ left, Ben_Goldberg joined 02:10 bapa1 is now known as bapa, Ben_Goldberg left, BenGoldberg_ joined
sufrostico Hello there! 02:12
I need some help, with some code
the problem is this
m: my @uno= [0,0]; my @dos=[[1,1],[2,2]]; @uno = @dos[0]; @uno.say; 02:13
camelia rakudo-moar 317746: OUTPUT«[[1 1]]␤»
sufrostico why the double [[ ????
how can I avoid that ?
hartenfels You assigned a $ to an @ I think. 02:14
gfldex m: my @uno= [0,0]; my @dos=[[1,1],[2,2]]; my $foo = @dos[0]; $foo.say;
camelia rakudo-moar 317746: OUTPUT«[1 1]␤»
gfldex you basicly ask rakudo to store an array inside an array
hartenfels m: my @uno= [0,0]; my @dos=[[1,1],[2,2]]; @uno = @(@dos[0]); @uno.say;
camelia rakudo-moar 317746: OUTPUT«[1 1]␤»
hartenfels Yup.
flussence m: my @dos = [[1,1],[2,2]]; dd @dos[0]
camelia rakudo-moar 317746: OUTPUT«Array $var = $[1, 1]␤»
02:15 FROGGS left
sufrostico jaja, thanks 02:16
02:16 Actualeyes left 02:17 xpen joined 02:18 FROGGS joined
sufrostico it seems so logical now that i think of that. 02:18
hartenfels I guess that's where the Perl 5 sigil variance made things clearer. 02:20
02:20 Sgeo joined
pink_mist that is one thing I'll miss from perl5 to be honest 02:20
sufrostico yes, perl 5 seems to have a stronger meaning 02:21
02:23 FROGGS_ joined 02:24 Sqirrel left
hartenfels I kinda miss list flattening, but I think that'll go away once the Perl 6 behavior feels natural. 02:25
gfldex m: my @uno= [0,0]; my @dos=[[1,1],[2,2]]; @uno = |@dos[0]; @uno.say; 02:26
camelia rakudo-moar 317746: OUTPUT«[1 1]␤»
hartenfels m: my @uno= [0,0]; my @dos=[[1,1],[2,2]]; @uno = @dos[0].flat; @uno.say; 02:27
camelia rakudo-moar 317746: OUTPUT«[1 1]␤»
gfldex in perl 6 you have to be explicit about destroying structure, in perl 6 you have to explicit about maintaining structure
02:27 FROGGS left
pink_mist I assume the second perl 6 should have been a perl 5? 02:28
gfldex indeed, it's getting late here 02:29
pink_mist tbh, I find it more convenient to need to be explicit about maintaining structure, since you need to create the structure in the first place
gfldex that may be because you didn't discover the proper perl 6 idioms yet 02:30
02:31 kaare_ joined
gfldex m: my @a = [[1,2],[3,4]]; .say for gather for @a -> @b { take @b; take IterationEnd } 02:34
camelia rakudo-moar 317746: OUTPUT«[1 2]␤»
02:36 kid51 joined
hartenfels A fancy way of saying @(@a[0])? 02:37
gfldex a fancy way to handle @a, even if it's infinite. You would need some conditional for the 2nd take ofc.
dj_goku_ ingy: you around? 02:39
gfldex m: my @a = [[1,2,3],[4,5,6]]; for @a -> [$first, *@rest] { say "$first: {@rest}" } 02:40
camelia rakudo-moar 317746: OUTPUT«1: 2 3␤4: 5 6␤»
02:41 Actualeyes joined
hartenfels Destructuring like that is definitely nice, makes iterating pairs painless. 02:42
gfldex you can express the structure of your lists with signatures and have for do some fance iterator magic for you. That may even help you if list get real big. I would be careful with .flat for big lists;
02:42 MadcapJake joined, kid51 left
hartenfels I've used .flat and | to merge lists, since they don't do it on their own anymore. 02:43
MadcapJake Is the META.info file just a json file? Are `.info` files always json files?
hartenfels META.info is in JSON format at least.
But .info doesn't necessarily say that it's gonna be a JSON file. 02:44
MadcapJake hmm, so there's no standard on using `.info` extension?
hartenfels I don't think so.
At least I've seen plaintext in .info before in several places. 02:45
02:50 adu left 02:52 softmoth_ joined
sufrostico gfldex: probably right... my first perl6 program 02:52
XD
another question... I'm using 1.rand but it give me big values... 0.1245 0.3245 ... its there a way it can return smaller numbers like 0.0003 0.000325 ??? 02:53
japhb m: .001.rand.say 02:54
camelia rakudo-moar 317746: OUTPUT«0.000193847785014503␤»
japhb sufrostico: ^^ # It's all about setting your max value
I wonder 02:55
m: 5..6.rand.say
camelia rakudo-moar 317746: OUTPUT«WARNINGS:␤Useless use of ".." in expression "5..6.rand.say" in sink context (line 1)␤0.197314743109555␤»
japhb m: (5..6).rand.say
camelia rakudo-moar 317746: OUTPUT«1.92246654770251␤»
japhb Oh, heh
sufrostico japhb: thanks.. 02:56
I'll think about this...
02:57 softmoth_ left
sufrostico I need smaller numbers but still keep the full range... but i think it's not a problem of the .rand 02:57
gfldex m: my $r = (0.1 .. 0.3); dd $r; say $r.roll(10);
camelia rakudo-moar 317746: OUTPUT«Range $var = 0.1..0.3␤(0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1)␤»
sufrostico instead I'll check my program 02:58
good night
bye
02:58 sufrostico left
psch m: my $x; while True { $x = rand; last if $x < .001; }; say $x 02:59
camelia rakudo-moar 317746: OUTPUT«4.76954349019136e-05␤»
flussence m: say 1.rand ** 2 03:04
camelia rakudo-moar 317746: OUTPUT«0.232914057011131␤»
flussence m: say sprintf('%.2f', (1.rand ** 2) xx 10) 03:05
camelia rakudo-moar 317746: OUTPUT«Directives specify 1 argument, but 10 arguments were supplied␤␤»
flussence m: say sprintf('%.2f', (1.rand ** 2)) xx 10
camelia rakudo-moar 317746: OUTPUT«(0.71 0.23 0.67 0.96 0.10 0.98 0.34 0.19 0.01 0.80)␤»
flussence m: say sprintf('%.2f', (1.rand ** 5)) xx 10
camelia rakudo-moar 317746: OUTPUT«(0.04 0.04 0.00 0.60 0.72 0.53 0.10 0.37 0.24 0.63)␤»
flussence m: say sprintf('%.2f', (1.rand ** 500)) xx 10
camelia rakudo-moar 317746: OUTPUT«(0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00)␤»
flussence m: say sprintf('%.2f', (1.rand ** 50)) xx 10
camelia rakudo-moar 317746: OUTPUT«(0.00 0.00 0.00 0.00 0.00 0.00 0.95 0.00 0.00 0.00)␤»
flussence m: say sprintf('%.2f', (1.rand ** 20)) xx 10
camelia rakudo-moar 317746: OUTPUT«(0.05 0.00 0.00 0.00 0.00 0.00 0.27 0.00 0.00 0.00)␤»
japhb m: my $x = do { $x = rand until $x < ..01 }; say $x;
camelia rakudo-moar 317746: OUTPUT«5===SORRY!5=== Error while compiling /tmp/us_f0J5bTQ␤Preceding context expects a term, but found infix .. instead␤at /tmp/us_f0J5bTQ:1␤------> 3my $x = do { $x = rand until $x < ..7⏏0501 }; say $x;␤»
japhb m: my $x = do { $x = rand until $x < .001 }; say $x;
camelia rakudo-moar 317746: OUTPUT«Use of uninitialized value of type Any in numeric context in block at /tmp/oh6sIe237R:1␤Cannot call method 'gist' on a null object␤ in block <unit> at /tmp/oh6sIe237R:1␤␤»
japhb m: my $x = 1; $x = rand until $x < .001; say $x; 03:06
camelia rakudo-moar 317746: OUTPUT«0.000435780381308144␤»
dj_goku_ I am trying to debug a module with perl6-debug-m but I am getting 'Unhandled exception: ctxlexpad needs an MVMContext': gist.github.com/djgoku/4b4d45062ba39043b6dc
japhb `panda install Text-Tabs-Wrap` gets: *fetch stage failed for Text-Tabs-Wrap: Unable to handle source 'github.com/flussence/Text-Tabs-Wrap/') 03:08
I know that worked a week or two ago, so I'm wondering how it broke.
Doesn't seem like the kind of thing someone would go and break unless it was a change to unbreak something else ... zef maybe? 03:09
Oh hmmm, github.com/flussence/Text-Tabs-Wra...META6.json looks sane ... 03:10
ugexe there is no source-url field 03:11
japhb Oh, the source was put into the support hash. Whaaa ...? 03:12
dj_goku_ does perl6 -I lib open a REPL with lib in the path?
japhb ugexe: Huh: raw.githubusercontent.com/flussenc...META6.json 03:13
ugexe source-url 03:14
japhb dj_goku_: May be a bug there. Did you already try it and experience anguish?
ugexe i think you have to invoke with PERL6LIB or do `use lib <whatever>` to get around that for REPL
japhb ugexe: I know, I'm wondering if the conversion was perhaps *over*-modernized, and panda doesn't support ... er ... 'support' 03:15
dj_goku_ japhb: yes.
japhb wonders how this worked for him at all recently, given the commit date in Text-Tabs-Wrap .... 03:16
ugexe the way i see it is source-url is where a package manager would fetch it from (via whatever source-type is, currently implied to be git), and source<url> would be where a human would go to get the source
dj_goku_ japhb: fpaste.scsys.co.uk/501576
03:17 softmoth_ joined, rurban1 joined, rurban left
dj_goku_ I am actually trying to fix one bug but found another. :( 03:18
03:18 telex left, hpd left, grondilu left
japhb ugexe: Seems reasonable. 03:18
ugexe er, support<source> (not source<url>) 03:19
03:19 perlawhirl joined
japhb dj_goku_: ugexe is probably correct, that setting PERL6LIB or doing "use lib 'lib';" in the REPL will get the anguish to go away 03:19
03:20 telex joined
dj_goku_ oh sweet! 03:21
ugexe all test reports are being shown as a Pass on tests.perl6.org :(
03:22 kaare_ left, yqt left 03:23 Fleurety joined 03:25 hpd joined 03:27 grondilu joined 03:28 noganex_ joined 03:30 ggherdov left 03:31 noganex left 03:32 [Tux] left, [Tux] joined 03:35 ggherdov joined, Sqirrel joined 03:36 raiph left
dj_goku_ any idea what Str.?split() what the '?' means? 04:00
04:02 softmoth_ left 04:03 softmoth_ joined
Zoffix dj_goku_, doc.perl6.org/language/operators#postfix_.%3F 04:04
04:04 nightfrog joined 04:05 sprocket left, pierrot joined
dj_goku_ Zoffix: thanks. 04:06
04:09 adu joined, sprocket joined 04:20 |Tux| joined
dj_goku_ wonders if split has changed recently. 04:20
04:22 BenGoldberg joined 04:25 BenGoldberg_ left 04:26 juiko joined
dalek c: 5f425ab | (Zoffix Znet)++ | doc/Language/faq.pod:
Use a more honest benchmark in FAQ to aleviate community friction

Seems a few people were reading too much into the original benchmark example and were going around, say P6 is faster than P5. Here we include a bare-bones example as well, to show that yes, if you do not include almost anything, your P5 program will be faster
04:28
c: 981a88c | (Zoffix Znet)++ | doc/Language/faq.pod:
Newlines? Tabs? UFOs? Toss 'em
04:29
04:43 TEttinger joined 04:44 pjscott joined 04:45 ponbiki joined 04:46 pjscott left 04:47 pjscott joined 04:54 corbyhaas_ joined, mrsolo_ joined 04:55 pjscott left 04:56 hartenfe1s joined, novapatc1 joined, boegel|quassel joined, jdv79_ joined, El_Che_ joined, n0xff_ joined, hartenfe1s left, freeze_ joined, shamu_ joined, Woodi_ joined, zostay_ joined 04:57 mr-foobar joined, bakedb_ joined, pjscott joined 04:59 frew1 joined, samb11 joined, dgl joined, jsimonet1 joined 05:00 Spot__ left, boegel left, n0xff left, El_Che left, khw left, woodruffw left, Woodi left, hartenfels left, mrsolo left, corbyhaas left, samb1 left, zostay left, novapatch left, flaviusb left, adu left, go|dfish1 joined, stux|RC-only joined, pjscott left 05:01 woodruffw joined, khw joined, adu joined, mr-foobar left, risou joined, mr-fooba_ joined, BinGOs joined 05:02 obra joined, bitmap joined 05:03 quester joined 05:04 Spot__ joined, flaviusb joined, corbyhaas_ is now known as corbyhaas, bpmedley left 05:06 mrsolo_ is now known as mrsolo 05:09 vendethiel joined 05:10 sprocket left 05:12 sprocket joined 05:15 juiko left
dj_goku_ yay for perl6 MR! 05:17
adu what's MR?
dj_goku_ github.com/FROGGS/p6-IDNA-Punycode/pull/2
well a module MR. not perl6 specifically other than the language.
05:18 Spot___ joined, Mouq joined, perlawhirl left
adu oh you mean PR 05:18
dj_goku_ blah
adu: haha yeah, gitlab calls it MR (merge request), github calls them (pull request) 05:19
adu I've never heard of gitlab
dj_goku_ adu: RoR free alternative 05:20
we use it at work.
05:20 novapatch joined, llfourn_ joined
adu Ruby on Rails? 05:21
dj_goku_ yeah
TEttinger dj_goku_: I'm curious what it does to replace a server
I looked at it and didn't see an equivalent to gh-pages
adu I didn't know github was rails 05:22
TEttinger github has free static webpage hosting
they claim there's a limit to size
I have not hit it
adu gh-pages is awesome
05:22 Peter__R joined
adu most of the pages I make are less than 5KiB 05:23
TEttinger in my case, it isn't the pages so much as the gifs tommyettinger.github.io/home/PixVoxel/sau10/
05:23 Hotkeys_ joined, skaji_ joined
dj_goku_ TEttinger: we use it to host our git internally. We then submit MR (PR) for review. 05:23
TEttinger I'm just not sure how it replaces RoR 05:24
adu TEttinger: looks like a game
dj_goku_ TEttinger: pretty much the same exact flow as github, really.
TEttinger thanks adu
05:25 Spot__ left, novapatc1 left, Bucciarati left, nebuchad` left, doublec left, Peter_R left, llfourn left, Hotkeys left, silug left, chewie_1982 left, Spot___ is now known as Spot__, Bucciarati joined 05:26 doublec joined 05:27 mr-fooba_ left, chewie_1982 joined, sftp joined 05:30 silug joined, khw left 05:31 BenGoldberg left 05:32 vendethiel left 05:33 perlawhirl joined 05:34 pierrot left 05:35 sprocket left 05:40 telex left
quester I still can't find Rakudo Star 2015.10, which make me sad. Does anyone recall seeing any announcement about it? 05:41
05:42 telex joined 05:46 AlexDaniel left 05:50 xfix joined 06:00 FROGGS_ left 06:02 FROGGS_ joined 06:03 Averna joined 06:07 TimToady joined 06:08 skids left
moritz there is no rakudo star 2015.10 06:16
06:21 adu left 06:22 xpen left 06:24 xpen joined 06:33 yeahnoob left 06:41 darutoko joined 06:43 domidumont joined 06:49 domidumont left 06:56 geraud left, geraud joined, geraud left 06:59 domidumont joined 07:00 FROGGS_ left 07:01 domidumont left 07:02 domidumont joined
[Tux] test 50000 21.407 21.291 07:05
test-t 50000 18.290 18.174
07:06 nebuchadnezzar joined 07:17 colomon left 07:22 rindolf joined 07:27 FROGGS joined 07:29 Averna left 07:32 CIAvash joined
dalek line-Python: 531d2b6 | (Stefan Seifert)++ | lib/Inline/Python.pm6:
Pass through calls to Python methods previously shadowed by Any

PythonObject inherits many method from Any. A fallback doesn't cut it for those so we explicitly forward calls to any of Any's methods.
Thanks to timotimo++ for the report!
07:35
nine .tell timotimo your Inline::Python call.t failure is fixed. TimToady added a sum method to Any which triggered the test failure. 07:36
yoleaux nine: I'll pass your message to timotimo.
07:37 colomon joined 07:46 RabidGravy joined 07:47 xfix_ joined 07:49 xfix left 07:50 Sqirrel left 07:59 llfourn_ left
dalek osystem: 8295c7d | sylvarant++ | META.list:
Added Compress::Brotli

see github.com/sylvarant/Compress-Brotli
07:59
osystem: 1078df9 | FROGGS++ | META.list:
Merge pull request #95 from sylvarant/master

Added Compress::Brotli
08:06 [Sno] is now known as sno 08:10 bpmedley joined 08:19 JimmyZ joined 08:20 rindolf left 08:25 colomon left 08:27 quester left 08:30 yeahnoob joined 08:32 uruwi left
dalek kudo/curli: e1c25e7 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Support inexact matching for loading precompiled module in CURI

Previously we could load a precompiled module only when the DependencySpecification matched the module's meta data exactly. Now we can load the precompiled version of any matching module.
08:32
08:34 zakharyas joined, znpy joined, perlawhirl left 08:43 mathw joined
dalek kudo/curli: f887e6f | (Stefan Seifert)++ | src/core/CompUnit (2 files):
Simplify CompUnit::Repository::Installation::need code

Since we only use numbers as file names for module files and store them all in a single directory, we don't have to be all that careful when constructing the path to load. Just prepend our $.prefix.
08:45
08:46 rdmtob joined
dalek kudo/curli: 0a3171e | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Remove some now unused code.
08:47
08:50 go|dfish1 is now known as go|dfish 08:52 pdcawley__ left, colomon joined 08:58 kjs_ joined
RabidGravy what's the easiest way of saying any non-whitespace except a comma? 09:06
in a regex
09:06 kjs_ left
mrf <-[\S + ',']> ? 09:12
<-[\s + ',']> ? rather
RabidGravy: ^
arnsholt m: my $r = /<-[\s,]>/; say "a" ~~ $r; say "," ~~ $r; say " " ~~ $r; # RabidGravy 09:13
camelia rakudo-moar 317746: OUTPUT«「a」␤Nil␤Nil␤»
mrf ahh. I was close. 09:15
RabidGravy Hmm, yeah this sort of works 09:17
09:19 Humbedooh joined
jnthn morning, #perl6 09:20
DrForr Speaking of regexes, what's a good common matching task that's not going to involve lots of escaped text? I was writing some slides for ISO 8601 date format, but the - and : need to be escaped.
09:20 xfix_ left
jnthn DrForr: Why're you wanting to avoid "need to escape", ooc? 09:20
DrForr: It looks ugly?
RabidGravy okay I actually needed <-[\s,\:\*]> in that place but Hmm 09:21
DrForr "need to explain too much".
jnthn DrForr: OK. Not sure if putting them in quotes helps
e.g. '-' and ':'
DrForr yeah, that's how I'm writing it now.
09:22 dakkar joined 09:23 softmoth_ left, cognominal joined
DrForr The thing is that gives the impression that *all* literals need to be quoted, which is demonstrably not the case. The ISO8601 format does have 'T' and 'Z' that won't need to be quoted, but they're small and won't jump out at you on the slide(s). 09:24
RabidGravy okay, no I really need "<-[\s,\:\*\}]>+"
<.ident> didn't cut it
jnthn ident also has the "must have leading alpha or _" constraint 09:25
RabidGravy yeah, it was simply a working analogue for variable names in the uri template 09:27
09:28 abraxxa joined
RabidGravy but apparently all sorts of stuff is actually allowed in there having found some additional test data down the back of the sofa 09:28
DrForr It also feels a little awkward to have to explain "yes, in this common date format we happen to hit two of the new edge cases." ('-' and ':' in this case.)
09:30 domidumont left
jnthn Uh, it's a lot less edge case than non-Perl 6 regexes 09:30
At least there's a really, really clear rule
If it's alphanumeric, no escaping/quoting needed. Otherwise, it is. 09:31
DrForr Yeah, agreed, there's lots less edge casing than p5.
jnthn That you don't have a list of things to remember, just "alphanumeric or not", seems like something nice to point out :)
DrForr I'll just drop the \d**4 construct for a few slides and introduce that change.
jnthn Yeah, +1 to introducing a little at a time :) 09:32
DrForr Mmhmm. I've already got a few slides up-front explaining the change from =~ to ~~, that'll just go along with the other bits.
09:35 yeahnoob left 09:42 erxeto_ left 09:51 brrt joined
RabidGravy is trying to decide whether the test data here is broken or URI::Encode 09:59
would you think that "drücken" should encode to "dr%FCcken" or "dr%C3%BCcken" 10:00
moritz URL encoding should use UTF-8 10:01
so the latter
RabidGravy URI::Encode then 10:02
book
booh
10:03 FROGGS left
BooK RabidGravy 10:05
sorry, I meant, er...
RabidGravy :-*
BooK! You cool?
10:06 rurban1 left
BooK sure :-* 10:06
10:10 virtualsue joined
dalek kudo/nom: 70b3a90 | jnthn++ | src/Perl6/Metamodel/SubsetHOW.nqp:
Subset types should get stashes.
10:12
10:12 rurban joined 10:14 Actualeyes left
RabidGravy right, that's where it's going wrong: 10:14
m: say "ü".encode # is right 10:15
camelia rakudo-moar 317746: OUTPUT«utf8:0x<c3 bc>␤»
10:15 Actualeyes joined, domidumont joined
RabidGravy m: say "ü".ord.fmt('%%%02X') 10:16
camelia rakudo-moar 317746: OUTPUT«%FC␤»
10:16 domidumont left
RabidGravy is wrong 10:16
10:16 espadrine_ joined 10:17 domidumont joined 10:18 Upasaka joined
RabidGravy m: say "ü".encode.list.map({ .fmt('%%%02X')}) 10:18
camelia rakudo-moar 317746: OUTPUT«(%C3 %BC)␤»
RabidGravy m: say "ü".encode.list.map({ .fmt('%%%02X')}).join('')
camelia rakudo-moar 317746: OUTPUT«%C3%BC␤»
RabidGravy Tsk, don't people actually use this software? 10:20
10:23 virtualsue left, Upasaka left 10:24 andreoss joined 10:34 Upasaka joined
RabidGravy presumably it does the wrong thing decoding as well 10:35
ShimmerFairy "ü".ord does exactly what it's supposed to do, I don't see the problem :) 10:36
10:37 rindolf joined
RabidGravy it does indeed, unfortunately the problem is it should be being used for URI encoding UTF-8 properly 10:39
shouldn't
ShimmerFairy of course not 10:40
jnthn Be *very* careful with .ord
(Can lead to data loss if you use it on a synthetic) 10:41
RabidGravy what I don't get is that URI::Encode has been around for a year and no-one has noticed it
jnthn It only breaks on non-ASCII? 10:42
"only"...
RabidGravy so it seems 10:43
BooK add more tests!
jnthn m: say Pod::Block
camelia rakudo-moar 70b3a9: OUTPUT«(Pod::Block)␤»
RabidGravy MORE TESTS! MORE TESTS! 10:49
10:52 doublec left 10:53 doublec joined 10:55 Skarsnik joined 11:01 znpy left, Zoffix left, Zoffix joined
RabidGravy [\x00..\xff] isn't "all code points" is it 11:04
the guy so copied this code from a Perl 5 module 11:05
11:05 softmoth_ joined
jnthn m: say "It's {100 * 0xFF / 0x10FFFF}% of codepoints" 11:07
camelia rakudo-moar 70b3a9: OUTPUT«It's 0.02288820% of codepoints␤»
RabidGravy so 0x10FFFF is the definitive top end of the range? 11:08
jnthn Well, it's all that Unicode defines 11:09
metasin perhaps an odd question, but which novel has the most quotation marks?
11:09 softmoth_ left
RabidGravy metasin, that's sort of unknowable 11:11
I'd go with some Dickens or something as them Victorians were big on the reported speach 11:12
speech
right, that's fixed now for the decoding which is a bit more tricky on the face of it 11:19
(in the sense of having to get contiguous %FF things together into one buffer 11:20
oh yes, rightly messed up 11:22
jdv79_ RabidGravy: the one in URI seems better. the one in URI2 also does but its not ready for prime time.
11:23 jdv79_ is now known as jdv79
RabidGravy this is almost certainly true, but this one needs fixing 11:23
'Grüner Weg' 11:24
:-O
jnthn whacky mojibake... 11:25
dalek kudo/nom: 1f678a0 | jnthn++ | src/Perl6/World.nqp:
A clone to avoid destroying name arrays.
11:26
kudo/nom: 6b44673 | jnthn++ | src/core/Complex.pm:
Fix class stubbing scope inconsistency.
jnthn Darn, fixing RT #118361 has turned into quite the task...
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=118361
11:32 dayangkun_ left
jdv79 now wonders if my use of ords is ok or not 11:32
11:39 znpy joined
jdv79 yeah, looks fine 11:39
jnthn ords should be fine 11:42
Since it's defined in terms of NFC
arnsholt m: my \primes = grep(*.is-prime, 2 .. *).list; sub init(&f) { map { (($_ - .Int)*2**32).Int }, map &f, primes }; my @H = init(&sqrt)[^8]; say @H[0]; 11:58
camelia rakudo-moar 6b4467: OUTPUT«1779033703␤»
arnsholt m: my \primes = grep(*.is-prime, 2 .. *).list; sub init(&f) { map { (($_ - .Int)*2**32).Int }, map &f, primes }; my @H = Blob.new: init(&sqrt)[^8]; say @H[0];
camelia rakudo-moar 6b4467: OUTPUT«Blob:0x<67 85 72 3a 7f 8c ab 19>␤»
arnsholt Why does the latter version set the first element of @H to be a Blob? 11:59
12:00 xpen left 12:02 espadrine_ left 12:03 kid51 joined 12:06 azawawi joined
azawawi hi #perl6 12:06
dalek p: 05b7f78 | jnthn++ | src/how/NQP (6 files):
Implement .^shortname in NQP MOP.
jdv79 arnsholt: because you asked it to? 12:07
you constructed a Blob obj and created an array of one element using that value, no? 12:08
arnsholt Right, let me rephrase it. How do I get it not to? =)
azawawi I want to discuss again markdown usage inside perl 6 pod blocks. Was there any work done on that front? 12:09
ilmari arnsholt: byt not doing that? what are you trying to achieve?
jnthn arnsholt: .list
m: say Buf ~~ Iterable
camelia rakudo-moar 6b4467: OUTPUT«False␤»
jdv79 azawawi: when was that discussed?
afaik, no.
arnsholt jnthn: Doesn't look like .list does the trick 12:10
m: my \primes = grep(*.is-prime, 2 .. *).list; sub init(&f) { map { (($_ - .Int)*2**32).Int }, map &f, primes }; my @H = Blob.new: init(&sqrt)[^8].list; say @H[0];
camelia rakudo-moar 6b4467: OUTPUT«Blob:0x<67 85 72 3a 7f 8c ab 19>␤»
arnsholt ilmari: I'm trying to replace the uses of unadorned lists in Digest::SHA with Bufs and Blobs 12:11
jdv79 that looks like precedence fail
azawawi jdv79: irclog.perlgeek.de/perl6/2015-10-19#i_11398054
arnsholt I've already shaved off a nice chunk of time by doing it, but there's a couple left 12:12
jnthn Blob.new(init(&sqrt)[^8]).list
12:12 kaare_ joined
arnsholt Oh, list on the Blob itself, right 12:12
azawawi moritz: ping 12:13
RabidGravy m: say "Gr%C3%BCner%20Weg".subst(/[\%$<bit>=[<[0..9A..Fa..f]>** 2]]+/, { Buf.new($/<bit>.list.map({:16($_.Str)})).decode }, :g); # there
camelia rakudo-moar 6b4467: OUTPUT«Grüner Weg␤»
moritz azawawi: pong
azawawi moritz: do you have any comment on github.com/perl6/DBIish/issues/29 ? 12:14
moritz azawawi: sorry, no time to review right now 12:15
azawawi: but if it doesn't hurt the other drivers, I'm likely fine with merging it
azawawi moritz: No problem. I know you're busy :)
it is basically add typing to postgresql arrays. but i didnt write a tests for it. so i will merge it once tests are written 12:16
s/add/adding
the next thing once this is complete is www.postgresql.org/docs/9.4/static/rowtypes.html 12:17
jdv79 RabidGravy: that is pretty tight. wonder how different that is than my attempt in terms of perf...
RabidGravy probably awful TBH but I think "correct but simple" is my goal here ;-) 12:19
jdv79 i think i wouldn't have thought it through like that cause of my p5 thinking of method calls are expensive intuition 12:21
gotta sep 5 and 6 better in my head 12:22
and "core" is faster. which around here is way less true. 12:23
azawawi Windows has way better support. `rakudobrew build moar && rakudobrew build-zef` now works. tadzik++ 12:24
the thing we need to make rakudobrew detect visual studio somehow 12:25
moritz: Windows::StuffFinder should be my next project :)
tadzik :)
RabidGravy and ye tests pass
all good
azawawi tadzik: it works sometimes... sometimes it needs another run though 12:26
tadzik: i will send your PR regarding windows soon
tadzik: s/PR/a PR/
tadzik oh, awesome :) 12:27
azawawi tadzik: the sad thing though is github.com/tadzik/panda/issues/245
jdv79 azawawi: was there a discusssion or just your one line there?
azawawi jdv79: read after it :)
tadzik azawawi: aaaaaaaaaaa!! 12:29
that looks crazy :)
dalek kudo/nom: f042d6b | jnthn++ | src/Perl6/Metamodel/ (11 files):
Don't pass in longname separately to MOP.

Instead, we'll always accept the fully qualified name (and adjust things so we provide that in all cases), and then expose a shortname meta-method that gets the unqualified name.
12:30
kudo/nom: 985ef11 | jnthn++ | tools/build/NQP_REVISION:
Bump NQP_REVISION for .^shortname.
jdv79 azawawi: don't see it. anyway, that could be neat. 12:31
arnsholt jnthn: The construction you gave gives me an Array, though, which might be more general than what I need. Is there really no easy way to create a Blob/Buf from a listy thing of ints? 12:32
jdv79 you could just throw a .md file next the to the .pm6 files of the same name maybe - like .pod
azawawi jdv79: sorry for that... wrong link lol :) irclog.perlgeek.de/perl6/2015-10-18#i_11394867 12:33
azawawi blames his mind 12:34
jnthn arnsholt: What gives you an array?
m: my @ints = 1, 2, 3, 5; say Blob.new(@a) # contains those ints
camelia rakudo-moar 6b4467: OUTPUT«5===SORRY!5=== Error while compiling /tmp/3mVue5Ocf4␤Variable '@a' is not declared␤at /tmp/3mVue5Ocf4:1␤------> 3my @ints = 1, 2, 3, 5; say Blob.new(7⏏5@a) # contains those ints␤»
jnthn m: my @ints = 1, 2, 3, 5; say Blob.new(@ints) # contains those ints
camelia rakudo-moar 6b4467: OUTPUT«Blob:0x<01 02 03 05>␤»
jdv79 are azawawi and his mind seperate entities? 12:35
arnsholt Buf.new($stuff).list
jnthn m: my @ints = 1, 2, 3, 5; say Buf.new(@ints).list.WHAT 12:36
camelia rakudo-moar 6b4467: OUTPUT«(List)␤»
arnsholt Or a list. Thought it said Array at my REPL
jnthn But I'm not sure whey you'd do that when you already had @ints to start out wiht
What're you trying to achieve?
arnsholt See if I can't shave off some overhead in Digest's SHA256 function
jnthn By working on a buf instead of a List/Array? 12:37
Ah, is your confusion that assignment into an Array is *into* it, not replacing it?
m: my @a = Buf.new(4, 6, 8); say @a.WHAT
camelia rakudo-moar 6b4467: OUTPUT«(Array)␤»
jnthn m: my @a := Buf.new(4, 6, 8); say @a.WHAT
12:37 kid51 left
camelia rakudo-moar 6b4467: OUTPUT«(Buf)␤» 12:37
Skarsnik Hello
arnsholt Oh! 12:38
jnthn arnsholt: This may be a good place to use native arrays though
my uint8 @array; # or so
jdv79 oh, Markdown blocks and a renderer seems like a neat idea.
jnthn Which store just as compactly as Buf
jdv79 azawawi: are you working on that?
arnsholt I've completely lost the plot on listy things, clearly!
dalek kudo/nom: 5ed61e0 | jnthn++ | src/core/Mu.pm:
Type objects should always gist to short name.
kudo/nom: 5751a25 | jnthn++ | src/core/traits.pm:
`is export` on types should use short name.
kudo/nom: c1ed4f9 | jnthn++ | lib/NativeCall.pm:
Fix a need for .^shortname in NativeCall.
Skarsnik I am the only one having huge slow down on vim on perl6 syntax hightlighting? Or it's due to an outdated file? 12:39
dalek kudo/nom: 5159793 | jnthn++ | src/Perl6/ (3 files):
Make .^name and .WHO.Str fully qualified.

Always. Not just sometimes, as before.
ast: 07fc1d2 | jnthn++ | S10-packages/basic.t:
Correct syntax of test and un-todo.
12:40
ast: 584d7aa | jnthn++ | S0 (4 files):
Merge branch 'master' of github.com:/perl6/roast
ast: 1e18170 | jnthn++ | S02-types/baghash.t:
Merge branch 'master' of github.com:/perl6/roast
12:40 risou is now known as risou_awy
ast: 7aeff20 | jnthn++ | S02-types/WHICH.t:
Update for .gist changes.

It now reliably gives the shortname.
jnthn eek
12:40 risou_awy is now known as risou
arnsholt Skarsnik: The vim Perl 6 syntax is pretty heavy, yeah 12:40
jnthn Oh, I guess `make spectest` pulls...
Thus the merges.
dalek ast: 5439c65 | jnthn++ | S10-packages/basic.t:
Tests for RT #118361.
12:41
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=118361
Skarsnik well it's slow on a 50 lines files already x)
azawawi jdv79: :)
jdv79: the issue started while i was working on perl6-electron. A lot of the wrapped API needed to be documented. 12:42
dalek ast: 2d2311d | jnthn++ | S10-packages/basic.t:
Unfudge a now-passing test.

Oddly, the ticket it was associated with was already resolved; seems there was a bit of .HOW vs. .WHO confusion.
12:44
ast: f41a28b | jnthn++ | S14-roles/namespaced.t:
Unfudge test for RT #124750.
12:45
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124750
jdv79 azawawi: wonder how that would work though. perl6 --doc=HTML would need to parse and render the markdown as a subpart or something. 12:46
right? 12:47
jnthn Phew. That was more effort than expected... :/
azawawi jdv79: perl6 --doc=MD or MARKDOWN you mean?
jnthn: github.com/softmoth/perl6-pod-to-markdown/
jnthn lunch & 12:48
jdv79 not if its embedded in pod6, no?
idk anything about that stuff though 12:49
azawawi jdv79: or maybe reuse Pod::To::Text 12:50
jdv79 i think i'd want to dig in to the code before talking much more on it. be neat if it worked well thoug. 12:52
12:53 softmoth_ joined
ShimmerFairy IIUC, I believe the theoretical proper way would be to write a class for =begin Markdown ... =end Markdown that would parse its contents and handle it as necessary, but I think that's all very NYI still :/ 12:57
12:57 softmoth_ left
azawawi jdv79: Pod::To::Text chomps newlines off lists... bummer 12:58
jdv79 now that sounds promising 12:59
13:01 samb11 is now known as samb1 13:04 bombless joined
brrt silliest question i've seen today; can infinite be an integer 13:07
13:07 rurban left
BooK m: say Inf.WHAT 13:07
camelia rakudo-moar 515979: OUTPUT«(Num)␤»
moritz brrt: yes by design docs, no by implementation 13:08
pink_mist I don't find the question that silly; I honestly don't know the answer :P
what about by mathematics? :P
BooK I'd it depends on the space you're working in to get there :-)
but the question about infinite is more about how big it is 13:09
pink_mist so if I'm working in the space of all real numbers, can infinite be an integer then? :P
timotimo azawawi: hey, are you still around? 13:11
yoleaux 07:36Z <nine> timotimo: your Inline::Python call.t failure is fixed. TimToady added a sum method to Any which triggered the test failure.
timotimo nine: excellent! thanks
BooK and technically, ∞ is not part of ℕ
more surprising is: 13:12
m: say Nan.WHAT
camelia rakudo-moar 515979: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WE5XcXxrEa␤Undeclared name:␤ Nan used at line 1␤␤»
BooK m: say Na.WHAT
camelia rakudo-moar 515979: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qBMk2PBnoi␤Undeclared name:␤ Na used at line 1␤␤»
BooK m: say NaN.WHAT
camelia rakudo-moar 515979: OUTPUT«(Num)␤»
BooK dammit
how to make a pun fall flat
timotimo oh, you mean "why is NaN a Num"? 13:13
BooK I think I understand why
I mean, what else could it be?
pink_mist "Not a Number" is clearly a number >_>
timotimo somehow i ended up with a folder named ":" inside my panda folder 13:14
RabidGravy yay!
timotimo the folder has a bunch of subfolders
RabidGravy better than one called '..'
timotimo i cd'd all the way through and this is the pwd:
/home/timo/perl6/ecosystem/panda/:/home/timo/perl6/install/share/perl6/site/lib:/home/timo/perl6/ecosystem/panda/ext/File__Find/lib:/home/timo/perl6/ecosystem/panda/ext/Shell__Command/lib:/home/timo/perl6/ecosystem/panda/ext/JSON__Tiny/lib:/home/timo/perl6/ecosystem/panda/lib
BooK we don't want to know what's in your colon
folder
timotimo it was made on the 8th of may, so whatever caused this problem is potentially already fixed 13:15
BooK RabidGravy: can a folder actually be named .. ?
'.. ' sure, that's how you'd hide your warez on public ftp servers 13:16
RabidGravy sure, but it's usually a link to the parent directory
BooK heh
RabidGravy but I have seem it actually be something else on a very broken Unix filesystem about twenty years ago 13:17
azawawi timotimo: yup 13:18
brrt ok, i missed the discussion; the reason i find it silly is that integers are basically the set of things one can count 13:19
clearly, infinite cannot be counted 13:20
therefore, it is not within the set of integers
even though the integers form an ifninitely large sets
s[sets][set]
timotimo azawawi: i responded to the issue about JSON::Fast on panda
BooK and there are infinities of various sizes too
timotimo i could use your assistance, as i can't reproduce the bug locally 13:21
RabidGravy there also used to be an ancieunte DOS virus (some variant of Form I think) that messed up the filesystem by switching the types of thingies in the FAT around
13:22 CIAvash left
BooK en.wikipedia.org/wiki/Aleph_number # ooh, actually infinity is even more complex than I thought I remembered :-) 13:22
RabidGravy sucks to be the decorators next door but one, they just put the fine render coat on the outside and then it proceeded to pour down with rain
now lots of plaster all over the pavement 13:23
azawawi timotimo: sure im looking at it
timotimo thanks 13:24
dalek kudo/nom: 9ea6973 | (Stefan Seifert)++ | tools/build/Makefile-common-rules.in:
Make spectest_update safer

Only pull if we can do a fast foward to avoid making merge commits or worse merge conflicts if the local branch has been rebased.
The automatic pull is a convenience feature. It must not make development inconvenient.
nine jnthn: ^^^
jnthn nine: ooh!
azawawi timotimo: 13 before it dies ...
jnthn nine++
azawawi timotimo: say nqp::ordat($initial, 0); # 13
moritz must say that giving nine++ a commit bit was one of our better decision :-) 13:25
jnthn ;)
nine moritz: I'm glad you see it that way :)
Skarsnik hm nativecall is interesting you need to put Str for const char* field in cstruct (str lead to sigsev) but you can't call nativesizeof on it x) 13:26
jnthn I suspect nativesizeof could be taught about that 13:27
Given it's just gonna be the size of a pointer
timotimo azawawi: so why won't nom-ws skip over it?
azawawi: can you help me with this? 13:28
Skarsnik Let see how nativesizeof(ctructrep) work actually 13:29
azawawi timotimo: because it is too fast lol... looking into it
timotimo i'm glad you think it's too fast, but i was hoping i could make it faster yet 13:30
13:31 TimToady left
azawawi timotimo: wsord=4294967309 # huh? 13:31
timotimo uh? we're leaking a synthetic again?
jnthn Looks like... 13:32
timotimo ISTR a fix for that recently :S
jnthn ordat is a bad idea generally
I thougth so too
If it's ordat that's broken I'm as likely to toss it as fix it...
13:32 TimToady joined
timotimo damn. it's so convenient, though 13:33
jnthn No, it's not
timotimo JSON::Fast lives at an uncomfortable place
jnthn It's a great way to write broken code
timotimo where the thing coming in is supposed to be a freak version of utf8
as in: it allows only up to a certain codepoint and beyond that it requires surrogates 13:34
bwuh. disgusting.
jnthn ugh
But really, nqp::eqat is a *far* safer way
timotimo i definitely don't want to work with the incoming stuff at the Buf level
moritz yes, json basically rests on UCS-2 assumptions 13:35
jnthn Doesn't allocate, and does the right thing with synthetics
timotimo hum. that's probably the way to go, then.
oh, hum. but how's this:
we likely have to support strings that start with a combiner 13:36
my current implementation - and i expect JSON::Tiny's as well - will just consider the combiner to live on the "
ugh, makes my skin crawl
azawawi timotimo: this is strange voodoo... 'say $pos;' dies... 13:37
timotimo um, wat :) 13:38
dj_goku_ p6: '7qa'.split('', 2) 13:41
camelia ( no output )
Skarsnik jnthn, not sure is that easy, you need to say that Str is repr CPointer not P6Opaque, not sure if it's a good thing?
dj_goku_ p6: '7qa'.split('') 13:42
camelia ( no output )
dj_goku_ m: '7qa'.split('')
camelia ( no output )
dj_goku_ oh
timotimo dj_goku_: please use "say" to get output
dj_goku_ m: say '7qa'.split('')
camelia rakudo-moar 9ea697: OUTPUT«( 7 q a )␤»
dj_goku_ aye. :D 13:43
p6: say '7qa'.split('', 2)
camelia rakudo-moar 9ea697: OUTPUT«( 7qa)␤»
dj_goku_ timotimo: I was thinking that then said oh! 13:44
13:44 CIAvash joined
zengargoyle good * #perl6 13:44
ShimmerFairy timotimo: at this point one really oughta consider forking JSON into something that doesn't act broken with unicode (and maybe allows comments too while you're at it) :P
zengargoyle looks like i'm doomed to have to learn more nqp stuff...
i thought i could stuff some Perl into core/Pod.pm and use it easily, it seems not to be true. 13:45
nine ShimmerFairy: and trailing commas! 13:46
moritz ShimmerFairy: json5 supports comments (and NaN etc.)
and yes, I think trailing commas too (not sure)
jdv79 blasphemers
ShimmerFairy moritz: gasp, you mean JSON had dared to soil the purity of their "just objects" format with the dreaded comments!? 13:48
jdv79 json value is its simplicity and ubiquity. how do all these extra features pull their weight? 13:50
timotimo dj_goku_: i had tangerine on my hands that i had to wipe off before i touched the keyboard :P
13:52 sammers joined
zengargoyle i'm guessing i have to do something like core/Capture.pm and do more create the whole thing from the ground up by hand type of thing. 13:52
dj_goku_ timotimo: so your hands and keyboard smell fresh and clean now! 13:56
13:57 sprocket joined
timotimo i wiped off the hands, not the keyboard ;) 13:57
this is a chiclet keyboard; those are notoriously hard to clean
dj_goku_ haha. googling
ahh those keyboards. 13:58
timotimo since the tab key already fell off and won't go on any more, i'm really not going to try to take off keys for cleaning
dj_goku_ I have the full sized mac keyboard with a cover and just wash it.
timotimo this is a microsoft sculpt 2 13:59
14:07 pmurias joined 14:09 ifim joined
timotimo japhb: are you around right now? 14:11
14:11 bombless left
vytas is perl6 weekly coming out this week ? (: 14:12
timotimo yes, vytas, yesterday i was sick all day and only got better in the evening and then i didn't feel up to doing it, but today i will :)
vytas thanks, and thanks for doing this, nice summarise of what's happening ! :)
timotimo don't thank me, thank lizmat! she's done the last 7 posts for me %) 14:13
of course i'm still glad to hear of people who read the weekly :) 14:14
14:16 rurban joined 14:21 pierrot joined
cognominal timotimo, whoever writes it, it is a must read. 14:21
timotimo <3 14:22
Skarsnik hm, does something see common mistake I could add checks with defininig nativecall cstruct: github.com/Skarsnik/nativecall-typediag (look the example) 14:25
14:27 rdmtob left 14:32 skids joined
Skarsnik should that be fixed? 14:35
nqp/MoarVM/src/6model/reprs/CStruct.c
239: "CStruct representation only handles int, num, CArray, CPointer, CStruct, CPPStruct and CUnion");
14:35 sprocket left
Skarsnik since putting int and num is a bad idea 14:35
timotimo maybe it should have "representations" at the end
that could make it clearer? 14:36
14:36 azawawi left, tokuhiro_ left
jnthn And correct it to P6int and P6num maybe 14:37
Since those are actual representation names
Skarsnik yes
jnthn m: say int.REPR; say int32.REPR; # etc 14:38
camelia rakudo-moar 9ea697: OUTPUT«P6int␤P6int␤»
Skarsnik quite confusing
jnthn Not really 14:39
Representations are (usually configurable) memory layout/management strategies
Skarsnik m: say Str.REPR; 14:40
camelia rakudo-moar 9ea697: OUTPUT«P6opaque␤»
cognominal why %?LANG is created only if the grammar is modified?
Skarsnik Str is also allowed
m: say Hash.REPR; 14:41
camelia rakudo-moar 9ea697: OUTPUT«P6opaque␤»
JimmyZ m: say str.REPR
camelia rakudo-moar 9ea697: OUTPUT«P6str␤»
14:41 softmoth_ joined
Skarsnik I had sigseg if I put str instead of Str in CStruct repr 14:42
arnsholt jnthn: Fun fact: Changing some "my @x" to "my uint32 @x" seems to generally slow the code down 14:45
I suspect added type checks
14:46 softmoth_ left
jnthn arnsholt: More like added boxing 14:46
arnsholt: If you use native types you need to use them fairly consistently
arnsholt: It may also be about native refs not being optimized away
arnsholt Durr. That's it of course 14:47
jnthn Yeah, I'll probably have to do a talk / slide deck on working with natives effectively at some point or something :)
Not to mention on understanding the profiler output :)
arnsholt That'd probably be nice. In the meantime, do you have any tips on how to track down what triggers the boxing? 14:48
jnthn The profiler! :P 14:49
Look on the allocations tab :)
timotimo it's not terribly fine-grained, though :(
jnthn Gets you to within a function 14:50
timotimo yup
dalek href="https://modules.perl6.org/mojo-app:">modules.perl6.org/mojo-app: 9fdc7d0 | (Zoffix Znet)++ | / (2 files):
Add TODO suggestion list

Some ideas to take us further once mojo-app branch gets merged to master
arnsholt Yeah. But I'm only working on a single function, unfortunately =)
Another hilarious one is where changing "my @h = @H" to "my uint32 @h = @H" changes the semantics. What's the difference in the assignment semantics between native and non-native arrays? 14:51
jnthn Nothing is intended besides unboxing the values 14:52
What're you seeing?
timotimo the rwness multi-cache stuff is complete now, right?
jnthn timotimo: yeah
timotimo great
arnsholt It's the mixing loop of the SHA function. First it does "@h = @H", then later "@h = flat $t1 ⊕ $t2, @h[^3], @h[3] ⊕ $t1, @h[4..6];" (the values being computed from @h, obv), then finally "@H = @H Z⊕ @h;" 14:54
jnthn arnsholt: It's possible that we ended up not updating it sufficiently for one-arg rule post GLR...
arnsholt The results are the same for the first iteration, but then diverge 14:55
Aha. In that case I'll try updating my Rakudo first
14:58 virtualsue joined 15:01 brrt left 15:02 soggybread joined 15:04 johntravolta joined, johntravolta left
arnsholt jnthn: FWIW, when I print the @h variable. If it's uint32 @h it prints as "a b c", but if it's just my @h it prints as "[a b c]" 15:05
timotimo you could try dd-ing it instead of just printing 15:06
that gives you a bit more clarity usually 15:07
15:09 n0xff_ left
arnsholt Indeed it was. The difference is "Array = $[...]" versus "array[uint32] = array[uint32].new(...)" according to dd() 15:09
dalek rl6-roast-data: 2aeeb87 | coke++ | / (9 files):
today (automated commit)
15:10
timotimo still not that easy to see if that was an array of one element or something ...
15:15 ZoffixW joined 15:16 pippo joined
arnsholt How good is the optimizer with reduce metaops applied to literal lists? Will the metaop machinery be optimized out, or might it be worth to rewrite into a non-metaop version? 15:16
timotimo the latter, i fear 15:17
all we can do is perhaps inline something, but it's nowhere close to optimizing out the metaop machinery :(
arnsholt Right. Especially "[+^] map { rotr @h[0], $_ }, 2, 13, 22" is going to go, I think 15:18
timotimo on the other hand, the call graph in the profiler output may be able to guide you well
15:18 softmoth_ joined
arnsholt It spends most of the time in the sha256 function, really. And the remaining entries are frequently so squashed together I can't really read them 15:19
But postcircumfix:<[ ]> is one of the more visible ones too
timotimo mhm
if the graph itself doesn't help much, at least you can click through the listing at the bottom
15:20 virtualsue left, quietfanatic joined 15:22 xpen joined
ZoffixW m: my ( $r, $g, $b ) = (11, 30, 12); say map { .base(16).sprintf('%x') }, $r, $g, $b; 15:22
camelia rakudo-moar 9ea697: OUTPUT«Directives specify 0 arguments, but 1 argument was supplied␤␤»
ZoffixW Directives? wat?
timotimo huh?
quietfanatic I think directive is referring to the %x, but
ZoffixW m: my ( $r, $g, $b ) = (11, 30, 12); say map { sprintf('%02x', $_) }, $r, $g, $b; 15:23
camelia rakudo-moar 9ea697: OUTPUT«(0b 1e 0c)␤»
ZoffixW I figured what I want, but... no idea what that error was about :P
timotimo interesting, that could perhaps want mentioning that it comes from sprintf
ZoffixW: i think you potentially want .fmt instead of map for that?
m: my ( $r, $g, $b ) = (11, 30, 12); say ($r, $g, $b).fmt("%02x");
ZoffixW looks up fmt
camelia rakudo-moar 9ea697: OUTPUT«0b 1e 0c␤»
timotimo m: my ( $r, $g, $b ) = (11, 30, 12); say ($r, $g, $b).fmt("%02x", ""); 15:24
camelia rakudo-moar 9ea697: OUTPUT«0b1e0c␤»
ZoffixW nerdgasms
timotimo m: my ( $r, $g, $b ) = (11, 30, 12); say ($r, $g, $b).fmt("%02x", ",");
camelia rakudo-moar 9ea697: OUTPUT«0b,1e,0c␤»
ZoffixW Man Perl6 is a bag of goodies. You keep finding awesome stuff :)
timotimo++ thanks.
quietfanatic oh, method form .sprintf is assuming the left side is the format
arnsholt Oh, yeah. Removing the metaops shaved off half a second on checksumming a kilobyte
quietfanatic "%x".sprintf(11)
m: "%x".sprintf(11)
camelia ( no output )
quietfanatic m: say "%x".sprintf(11)
camelia rakudo-moar 9ea697: OUTPUT«b␤»
15:25 yqt joined
Skarsnik fmt is nice :) 15:26
timotimo arnsholt: that doesn't seem like much; how long does it take all in all?
Skarsnik half a second for 1kB is nice lol 15:27
RabidGravy Skarsnik, and it's less to type ;-)
arnsholt Skarsnik: Half a second off the total runtime =)
Total runtime for my script is 5.5 to 6 seconds. But a large chunk of that is just parsing in the library 15:28
timotimo oh, because it doesn't get pre-compiled?
so you can use --stagestats to see how long that part takes
arnsholt According to the profiler, it now spends 1531 ms in the tightest inner loop, which is 96% of the total time 15:29
Yeah, I'm not precompiling since I keep fiddling with the library code
Oh, stagestats is a good point
timotimo++ # optimizing the optimization
The inner loop spends half the time in postcircumfix<[ ]> though, and another 20% in STORE 15:30
timotimo you can potentially use .AT-POS instead of postcircumfix:<[ ]>
ZoffixW What profiler are you using? 15:31
arnsholt Worth a shot, I suppose
ZoffixW (as in, how do I get it to play with it and my code)
timotimo perl6 --profile foo.p6
ZoffixW Oh. Sweet.
timotimo arnsholt: what's the summary look like? how many frames get thrown out by the inliner? how much of it gets spesh'd, how much gets jitted? 15:32
and how much overhead do we get from the GC?
arnsholt 6% GC, 1.8% spesh. 11.5 percent of frames were eliminated by inlining 15:33
15:33 xpen left
timotimo and jit? what about jit? 15:33
arnsholt 78% jitted frames 15:34
timotimo ah. not too bad
actually. how big is the html file? can you maybe put it online?
nine So brrt++ can rescue performance in this case ;)
arnsholt 430K 15:35
timotimo to be honest, i'd rather take such a puny task off his plate so he can concentrate on even-more-jit
oh, that's quite tiny
nine timotimo: I was referring to his work on a better jit :)
timotimo ah!
arnsholt timotimo: heim.ifi.uio.no/arnskj/profile.html 15:36
15:36 khw joined 15:37 tokuhiro_ joined
timotimo arnsholt: can you also re-run the script with env MVM_JIT_LOG=foobar.jitlog.txt and give me the output of grep 'Constructing\|BAIL' foobar.jitlog.txt | | grep -B1 BAIL | grep -v '^--$' 15:38
that'd tell me which frames don't get jitted and why
15:38 hankache joined
ZoffixW I'm stuck again with handling sub returns... if I have sub foo() { ... return ($h, Δ, $c_max); } and I'm calling it as { my ( $h, \Δ ) = foo; } , why does Δ end up being `Any` ? 15:38
timotimo hum, actually, the one routine that takes the most time (almost "by far") is inside the BOOTSTRAP, so i can have a look locally, too!
arnsholt: does line 2036 in your m-BOOTSTRAP refer to find_best_dispatchee? 15:39
arnsholt src/gen/m-BOOTSTRAP.nqp:2036 here is a closing brace 15:40
timotimo oh, huh? 15:41
15:42 tokuhiro_ left
ZoffixW Oh. seems to do with the \Δ 15:42
timotimo i think the profiler results may be a bit ... confused here 15:43
the bars don't add up to 100%, for example
arnsholt timotimo: heim.ifi.uio.no/arnskj/jitlog.txt for the jitlog output
And sha256.jitlog.txt for the whole shebang, if you want it
I've updated the profile.html too, so that the jitlog and the profile are from the same run 15:44
timotimo a whole bunch of _I ops that don't get jitted cause a whole bunch of bails
ah, coolt
arnsholt (I think there was a small change between the first profile and the second run)
15:44 kjs_ joined
Skarsnik timotimo, hm, did you find something interesting with my memory leak in the profile page I gave you? (I am just curious) 15:44
arnsholt Yeah, the code is basically a huge pile of binary logical ops
timotimo Skarsnik: um, i don't remember :( - i *think* that profile just crashed my browser :( 15:45
RabidGravy is there a sane way of doing tables in Pod 6?
Skarsnik www.nyo.fr/~skarsnik/profile-144736...08688.html I know that iceweasel does not like these profile file x)
timotimo arnsholt: what's the context of line 2036 in your m-BOOTSTRAP.nqp? 15:46
ZoffixW m: { my ( $x, \Δ, $y ) = (5, 6, 7); say $x, \Δ, $y; }; say ' ----- '; { my ( $x, $y ) = (5, 7); my \Δ = 6; say $x, \Δ, $y; }
camelia rakudo-moar 9ea697: OUTPUT«5\(Any)7␤ ----- ␤5\(6)7␤»
ZoffixW I'd call that a bug ^ :/
Is it? 15:47
timotimo sigil-less variables are quite special
does $Δ fare better?
ZoffixW Hm. Maybe I should avoid using them so liberally then :)
timotimo perhaps
jnthn You can't list-assign to a sigil-less var
PerlJam m: my (\a, \b) = (1,2); say a; say b;
camelia rakudo-moar 9ea697: OUTPUT«(Any)␤(Any)␤»
arnsholt It's in find_best_dispatchee, yeah 15:48
moritz m: my ( $x, \Δ, $y ) = (5, 6, 7); say $x, Δ, $y;
camelia rakudo-moar 9ea697: OUTPUT«5(Any)7␤»
ZoffixW Yeah $Δ works, but it loses that special look :)
jnthn But we really shouldn't just let it end up as Any, we should fail to compile it...
ZoffixW +1 on failing
jnthn TimToady++ filed an RT to clean that up
moritz Skarsnik: chromium also complains "site unresponse" when I try to switch to the "call graph" tab
jnthn And to provide a way that works
timotimo jnthn: is it fair to say TimToady worked on the "most recent continuous match" thing?
jnthn Most recent continuous match? 15:49
I did that, and TimToady decided he didn't want those sematnics, and I still need to pull them out again...
timotimo yeah, backreferences to captures that match multiple times
oh?
15:49 mr_ron joined
jnthn But yeah, I worked on the issue, and fixed the RT in question 15:49
arnsholt timotimo: I just tried your AT-POS suggestion, and that drops it down something like another 0.7 seconds
jdv79 the profiler output is all but useless for non-trival sized code ime
timotimo so rather not put that into the weekly?
Skarsnik hm, the file work localy
jnthn timotimo: It can go in
jdv79 even the output of a few simple test files kill my browsers
timotimo Backreferences to captures that have multiple matches now have a "most recent continuous match" logic to them. The backreference then matches the text between $first.from 15:50
^- like this?
jdv79: there's a branch that works towards cutting the call tree a little bit, but it generates wrong results :(
jnthn timotimo: Well, that's what I did. But it should actually not ahve the "continuous" constraint
jdv79 i know. you've typed about it many times. where is it?
timotimo it should just match from the earliest match to the last match?
mr_ron star-m: use URI::Escape; say uri_escape("drücken") 15:51
camelia star-m 2015.09: OUTPUT«dr%C3%BCcken␤»
timotimo jdv79: moarvm finite_callgraph_depth
jdv79 mr_ron: yes. yours ane mine work fine. its the other one that was (is?) not too super. 15:52
which, tbh, is rather ironic as its the only thing that other diet does whereas in ours its just a cog in the machine 15:54
*dist
arnsholt timotimo++ # Calling AT-POS directly 15:55
timotimo arnsholt: how much is that worth?
15:55 hankache left
arnsholt A LOT 15:55
timotimo are the results still correct? :P 15:56
arnsholt The two main operations of the SHA algorithm now account for 21 and 19 percent of runtime in the inner loop
timotimo upload the new profile so i can have both side-by-side? :)
arnsholt Yeah, my test script prints the result of "$gold eqv sha256($data)"
timotimo very good :)
arnsholt profile2.html 15:57
ZoffixW Weird. This works in Camelia, but in my code I get a failure:
m: sub foo () { return map { .round }, 64, 138, 192, 255 }; use Test; is-deeply foo(), (64, 138, 192, 255);
camelia rakudo-moar 9ea697: OUTPUT«ok 1 - ␤»
arnsholt Yeah, it took me a while to realize I needed to do that, but oh well =)
ZoffixW Failure being # expected: $(64, 138, 192, 255) # got: (64, 138, 191, 255).Seq
arnsholt timotimo: At this point rotr and infix:<⊕> not being inlined is starting to look interesting too 15:58
timotimo arnsholt: 404 :(
jdv79 timotimo: that's over a year old
arnsholt timotimo: Fixed
timotimo jdv79: yeah, it can probably still apply cleanly, though
arnsholt The university login cluster has an overzealous umask I've never bothered to fix
jdv79 no rush huh? :)
timotimo i tried to make it work two or three times, but the results were always wrong 15:59
15:59 znpy left
ZoffixW Oh, I'm blind. One number is off. Never mind me. 15:59
timotimo arnsholt: maybe you can find a way for rotr to not allocate a Scalar
at 19k scalars allocated it's only a small percentage of the 200k, but it might make a difference still? 16:00
arnsholt Yeah, I'm not sure why that happens. The definition is: "sub rotr($n, $b) { $n +> $b +| $n +< (32 - $b) }"
timotimo easy, just use \n and \b, since they are read-only anyway
jdv79 will there ever be ro containers for something like has @.foo ?
arnsholt Ah, excellent. I was about to suggest that 16:01
timotimo that m-BOOTSTRAP.nqp:2036 occuring is still a big thorn in my side, though
jdv79 its nice that i can have a ro obj except not that the container attrs are not
timotimo it's responsible for 48k BOOTCode allocations of 140k
PerlJam
.oO( how to work rotr.oh into the code ... )
jnthn arnsholt: Putting type decls in sub rotr may help
(on $n and $b) 16:02
timotimo arnsholt: were you making sure you're looking at m-BOOTSTRAP.nqp and not BOOTSTRAP.nqp?
arnsholt Yup. It's rakudo/src/gen/m-BOOTSTRAP.nqp
timotimo :|
shouldn't it be gen/moar/m-BOOTSTRAP.nqp? 16:03
no
yeah
arnsholt Aha!
timotimo it should be
the src/gen folder is outdated, i believe
arnsholt It's probably leftovers from when gen was src/gen
Yeah
timotimo aye
so, is it find_best_dispatchee?
arnsholt Yup
timotimo damn it!
i'd have to go through the call graph to see what actually calls it. god damn it, what a dra. 16:04
drag.
16:04 znpy joined
timotimo re-generating the icicle graph each time makes it super crazy slow 16:04
16:05 hankache joined
arnsholt Adding types drops rotr down the list, yeah. Doesn't get inlined though 16:05
16:05 frew1 is now known as frew
TimToady starts to recover from his interview yesterday at TWiT.tv :) 16:05
yoleaux 16 Nov 2015 21:39Z <b2gills> TimToady: There are two problems with Range.sum, It outputs a Rat for Int based ranges, and doesn't work for any other type of range ( see my comments on github.com/rakudo/rakudo/commit/6d...94b8b9b328 )
jdv79 should i be able to stuff a list or a map into a container attr?
timotimo TimToady: i already have half of it watched :P
jdv79 that would be ro, no?
dalek kudo/nom: a662e02 | TimToady++ | src/core/Range.pm:
fix up Range.sum as b2gills++ pointed out

It should always return Int, and it should allow integer wannabes.
16:06
jdv79 there's a new a new p6 video?
timotimo twit.tv/shows/triangulation/episodes/225
jnthn
.oO( TimToady Was in TV )
16:07
16:07 johan_ joined
jnthn queues it up to watch later :) 16:07
PerlJam Is there a place to link such videos on perl6.org?
TimToady if you do that, people will notice I'm starting to repeat myself in my old age :) 16:08
timotimo that happens if people keep asking the same questions!
PerlJam TimToady: people inside the echo chamber have already noticed ;)
16:08 cognominal left
TimToady you can say that again 16:08
arnsholt timotimo: Huh. Changing rotr to take \n, \b breaks the code, for some reason. 16:09
timotimo oh 16:10
16:10 WizJin joined
arnsholt But adding type constraints gave a nice boost as well 16:10
16:10 cognominal joined
arnsholt Dropped from 21% to 7 16:10
timotimo i'm a little surprised
jnthn timotimo: We use the type constraints to see it's not Iterable (and thus can't flatten) and so there's no risk of deconting it rather than wrapping it in a protectory ro scalar 16:11
timotimo: So it saves quite a lot of Scalar allocations
timotimo oh! 16:12
i must keep that in mind!
16:13 johan_ is now known as johan 16:14 znpy left 16:15 domidumont left
quietfanatic m: module X { sub foo () { } }; module X { sub bar () { } }; foo(); 16:27
camelia rakudo-moar a662e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6Z6SNSDJ11␤Redeclaration of symbol X␤at /tmp/6Z6SNSDJ11:1␤------> 3module X { sub foo () { } }; module X7⏏5 { sub bar () { } }; foo();␤ expecting any of:␤ generic role␤»
quietfanatic So, the spec seems to indicate its legal to split a module up into multiple locations like that
which would be pretty useful for a really large module that wants to be split up into multiple files 16:28
jnthn You'd need package for that, though augment module would be an alternative
dalek ast: d2ef359 | TimToady++ | S03-operators/range-int.t:
test Range.sum semantics
16:29
Skarsnik Or should unit work for that?
quietfanatic Ah. Would it be more normal to make the parts seperate modules and merge them with the import mechanism?
(I'm porting the SDL API with NativeCall) 16:30
flussence that's what I prefer to do (as soon as re-exporting gets implemented...)
TimToady m: module X { sub foo () { } }; augment module X { sub bar () { } }; foo();
camelia rakudo-moar a662e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hT86J4NFoP␤augment not allowed without 'use MONKEY-TYPING'␤at /tmp/hT86J4NFoP:1␤------> 3e X { sub foo () { } }; augment module X7⏏5 { sub bar () { } }; foo();␤ expecting any of:␤ gene…»
TimToady heh
m: use MONKEY-TYPING; module X { sub foo () { } }; augment module X { sub bar () { } }; foo(); 16:31
camelia rakudo-moar a662e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DS6tSrWCzh␤Cannot augment X because it is closed␤at /tmp/DS6tSrWCzh:1␤------> 3e X { sub foo () { } }; augment module X7⏏5 { sub bar () { } }; foo();␤ expecting any of:␤ generic role␤»
TimToady hehheh
quietfanatic it really does not want you to do that
TimToady well, foo wouldn't be visible without export anyway
quietfanatic You can't call X::foo()?
Skarsnik quietfanatic, maybe try to split according to the sdl type or common stuff? like SDL::Binding::Image SDL::Binding::Surface, ect.. 16:32
TimToady m: module X { sub foo () { } }; foo();
camelia rakudo-moar a662e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9WWMST2dPD␤Undeclared routine:␤ foo used at line 1␤␤»
quietfanatic m: module X { sub foo () { } }; X::foo()
camelia rakudo-moar a662e0: OUTPUT«Could not find symbol '&foo'␤ in block <unit> at /tmp/ZOZawvvsNn:1␤␤Actually thrown at:␤ in block <unit> at /tmp/ZOZawvvsNn:1␤␤»
quietfanatic oh
TimToady m: module X { sub foo () is export { } }; import X; foo();
camelia ( no output )
tony-o_ m: say from-json('{ }');
camelia rakudo-moar a662e0: OUTPUT«␤»
quietfanatic Skarsnik: I'm going to split according to SDL's C header scheme
TimToady functions are now lexical rather than package scoped
quietfanatic Ideally you should require absolutely no documentation to use this besides SDL's original documentation 16:33
TimToady m: module X { our sub foo () { } }; X::foo();
camelia ( no output )
quietfanatic Right, okay
TimToady unless you use 'our'
16:33 hankache left
Skarsnik ooh it's our to have X::foo 16:34
timotimo quietfanatic: are you binding SDL or SDL2? there's already an SDL module and also SDL2::Raw which you could contribute to, if you'd like
quietfanatic SDL2
oh, I did not know that
timotimo :)
SDL2::Raw is mine. i'd be glad to give you a commit bit
quietfanatic searching for "perl6 sdl" was not enough I guess
timotimo huh, strange 16:35
quietfanatic timotimo: I might appreciate that. 16:36
RabidGravy puts in a hack into the URI::Template tests to check whether URI::Encode is working properly
Skarsnik It's a bit sad we can't do class A is repr('CStruct') { some stuff } my class AP is repr(A) { some method for a *A object) 16:37
timotimo you're "quietfanatic" on github?
Skarsnik: that's totally wrong
a class is definitely not a repr
quietfanatic timotimo: yes
timotimo congratulations, you're a collaborator on timo/SDL2_raw-p6 :) 16:38
quietfanatic timotimo: would you mind if I adjusted the API a bit (like making it SDL::whatever instead of SDL_whatever)?
thanks!
timotimo that's all right
TimToady the specs say that native types should allow derived classes that only add methods, but we're not there yet
flussence there's another URI::Template?
timotimo p6weekly.wordpress.com/?p=975&...frame=true - can people see this? 16:39
Skarsnik nop
flussence probably not, it doesn't have a mile-long string of hex chars...
Skarsnik should we have an account?
jnthn TimToady: Don't suppose you found a moment to ponder the semantics of callsame/nextsame when there's nowhere to defer to? :)
timotimo god fucking damn you, wordpress.
TimToady m: class MyInt is Int { method sum-of-range() { (1..+self).sum }; say MyInt.new(42).sum-of-range 16:40
camelia rakudo-moar a662e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RpNo8pnZgQ␤Missing block␤at /tmp/RpNo8pnZgQ:1␤------> 3f).sum }; say MyInt.new(42).sum-of-range7⏏5<EOL>␤ expecting any of:␤ postfix␤ statement end␤ statement modifier…»
TimToady jnthn: we have to be a bit failsoft there
on account of the point of nextsame is to defer to .^mro when we don't necessarily know if we have siblings 16:41
why we have nextsame instead of SUPER::
jnthn TimToady: Indeed, depends how soft we want to be I guess :) 16:42
ZoffixW m: say 12.base(16).round('A') # is there any magic to make this work?
camelia rakudo-moar a662e0: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '7⏏5C' (indicated by 7⏏)␤ in block <unit> at /tmp/z4hJdz44eS:1␤␤Actually thrown at:␤ in block <unit> at /tmp/z4hJdz44eS:1␤␤»
TimToady so Nil is probably about the right softness
jnthn OK
And should nextsame/nextwith become like "return Nil"?
TimToady m: class MyInt is Int { method sum-of-range() { (1..+self).sum } }; say MyInt.new(42).sum-of-range
camelia rakudo-moar a662e0: OUTPUT«903␤»
jnthn That is, they don't let control flow past them even if there's nowhere to defer?
TimToady ooh, it does work
oh wait, that's not a native 16:43
m: class MyInt is int { method sum-of-range() { (1..+self).sum } }; say MyInt.new(42).sum-of-range
camelia rakudo-moar a662e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/R7DkYmzqI_␤int does not support inheritance, so MyInt cannot inherit from it␤at /tmp/R7DkYmzqI_:1␤»
TimToady yeah, NYI
psch m: say 12.round( (:16('A')) ).base(16) # ZoffixW
camelia rakudo-moar a662e0: OUTPUT«A␤»
psch ZoffixW: .base gives you a Str apparently, so round before rebasing works 16:44
TimToady jnthn: correct, they become return Nil at that point
psch ZoffixW: note the (:16('A')) isn't a named but the reverse of .base 16:45
ZoffixW psch, but isn't that equivalent to "10"?
psch m: say (:16('A'))
camelia rakudo-moar a662e0: OUTPUT«10␤»
psch well, yes... am i misunderstand what you want to do? 16:46
m: say 12.round(10)
camelia rakudo-moar a662e0: OUTPUT«10␤»
psch m: say 12.round(15)
camelia rakudo-moar a662e0: OUTPUT«15␤»
psch hmm, maybe i'm *also* misunderstanding .round :/
TimToady m: say 42.round(15) 16:47
camelia rakudo-moar a662e0: OUTPUT«45␤»
ZoffixW I'm trying to get 'FC' to end up as 'FF', 'F7' to end up as 'E0'
16:47 kjs_ left
ZoffixW umm 16:47
FC -> 100
TimToady what about multiples of A?
jnthn TimToady: k, thanks :)
Gives me an easy-ish thing to do this evening :)
16:47 abraxxa left
TimToady round is based on modular arithmetic, more or less 16:48
you can't just round in the last digit
psch m: :16($_).round('16').base(16).say for 'FC', 'F7'
camelia rakudo-moar a662e0: OUTPUT«100␤F0␤»
psch well, without the accidental Str to round
ZoffixW :16() is the reverse of .base(16), right? 16:49
Sweet
psch++ :D
japhb .tell timotimo With my new job, I'm *really* async these days. I notice you highlighted me a couple times in the last week, but I've gotten no .tell's. Please use that! :-)
yoleaux japhb: I'll pass your message to timotimo.
16:49 sufrostico joined
timotimo hey japhb 16:50
yoleaux 16:49Z <japhb> timotimo: With my new job, I'm *really* async these days. I notice you highlighted me a couple times in the last week, but I've gotten no .tell's. Please use that! :-)
timotimo if this can be a synchronisation point, i'd like to ask you about the "pi-sequential" benchmark
japhb What about it?
timotimo just by .Int-ing the @*ARGS[0], the run time gets cut in half. should that be fixed, or kept so that measurements stay consistent with older benchmarks? 16:51
16:51 zakharyas left, sno left, lostinfog joined
arnsholt Heh. Rendering the profile output in Chrome from a short run of the IPerl6 kernel takes about 845 megs of RAM 16:52
japhb I'm not finicky about keeping measurements the same over time, because I think if people want to see old numbers, they should just build and test the old compilers -- not try to dig up old test results.
Also, is @*ARGS[0] not an IntStr these days? 16:53
dalek osystem: 40c0bf6 | RabidGravy++ | META.list:
Add URI::Template

  github.com/jonathanstowe/URI-Template
timotimo not really sure 16:54
perhaps only when sub MAIN is used
RabidGravy there, with fudged encoding tests for the time being
japhb I'd like to capture the fact that dynamic variable lookup and IntStr are both slower than they should be, certainly ... but I have no problem with having a duplicate of the test that simply changes that one thing, so people can see how much time is lost dealing with @*ARGS[0]. 16:55
arnsholt jnthn: Question. In the profile, when there's a call like "foo ..." and one of the arguments to foo is a potentially expensive expression; is the expression counted as inside the calling block, or as inside foo()?
flussence RabidGravy++ # neat, now I don't have to fix my one :D
japhb I keep wanting to do that work to allow the overlay of two different tests into one graph, but I keep not having time to work on it. :-(
Anyone else is of course encouraged to take that on, and I'd be happy to review and merge, or give a commitbit.
timotimo yeah :S 16:56
jdv79 uri templates are a thing now? i've never used them.
arnsholt jnthn: Never mind. Looking closer at the profile I figured it out
RabidGravy jdv79, tools.ietf.org/html/rfc6570 a few years now
really useful for abstracting rest-like interfaces 16:57
flussence, I didn't realise you'd made one, if I had I would have just fixed that :) 16:58
jnthn arnsholt: The caller
japhb timotimo: Got to run, but .tell me later if there's more to discuss.
timotimo sure, thanks! i think i'll just put that fix in :) 16:59
flussence RabidGravy: it only barely worked and I haven't done anything with it for a year because of the «|»/«||» regex bug. Got plenty of failing tests if you want to steal those though!
timotimo p6weekly.wordpress.com/2015/11/17/...-fail-nil/ - feedback appreciated! 17:02
pierrot /w/wc
timotimo feedback as well as additions
grammar/spelling improvements
etc etc
hoelzro o/ #perl6
timotimo yo hoelzro 17:03
psch timotimo: "Failure itself is now derived from Failure."
hoelzro howdy timotimo
timotimo oops!
arnsholt OH, wow. Browsing through a large profile balloons memory usage pretty quickly
timotimo yeah :(
quietfanatic The :D turned into a smiley 17:04
timotimo derp! :)
17:04 telex left
timotimo how do i prevent that? :\ 17:04
psch <code> or <quote> i guess
RabidGravy flussence, I snarfed the github.com/uri-templates/uritemplate-test :) Passes all of them with the fixed URI::Encode :)
arnsholt timotimo: The ballooning memory use, or the smiley? =)
psch but you'd probably want to consistently use that for anything that's actually code
oh, or <pre> maybe 17:05
quietfanatic Sometimes there's a "don't parse smileys option" but then you'll lose the :)s
timotimo the memory usage
17:05 pmurias left
flussence aaaaaargh, wish I'd known that existed instead of transcribing the spec by hand. 17:05
RabidGravy (except the negative tests which work somewhat different)
quietfanatic Could cheat with a zwsp :)
psch "using the [+] reduce metaoperator on addition" probably wants to read "[...] on Ranges"?
17:06 telex joined
timotimo hm, potentially 17:06
i reworded it to "using [+], the ... ,"
arnsholt timotimo: It's "just" a great big JavaScript app, so presumably we'd have to find the memory leak
timotimo arnsholt: it's got a gigantic json blob in it, that's the main problem, i suppose 17:07
psch ohh, that's how it was meant
timotimo++ # p6weekly
arnsholt Yeah, probably. But that it just gobbles up more and more memory might be fixable
timotimo oh? 17:08
could be, yeah
hoelzro .tell cygx thanks for your help yesterday; I still am getting access violations with my compiled Moar. I'm going to try removing all VS installations and see if that works
yoleaux hoelzro: I'll pass your message to cygx.
flussence crazy suggestion: could there be an option to have the profiler write straight to an sqlite file at runtime instead of buffering up callframes and dumping them as json at the end?
timotimo there's a flag that lets it write a bare json file, at least
if you want the profiler itself to write directly to sqlite, that'd have to go into moarvm 17:09
flussence yeah, that's why I call it crazy :)
timotimo if it's okay to spurt the whole data into an sqlite database at the end, it'd be fine to write it in nqp 17:10
17:10 espadrine_ joined
timotimo AFK for a little bit 17:10
17:14 molaf joined 17:17 grondilu left
dalek osystem: 69ab076 | (Sylvain Colinet)++ | META.list:
Add NativeCall::TypeDiag
17:17
17:17 virtualsue joined, grondilu joined 17:19 ribasushi left
ZoffixW m: class Foo { method bar () {say 42;}; method foo($meth) { self.$meth } }; Foo.new.foo('bar') 17:25
camelia rakudo-moar a662e0: OUTPUT«Cannot find method 'CALL-ME'␤ in method foo at /tmp/FHqMY5d8v4:1␤ in block <unit> at /tmp/FHqMY5d8v4:1␤␤»
ZoffixW Is there a simple way to use a variable as a name of a method to call?
dalek t-ZMQ: bf127b0 | arnsholt++ | lib/Net/ZMQ/ (2 files):
Make the message and sending API less strict about types.

These functions used to require buf8 arguments, but that's a bit too strict, since we only really care about getting an appropriate blob, not that specific type.
t-ZMQ: 6e5489c | arnsholt++ | lib/Net/ZMQ/Message.pm:
Make Net::ZMQ::Message.data somewhat less horribly inefficient.
jnthn ZoffixW: $obj."$name"() 17:26
ZoffixW Thanks, jnthn++
jdv79 ro container like attrs? anyone?
17:28 rurban left
[Coke] rakudo-jvm down to 4227 failures from 6068 yesterday. 17:29
17:31 ribasushi joined
timotimo jdv79: dunno :( 17:33
hm, i didn't even know Buf had .push 17:34
17:38 tokuhiro_ joined 17:41 kjs_ joined
sufrostico Hi, what is the community accepted way of multiline comments ? 17:42
PerlJam "community accepted"? heh.
Skarsnik using pod?
PerlJam sufrostico: #`(( foo )) will do you too 17:43
17:43 tokuhiro_ left
sufrostico =for comment? #`[ ] ? =begin comment =end comment ? 17:43
ZoffixW just uses '#'
PerlJam sufrostico: pod is more for documentation. comments are more for transfer of technical knowledge (IMHO) 17:44
17:44 virtualsue left
ZoffixW Cue in CTRL+D in the editor that [un]comments stuff :) 17:44
sufrostico still uses vim...
not working on anything big for now... 17:45
ZoffixW would be very surprised if vim did not support a "comment this" shortcut
sufrostico ZoffixW: good point
[Coke] anyone here use docker? hoelzro? 17:46
hoelzro [Coke]: yes 17:47
ZoffixW Is there a way to write ( my $x = $type ) ~~ s/d$//; in a simpler way? Like, P5's my $x = $type =~ s/d$//r; for example?
PerlJam ZoffixW: S/// is like p5's s///r
ZoffixW Ah, sweet. PerlJam++ 17:48
m: my $type = 'rgbad'; my $x = $type ~~ S/d$//; say [$type, $x]; 17:49
camelia rakudo-moar a662e0: OUTPUT«Potential difficulties:␤ Smartmatch with S/// can never succeed because the subsequent string match will fail␤ at /tmp/MDTRDSr_uS:1␤ ------> 3$type = 'rgbad'; my $x = $type ~~ S/d$//7⏏5; say [$type, $x];␤[rgbad False]␤»
17:49 muraiki joined
ZoffixW rakes docs.perl6.org/language/regexes for the answer 17:49
17:49 virtualsue joined
muraiki how can I determine and/or specify how many threads are being used in $*SCHEDULER's thread pool? 17:49
17:50 sno joined
ZoffixW Don't see anything. 17:50
PerlJam muraiki: I think there's a method that tells you how many are boing used.
er, s/boing/being/ 17:51
m: $*SCHEDULER.^methods.say
camelia rakudo-moar a662e0: OUTPUT«(BUILD queue cue loads handle_uncaught <anon> <anon> <anon>)␤»
PerlJam maybe .loads?
muraiki cool, thanks! 17:53
PerlJam See S17:145 17:54
synbot6 Link: design.perl6.org/S17.html#line_145
muraiki hmm. what I want to find is how many threads are being used, though, not pending/active cues 17:56
timotimo it gives you .loads of information!
ZoffixW badum ts 17:57
muraiki heh
17:57 Sgeo_ joined
timotimo ZoffixW, sufrostico, i have NERDCommenter in my vim and it's good 17:58
ZoffixW uses Atom for P6 and Sublime Text 2 for everything else.
muraiki well that's weird, .loads seems to always return "1" even if I have 100 things scheduled 17:59
17:59 sufrostico left, bpmedley left, Bucciarati left 18:00 molaf left, Sgeo left, stux|RC-only left 18:01 Zoffix left 18:02 sufrostico joined 18:03 espadrine_ left
TimToady off to writing group... 18:03
timotimo group. group. group. group. group. group. group. group.
18:04 quietfanatic left
sufrostico timotimo: just installed.. put everything with a # at the begining 18:05
timotimo yeah. is that bad?
arnsholt timotimo: Do you have any idea how to debug the messages sent between the kernel and ipython frontend?
timotimo hm. perhaps we may want to put a little patch into it
arnsholt: can you be more specific?
arnsholt I think I'm replying properly to some messages, but the frontend just keeps spamming me with the same requests over and over
sufrostico timotimo: yep, thanks :D 18:06
arnsholt So presumably my messages are malformed somehow, but the frontend doesn't complain, even when I pass the --debug flag
18:06 Bucciarati joined, stux|RC-only joined 18:07 sufrosti2o joined
timotimo hm. what kind of request is that? 18:08
arnsholt kernel_info_request
18:09 Zoffix joined
timotimo and you're responding to that? 18:09
arnsholt yup
18:09 dakkar left
timotimo you're refering to the original message ID in the header? 18:09
arnsholt Yeah, I'm setting the parent header to the header of the original message
timotimo mhm
perhaps the checksum verification fails? 18:10
you can set the key to "" if you want it to be ignored, or something like that anyways
arnsholt Yeah, maybe I should do that
gfldex m: my $r = (0.1 .. 0.3); dd $r; say $r.roll(10);
camelia rakudo-moar a662e0: OUTPUT«Range $var = 0.1..0.3␤(0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1)␤»
arnsholt But I think the checksum should work, since I get the right HMACs on messages I receive
gfldex should that do what i think it should?
18:10 xfix joined
timotimo gfldex: i think it intifies $r or something silly like that 18:11
18:11 sufrosti2o left
timotimo m: say (9, 20).roll(10) 18:11
camelia rakudo-moar a662e0: OUTPUT«(20 9 20 20 9 9 9 20 20 20)␤»
18:11 raiph joined
timotimo m: say (9..20).roll(10) 18:11
camelia rakudo-moar a662e0: OUTPUT«(20 12 15 14 14 10 20 10 17 16)␤»
timotimo m: my $r = 9..20; say $r.roll(10)
camelia rakudo-moar a662e0: OUTPUT«(14 10 10 16 9 15 13 12 11 15)␤»
timotimo the problem is probably that it interprets the ranges as integer lists
or rather "numbers with a distance of 1 in between" 18:12
18:12 sufrostico left
gfldex i shall toss a coin if i rakudobug or not in that case 18:13
18:13 sufrostico joined
timotimo hah 18:13
do the specs mention this at all?
18:13 molaf joined
muraiki m: for 1..10 { $*SCHEDULER.cue({say "foo"}, :in(6)) }; $*SCHEDULER.cue({say $*SCHEDULER.loads()}, :in(5)); sleep(8); 18:13
camelia rakudo-moar a662e0: OUTPUT«Memory allocation failed; could not allocate 15072 bytes␤»
gfldex i dont think so, but it should either work or warn 18:14
timotimo m: say (1.5..4.5).roll(10) 18:16
camelia rakudo-moar a662e0: OUTPUT«(2.5 1.5 2.5 1.5 3.5 3.5 3.5 3.5 2.5 1.5)␤»
timotimo that's definitely a bit weird :D
m: say (1.5..4.5).roll(100).grep(4.5)
camelia rakudo-moar a662e0: OUTPUT«(4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5 4.5)␤»
timotimo ah
18:17 FROGGS joined
psch m: say eager (0.1..0.3) 18:17
camelia rakudo-moar a662e0: OUTPUT«(0.1)␤»
psch m: say (0.1..0.3).cache
camelia rakudo-moar a662e0: OUTPUT«(0.1)␤»
gfldex rakudobugged under #126664, you may want to add more examples
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=126664
psch m: say (1..3).cache
camelia rakudo-moar a662e0: OUTPUT«(1 2 3)␤»
psch m: say (0.1, 0.2..0.5).cache 18:18
camelia rakudo-moar a662e0: OUTPUT«(0.1 0.2..0.5)␤»
psch m: say eager (0.1, 0.2..0.5)
camelia rakudo-moar a662e0: OUTPUT«(0.1 0.2..0.5)␤»
psch m: say eager (0.1, |0.2..0.5)
camelia rakudo-moar a662e0: OUTPUT«(0.1 1..0.5)␤»
timotimo you want ... for the 0.1, 0.2 ... 0.5 thing 18:19
psch yeah, that works
timotimo yeah, because that's a full list of the individual numbers
psch right
timotimo but it's still not 0.4.rand + 0.1
ZoffixW Can someone help me translate P5 to P6? I want to pass a named arg, but only based on a condition:
m: sub foo(:$x, :$y) { say [ $x, $y ] }; foo ( x => 42, 1 ?? y => 52 !! () );
camelia rakudo-moar a662e0: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in sub foo at /tmp/7af09XV2PB:1␤ in block <unit> at /tmp/7af09XV2PB:1␤␤»
timotimo ZoffixW: you'll have to use flattening for that 18:20
psch timotimo: 0.4.rand + 0.1?
ZoffixW timotimo, in the sub's signature?
Is it the "|" thing?
psch timotimo: does that mean 0.1..0.3 should be all reals between those two?
timotimo well, if you want (0.1 .. 0.3).rand to work, it's surely not going to just intuit 0.1, 0.2, 0.3 from that
ZoffixW: that's right 18:21
ZoffixW That sucks :P
timotimo well, on the other hand it means that a sub call without flattening is always exactly what you expect it to be 18:22
psch ZoffixW: you can lower a hash into the signature and add the element conditional
ZoffixW I guess. I still have a long way of getting used to all this typed stuff after P5.
psch m: sub foo(:$x, :$y) { say [ $x, $y ] }; my %nameds = x => 1; %nameds<y> = 2 if 1.rand > .5; say foo |%nameds
camelia rakudo-moar a662e0: OUTPUT«[1 2]␤True␤»
psch m: sub foo(:$x, :$y) { say [ $x, $y ] }; my %nameds = x => 1; %nameds<y> = 2 if 1.rand > .5; say foo |%nameds 18:23
camelia rakudo-moar a662e0: OUTPUT«[1 (Any)]␤True␤»
psch -doublesay
(also, "what are the odds")
ZoffixW Oh, sweet.
m: sub foo(:$x, :$y) { say [ $x, $y ] }; foo | %( x => 42, 1 ?? y => 52 !! () );
camelia rakudo-moar a662e0: OUTPUT«[42 52]␤»
ZoffixW psch++ thanks
gfldex m: (0.1 .. 0.3).elems.say; 18:24
camelia rakudo-moar a662e0: OUTPUT«1␤»
ZoffixW Oh. It actually should be this even, to handle the "false" case correctly
m: sub foo(:$x, :$y) { say [ $x, $y ] }; foo | %( x => 42, 1 ?? y => 52 !! |() );
camelia rakudo-moar a662e0: OUTPUT«[42 52]␤»
gfldex m: say so (0.1 .. 0.3).elems ~~ Inf ; 18:25
camelia rakudo-moar a662e0: OUTPUT«False␤»
gfldex that may be the problem
timotimo well, pick and roll really are about picking individual elements 18:26
m: say (20 .. 99).rand
camelia rakudo-moar a662e0: OUTPUT«69.0979545256671␤»
gfldex from the compilers/implementors standpoint that's for sure right
timotimo m: say (20 .. 99).rand(10)
camelia rakudo-moar a662e0: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at /tmp/f2mJN98E6Y:1␤␤»
timotimo m: say (20 .. 99).rand() xx 100
camelia rakudo-moar a662e0: OUTPUT«(65.5135606454512 73.4279093915385 75.8103991593123 53.6004247739746 66.4650495756868 37.9129187459945 54.6111217458108 15.0207934902032 67.2716971156489 67.5972616226889 76.133634273991 18.1951819101417 28.8197222453408 0.741202925593818 13.7309760843217 …»
18:27 M-eternaleye is now known as eternaleye
timotimo hmm, that gives values < 20, because it probably just .Int the range 18:27
18:27 eternaleye left, eternaleye joined
timotimo perhaps we really want to give Range a .rand method that DTRT 18:27
gfldex nods
timotimo and ask people to use that instead of .roll and .pick for ranges that are not "the integers between start and end"
psch afair, $n..$m with $n, $m as Rats is specced as ($n.Int..$m.Int) >>+>> ($n - $n.Int)
as in, it adds the fractional part again 18:28
timotimo mhm, could be
psch i'm not sure that's actaully spec and not just emergent though
m: say 0.1 .. 4.3
camelia rakudo-moar a662e0: OUTPUT«0.1..4.3␤»
psch m: say eager 0.1 .. 4.3
camelia rakudo-moar a662e0: OUTPUT«(0.1 1.1 2.1 3.1 4.1)␤»
gfldex the current behaviour is quite dangerous because randomness is rarely ever tested
timotimo i'll be AFK for a bit 18:29
psch m: say eager 0.1 .. 0.3 # means 0 .. 0 >>+>> .1
camelia rakudo-moar a662e0: OUTPUT«(0.1)␤»
18:29 zengargoylew joined
psch +parens 18:30
m: say (0 .. 0) >>+>> .1 # like this
camelia rakudo-moar a662e0: OUTPUT«(0.1)␤»
psch m: say eager 0.3 .. 4.1
camelia rakudo-moar a662e0: OUTPUT«(0.3 1.3 2.3 3.3)␤»
psch well, and still correct bounds checking...
so, way i see it, randomness isn't the confusing bit, but the Range generation is 18:31
(baring that i overlooked something in the conversation earlier)
the dd call previously is confusing, because it doesn't show the reified list
S02-types/range.t says that 1.2..4 has to have 3 elems 18:36
m: say +(1.2..4)
camelia rakudo-moar a662e0: OUTPUT«3␤»
psch so the behavior is correct, .1 .. .3 has 1 element 18:37
.roll()ing on that element gives only that element
ZoffixW How come $! is empty? 18:39
m: my ( $v1, $op, $v2 ) = (2, '-', "zoffix"); my $x = try { EVAL "$v1 $op $v2"; CATCH { fail "Invalid operand to Color: Got error $!" } }; say $x
camelia rakudo-moar a662e0: OUTPUT«Use of Nil in string context in block at /tmp/Dg9t65PMrW:1␤===SORRY!===␤Invalid operand to Color: Got error ␤»
ZoffixW is going by learnxinyminutes.com/docs/perl6/ that $! should contain the error message in that case 18:40
Um. never mind. 18:41
psch m: my ( $v1, $op, $v2 ) = (2, '-', "zoffix"); my $x = try { EVAL "$v1 $op $v2"; }; say $!
camelia rakudo-moar a662e0: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Undeclared routine:␤ zoffix used at line 1␤␤»
ZoffixW is really lost
psch $! is set after the CATCH, inside you get $_
not sure if that's correct though, but it's what's impl'd
ZoffixW Ah, thanks psch++
flussence m: given (^0xFF).chrs { say .comb(/<.print> & <-[\<\\\ %|{}^"`\>]> & <:ASCII>/) eqv .comb(/<[a..zA..Z0..9\-._~:\/?#[\]@!$&'()*+,;=]>/) } # I'm looking for a readable way to write this regex, but these two are the best I can come up with :( 18:42
camelia rakudo-moar a662e0: OUTPUT«True␤»
jdv79 is there an easy way to check if something is a synthetic codepoint? 18:43
timotimo flussence: why not put a few spaces?
gfldex m: try { fail 'foo'; CATCH { say * } }
camelia rakudo-moar a662e0: OUTPUT«*␤foo␤ in block <unit> at /tmp/mMEJQMrDKT:1␤␤»
timotimo gfldex: that's just say Whatever.new (basically) 18:44
FROGGS o/
psch o/ FROGGS
timotimo ohai FROGGS
ZoffixW \o
gfldex timotimo: does Whatever.new default to $_? 18:45
timotimo no
also, putting * into the arguments of a sub call terminates Whatever Currying
you'd have more success with *.say
psch m: try { fail 'foo'; CATCH { *.say } }
camelia rakudo-moar a662e0: OUTPUT«foo␤ in block <unit> at /tmp/ADvb7y9crV:1␤␤»
gfldex it does the right thing tho
psch the say prints a '*' and the Exception gets sunk 18:46
timotimo that's right
flussence timotimo: the <-[\< \> \\ \ %|{}^"`]> is ruining it for me. I'm wondering if there's some character class that'd cure all my problems I just don't know about :)
gfldex Whatever is another thing that will take a whole chapter to explain in The Perl 6 Book. 18:48
nine No mention of my work on the curli branch in the weekly :( .oO(I have to try harder this week) 18:52
ZoffixW is about to blow the Universe a new one...
m: my $x = 0/0;
camelia ( no output )
gfldex you may want to try lauder
ZoffixW :D it's so awesome that doesn't die
ZoffixW Tweets
psch m: say 0/0
camelia rakudo-moar a662e0: OUTPUT«Attempt to divide by zero using div␤ in block <unit> at /tmp/tVm2iqv_4p:1␤␤Actually thrown at:␤ in block <unit> at /tmp/tVm2iqv_4p:1␤␤»
ZoffixW m: say (0/0).^name 18:53
camelia rakudo-moar a662e0: OUTPUT«Rat␤»
18:53 hankache joined
psch m: say (0/0).nude 18:53
camelia rakudo-moar a662e0: OUTPUT«(0 0)␤»
ZoffixW tries to think of any useful feature from it not dieingg right away. 18:55
gfldex m: say so 0/0 ~~ NaN; 18:56
camelia rakudo-moar a662e0: OUTPUT«False␤»
gfldex m: say so 0/0 ~~ Inf;
camelia rakudo-moar a662e0: OUTPUT«True␤»
gfldex ZoffixW: there you go 18:57
ZoffixW hears hordes of math nerds cry out that that equation is false.
18:58 masak joined
masak evenin', #perl6 18:58
ZoffixW \o
hankache good evening everyone
corbyhaas kusuriya: ping
zengargoylew wonders if nqp has a &dd ... 19:00
nine ZoffixW: it's no equation, just an approximation, so math nerds should be fine
ZoffixW but 0/0 is undefined :D 19:01
gfldex in Perl 6 you can define anything!
moritz as is 0**0
19:01 spider-mario joined
ZoffixW moritz, really? I thought that was 1 19:01
nine isn't 0**0 = 1? 19:02
TEttinger no, special case
nine moritz: I've used that fact in the bool_enum branch. I very much hope it's true ;)
ZoffixW Hm, I almost got something semi-interesting, but for some reason the numerator doesn't change:
m: my $rat = 5/0; if ( $rat.denominator == 0 ) { say 'Universe will implode!'; $rat = Rat.new( :numerator($rat.numerator), :denominator(1)) ; }; say "Crisis averted: $rat"
camelia rakudo-moar a662e0: OUTPUT«Universe will implode!␤Crisis averted: 0␤»
jnthn jdv79: sub is-synthetic($chr) { chr(ord($chr)) eq $chr }
ZoffixW m: my $rat = 5/0; if ( $rat.denominator == 0 ) { say 'Universe will implode!'; $rat = Rat.new( :numerator(10), :denominator(1)) ; }; say $rat.nude 19:03
camelia rakudo-moar a662e0: OUTPUT«Universe will implode!␤(0 1)␤»
ZoffixW huh? :S
TEttinger oh geez this is a can of worms www.askamathematician.com/2010/12/q...-disagree/ 19:04
psch m: say Rat.new.nude
camelia rakudo-moar a662e0: OUTPUT«(0 1)␤»
psch m: say Rat.new(5, 1)
camelia rakudo-moar a662e0: OUTPUT«5␤»
ZoffixW Thanks
psch m: say Rat.^can('new')>>.candidates>>.signature.perl # for reference
camelia rakudo-moar a662e0: OUTPUT«($(:(Rat $: Int \nu = { ... }, Int \de = { ... }, *%_),), $(:(Mu $: *%), :(Mu $: $, *@, *%_)))␤»
ZoffixW Thanks again 19:05
TEttinger nine: what's 0.0 ** (1.0 / 0.0) 19:07
m: say 0.0 ** (1.0 / 0.0)
camelia rakudo-moar a662e0: OUTPUT«0␤»
TEttinger m: say 0.0 ** (-1.0 / 0.0)
camelia rakudo-moar a662e0: OUTPUT«Inf␤»
MadcapJake Do declarator blocks `#| ...` work? I tried accessing with `something.WHY.contents` but I get the error «Method 'contents' not found for invocant of class 'Any'»
TEttinger not what you would expect, but 0.0 raised to the negative infinity power is infinity
psch m: #| documentation␤ sub f { }; say &f.WHY 19:08
camelia rakudo-moar a662e0: OUTPUT«documentation␤»
masak TEttinger: you seem to throw these concepts around as if they weren't all limits.
psch m: sub f() #= other kind of documentation␤{ }; say &f.WHY
camelia rakudo-moar a662e0: OUTPUT«other kind of documentation␤»
TEttinger I guess.
I don't think of 0.0 raised to any power as being more than 1 19:09
MadcapJake cool, I forgot to use the `&`.
masak TEttinger: that's why limits help explain these things. because they're limits, not actual results.
TEttinger I really never got that far in math in schooling 19:10
ZoffixW Doesn't the limit of infinity not exist?
masak ZoffixW: infinity *is* a limit -- rather than an actual number on the real number line. 19:11
ZoffixW I see
masak ZoffixW: it's an abstraction, an "x such as x > y for any real number y"
such that*
TEttinger sorta a constraint that can never be met by a real number then 19:12
masak aye.
TEttinger without making it NaN
ZoffixW But Lim(1/x) for x->0 is undefined is what I was tought; not that it was an infinity
masak only mutually agreed sloppiness allows mathematicians to put Inf in places where real numbers go.
ZoffixW :D
pink_mist it approaches infinity as x approaches 0
masak or rather, it's allowed because it tends to work out fine.
pink_mist or something 19:13
ZoffixW pink_mist, but that's the point, you can't approach infinity :D
TEttinger we need a new math! a math where you can divide by 0! we can't trust mathematicians to do it, call up the IEEE... oh they already made up floating point math
masak ZoffixW: 1/x has no limit when x->0. it does, however have a limit "from above" (Inf) and one "from below" (-Inf)
ZoffixW: it's because these two "directional limits" disagree that there's no true limit. 19:14
dalek kudo/curli: 5bb42f8 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Have CompUnit::Repository::Installation represent a single repo

Remove the code that supported multiple paths and manifests. There was no code that could actually trigger this situation. This gives us a nicer base to build the new features on.
19:15
ZoffixW masak, what about |1/x|? both from above and below are Inf, but 1/0 is undefined, so there's still a break when x = 0 19:16
masak ZoffixW: yes, but that limit exists, as you guess.
(and it's Inf)
ZoffixW :o
masak ZoffixW: also, a bit amusing: 1/x does have a limit as x->0 in *complex analysis*, because the complex plane only has one infinity, not two like the real line. 19:17
ZoffixW Cool
ZoffixW never learned that stuff
masak ZoffixW: on the complex plane, infinity kind of looks like an infinitely big circle. 19:18
ZoffixW 0.o
masak like, start at (0, 0), pick a random heading, and go infinitely far. you end up at infinity.
complex analysis is fun. 19:19
pink_mist all roads lead to infinity? :P 19:20
moritz dimly remembers some integrals in closed paths around divergencies
masak yup.
19:21 cygx joined
moritz what was that, Cauchy-Schwarz? 19:21
nine jnthn: what did you have in mind for dist ID?
cygx masak: nothing wrong with compactifying the real line to S^1
yoleaux 17:08Z <hoelzro> cygx: thanks for your help yesterday; I still am getting access violations with my compiled Moar. I'm going to try removing all VS installations and see if that works
flussence m: for [X] (0.0, 1.0) xx 3 -> @_ [$a, $b, $c] { say @_ => $a ** ($b / $c) } # nothing to add to the conversation, I just thought this line of code looks really nice 19:22
camelia rakudo-moar a662e0: OUTPUT«(0 0 0) => 0␤(0 0 1) => 1␤(0 1 0) => 0␤(0 1 1) => 0␤(1 0 0) => 1␤(1 0 1) => 1␤(1 1 0) => 1␤(1 1 1) => 1␤»
masak moritz: you're thinking of Cauchy-Riemann. they are the (very strict) entry requirement for "holomorphic functions", aka "complex functions well-behaved enough to have derivatives". 19:23
cygx: yes, but that's not what we do in normal real analysis :)
jnthn nine: Could just go with ascending integers.
(Assuming you mean IDs of installed distributions...) 19:24
Unless you've a use case that won't work for?
jnthn didn't think of one, though
nine jnthn: I mean this: dist/[sha1] # JSON-serialized distribution info (SHA-1 of dist ID)
jnthn hm
Lemme look
nine As I should use this unique ID to abort if we've the dist already installed, I have to be able to deduct it from the distribution meta data 19:25
jnthn Right 19:26
Yeah, I found the section in question 19:27
19:29 vendethiel joined
timotimo nine: argh! well, it's not finished, but i really should have pointed it out! 19:29
jnthn nine: I suspect a canonical way of combining name/version/authority
Those together should uniquely identify it, ideally 19:30
vendethiel Zoffix++
19:30 diana_olhovik_ joined
ZoffixW vendethiel, I'm still unsure if that PR is right or not, but that's what I got from the conversation here :) 19:30
nine jnthn: well we do not have much else to use :) Except for the full provides list 19:31
vendethiel I think it's correct anyway, simply from the fact we use "when", it makes the most sense
jnthn nine: Yeah, I think that's overkill
Distributions should be immutable
vendethiel but perhaps someone who knows the rules of CATCH a bit more than I do can confirm what psch++ said irclog.perlgeek.de/perl6/2015-11-17#i_11554028
timotimo nine: updated! 19:32
19:32 andreoss left
vendethiel also, hi #perl6 :-) 19:32
hoelzro o/ vendethiel
jnthn vendethiel: Believe so. It's $_ inside of CATCH 'cus you want to be able to smartmatch on it
vendethiel jnthn: right, that was my reasoning as well (when, default, ...) 19:33
nine timotimo: :)
vendethiel today, I generated C++ code from a 6 script, then got yelled at for that. it's now a macro :'(
colomon :(
vendethiel he doesn't know I generated some other parts already :P 19:34
colomon vendethiel: I generate quite a bit of C++ code from perl scripts for $work. But I think most of those scripts are still C++, p6 is only starting to seep around the edges of what I do.
errr, most of those scripts are p5
vendethiel colomon: how well does it integrate in your build system?
colomon vendethiel: well, my build system is a shell script that calls a bunch of makefiles. 19:35
one of the makefiles calls a bunch of perl scripts
vendethiel colomon: seems a bit painful :P 19:36
colomon most of the other makefiles are generated by perl scripts. ;)
vendethiel doubly-linked hell then! 19:37
moritz that's all pretty standard for build systems these days
colomon it’s all very straightforward until something goes wrong. ;)
moritz that too :-)
19:37 mscha joined
vendethiel the less I have to touch makefiles, the better off I'm :) 19:38
masak .oO( it's all fun an games until something misparses )
moritz even if you use enterprisy tools and buy into the devops and continuous delivery buzzwords, you'll find that it's small {shell,perl,python,ruby} scripts at the bottom
colomon actually, as long as we’re rambling about build systems, does anyone out there have a feel for how private github repos work? 19:39
hoelzro colomon: I use them at $work
colomon (not so much build systems there, but still meta-ish and off topic)
vendethiel we're using qibuild at work (we have one of the old devs, i think), and it's python, but it usually is pretty separated from the cmake layer
DrForr Yep, Docker's been almost trivially rewritten in bash, for example.
masak colomon: I have private github repos, but I'm not sure what you're asking about.
19:39 AlexDaniel joined
moritz colomon: pretty much like public repos, except that you can't seem unless logged in 19:39
TEttinger colomon: I think people I know are preferring gitlab for infinite private repos
colomon hoelzro: any gotchas?
19:39 tokuhiro_ joined
TEttinger colomon: private repos don't count towards github streak 19:40
moritz s/seem/see them/
hoelzro colomon: none that I can really think of, but I might just not notice
19:40 domidumont joined
colomon masak: I’m mostly just stressing a bit about my $work source code living someplace besides my local machines and my offsite backup. 19:40
TEttinger I have a gitlab account but still primarily use github (gh-pages is a big thing for me) 19:41
colomon the big reason I’m thinking of it is to take advantage of github’s issue tracking.
TEttinger colomon: you could host your own gitlab
(get some more security)
(or possibly less)
dalek ast: 73e9c36 | jnthn++ | S12-methods/defer-call.t:
Test callwith/callsame with nowhere to defer.
moritz or gitolite + ssh (if you don't need the issue tracking) 19:42
DrForr My work is evaluating gitlab, dunno what they've done with it so far. They goofed and spammed the Perl dev team with gitlab invitations, beyond that I don't know.
TEttinger haha
flussence What's the failure mode for private gh repos if you downgrade to a free account? Do they become readonly, inaccessible, or public?
colomon moritz: the only reason I want to move from my current setup is to get issue tracking. :0
:)
moritz colomon: oh well :-) 19:43
19:43 n0tjack joined
dalek ast: 0b1f547 | jnthn++ | S12-methods/defer-next.t:
Remove an incorrect deferal test.
19:43
19:44 tokuhiro_ left
flussence I really want to like gitlab but I can't stand the UI, or lack of one. that mystery-meat navigation confuses me every time I go there. 19:45
arnsholt Yaaaay!
The frontend crashed, complaining about an invalid signature =D
pink_mist github seems to be rolling out a new UI
not sure how I feel about it yet
flussence also the tarball urls in gitlab aren't deterministic, which is pretty bad 19:46
mspo flussence: github isn't much better about it (but I think they're getting better?) 19:47
flussence: the best is that the tarballs are autogenerated so they don't have a consistent checksum 19:48
ZoffixW
.oO( seems like defining a bunch of ops slows the compilation to a crawl )
19:49
flussence the ones in github seem to be reliable (gentoo uses them directly, at least)
19:49 diana_olhovik_ left
timotimo arnsholt: progress! :) 19:50
arnsholt I know! =D
19:51 CIAvash left
moritz and don't put your server-side git repos on an NFS share :-) 19:51
ZoffixW Defining 17 ops: real 0m13.788s; without them: real 0m2.796s
ZoffixW is bummed out
mspo flussence: yeah pkgsrc eventually figured it out too 19:52
flussence: I think they stabilized the fetch api in the last ~year
moritz (our ops team thought that was a good idea, for easy backupability; it was slooooooow)
mspo git it kind of slow generally
especially if you have a bigger repo
it loads an entire index into memory for a lot of ops 19:53
arnsholt timotimo: Holy crap! Looks like one of my debug prints inserted garbage into the HMAC. IT'S ALIIIIIIVE!
ZoffixW \o/
mspo moritz: nfs is an interesting case, though
moritz: I wonder if it was all of the locking that slowed it down. Did repacking make it faster? 19:54
jnthn ZoffixW: It's 'cus we end up recomputing the entire set of NFAs for the Perl 6 grammar. 19:55
ZoffixW :(
jnthn ZoffixW: And fixing it involves doing dependency analysis between them
dalek kudo/curli: 36dba7f | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Store source files in the sources subdirectory of the repo
19:56
jnthn Which is going to be a good bit of work.
ZoffixW jnthn, does that mean even if I precompile this module, I'll still have this huge delay?
jnthn ZoffixW: No, it's a compile time delay only
ZoffixW Ah, *phew* :)
jnthn ZoffixW: Well, though it's possible importing them will cause issues if the importer isn't pre-compiled
TimToady has been thinking we could scan ahead for things that look like new tokens and introduce them early in the parsing, and just don't match them until they're officially there, in which case backtracking will find the current language definition
jnthn wonders how hard the dep analysis will be compared to that :) 19:57
ZoffixW jnthn, you're raised my hopes and dashed them expertly :)
timotimo arnsholt: sweet! glad to hear it!
(added a third low-hanging fruit to the weekly post)
arnsholt Heh. It's a bit brittle 19:58
TimToady if we use a tail-sharing representation for NFAs, we might just be able to slip into other NFAs without actually recomputing
19:58 cdc left
vendethiel TimToady: doesn't that mean you need in advance you need to know which slang you're parsing? 19:59
TimToady it just means the parent slang knows some tokens that it has to ignore because they aren't "official" in the current scope
and if there's a false positive because the language shifted too much, it'll never become official 20:00
dalek kudo/nom: 7c6a55e | jnthn++ | src/core/control.pm:
nextsame/nextwith should always cause a return

Even in the case they have nowhere to go.
TimToady the other approach is to do things lazily
20:00 boegel|quassel is now known as boegel 20:01 boegel left
TimToady but that only gets you a delay till first use, which would work fine for the setting, but not so good for the tests that go back and forth defining tokens and then testing them 20:01
jnthn I think we do compute them lazily after derivation, it's just that term's NFA drags in a huge amount
20:01 boegel joined
jnthn Similar for the other categories 20:01
20:01 cgfbee left
dalek ast: 7eca0e4 | jnthn++ | S12-methods/defer-next.t:
Test nextsame/nextwith with nowhere to defer.
20:02
ast: fb3c699 | jnthn++ | S12-methods/lastcall.t:
Chase updated nextwith/nextsame semantics.
20:03 autarch joined
ZoffixW m: class Foo { has $.x; }; sub foo {my %h; %h<x> = 42; return %h }; sub bar { my $x = 42; return %(:$x); }; my $foo_foo = Foo.new(|foo); my $foo_bar = Foo.new(|bar); say [$foo_foo, $foo_bar]; 20:03
camelia rakudo-moar a662e0: OUTPUT«[Foo.new(x => 42) Foo.new(x => 42)]␤»
ZoffixW Isn't ^ that equivalent to what I have here github.com/zoffixznet/perl6-Color/...r.pm6#L254 (the op() sub is defined right below, L275). For some reason I'm getting this error: fpaste.scsys.co.uk/501608 (Cannot call new(Color: Int, Int, Int, Int);)
er
20:04 cgfbee joined
ZoffixW the $foo_foo that is :) 20:04
This type stuff is doing my head in :) 20:05
nine jnthn: I don't think the handling of the repo.lock works as you described. Reads very much like a test and set race condition. The only way I know to avoid that is a real file lock. With that we don't have to fail if the repo is already locked. We'll be blocked anyway.
20:06 dwarring joined
jnthn nine: Yeah, you're right 20:06
nine: I was expecting it'd need proper file locking, but yes, we block acquiring the lock. 20:07
psch ZoffixW: fyi, you call can call $op($v1, $v2) instead of using EVAL in sub op
ZoffixW: that's probably not related to your question though :)
ZoffixW psch, wow! That's awesome
psch ZoffixW: oh, wait 20:08
ZoffixW: it's a string, so you have to do ::('&' ~ $op)
jnthn Down to 43 xmas :)
psch ...plus the infix stuff :/ 20:09
hm
ZoffixW jnthn++
psch m: sub infix:<foozle>($a, $b) { say "foozled" }; say ::('&infix:<' ~ "foozle" ~ '>')("a", "b") # not sure if that's still clearer than EVAL, but at least it's not EVAL
camelia rakudo-moar a662e0: OUTPUT«foozled␤True␤»
psch ZoffixW: ^^^ that's how it *actually* works... :S 20:10
ZoffixW :) Thanks
cygx btw, have there been any thoughts on loading modules from non-file sources in general and embedded bytecode data specifically?
I added 'virtual files' to MoarVM some time ago (cf github.com/MoarVM/MoarVM/compare/m...rtualfiles ) which worked great with NQP, but Rakudo did not like it... 20:11
jdv79 jnthn: thanks 20:12
jnthn TimToady: Next ticket that I'd like a ruling on: rt.perl.org/Ticket/Display.html?id=119193 (which is about whether .* and .+ are just about the inheritance chain, as we have it now, or if they should consider multi-methods too, and if so whether we want to skip over multis in parent classes if they share a common proto)
TimToady: Related is what .? should do if the thing it finds is a multi.
20:12 Amnez777 joined, darutoko left
jnthn (I can probably cope with implementing most sane rulings, so I don't feel strongly on it.) 20:13
TimToady my gut feeling is that . is only for single dispatch
20:13 molaf left
TimToady so .? and .* would only see protos 20:13
jnthn Right, that's how it works today
TimToady don't have a strong rationalization for it
jnthn Though, this can happen:
20:13 Amnez777 left, Amnez777 joined
dalek kudo/curli: b1b04ee | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Lock the repository on installation

Note that this does not actually help concurrency yet, since we still read the MANIFEST file in BUILD.
20:14
jnthn m: class A { multi m(Cool) { say "cool" }; }; class B { multi m(Int) { say "int" } }; B.m("")
camelia rakudo-moar 7c6a55: OUTPUT«Method 'm' not found for invocant of class 'B'␤ in block <unit> at /tmp/fkIGKNl04O:1␤␤»
jnthn oops
m: class A { multi method m(Cool) { say "cool" }; }; class B is A { multi method m(Int) { say "int" } }; B.m("") 20:15
camelia rakudo-moar 7c6a55: OUTPUT«cool␤»
jnthn m: class A { multi method m(Cool) { say "cool" }; }; class B is A { multi method m(Int) { say "int" } }; B.+m("")
camelia rakudo-moar 7c6a55: OUTPUT«cool␤cool␤»
TimToady seems like a duck-typing decision
jnthn You get it twice 'cus the dispatch list is cloned during inheritance
*inheritance
ZoffixW Found my problem: 20:16
m: class Foo { proto method new(|) { * }; has $.x; }; sub foo {my %h; %h<x> = 42; return %h }; my $foo_foo = Foo.new(|foo); say $foo_foo
camelia rakudo-moar 7c6a55: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/EZuon4qQPD:1␤Cannot call new(Foo, Int); none of these signatures match:␤ in block <unit…»
20:17 domidumont left
TimToady well, writing group breaking up, so --> home 20:18
TimToady would entertain use cases for not doing .* or .+ as it currently is, beyond whether it just misbehaves if you expect it different 20:19
ZoffixW Adding this multi solved my issue: fpaste.scsys.co.uk/501610
jnthn masak: You filed rt.perl.org/Ticket/Display.html?id=119193 so may want to chime in on ^^ discussion :)
TimToady certainly the original concept was that those only are for calling a set of methods that know they're being called that way
[Coke] jnthn: is rt.perl.org/Ticket/Display.html?id=123808 moot post-GLR? 20:20
jnthn m: my $a = 42; say <<$a b c>>; 20:21
camelia rakudo-moar 7c6a55: OUTPUT«(42 b c)␤»
jnthn m: my $a = 42; say qqww{$a b c};
camelia rakudo-moar 7c6a55: OUTPUT«(42 b c)␤»
jnthn m: my $a = 42; say qqw{$a b c};
camelia rakudo-moar 7c6a55: OUTPUT«[42 b c]␤»
jnthn hmm
autarch anyone have any thoughts on this code ... github.com/autarch/perl6-Pod-NodeWalker - in particular, are these the right class & role names - also, is the code idiomatic?
TimToady there's a sense in which .* and .+ really only make sense on submethody semantics
Hotkeys_ > my $fh = open("C:/John/three", :w);
Failed to open file C:\John\three: no such file or directory
Shouldn't it create the file?
vendethiel what's .+ ?
jnthn m: my $a = 42; say .WHAT for <<$a b c>>, qqww{$a b c}, qqw{$a b c} 20:22
camelia rakudo-moar 7c6a55: OUTPUT«(List)␤(List)␤(Array)␤»
Hotkeys_ or am I missing something
jnthn [Coke]: Bit dubious that the last one is Array, not List too
20:22 Hotkeys_ is now known as Hotkeys
ZoffixW Hotkeys, maybe 'John' dir doesn't exist? 20:22
[Coke] I'll add that to the ticket. Thanks.
Hotkeys oh
oops
you're right
ZoffixW \o/
jnthn TimToady: Good point on the link with submethods.
Hotkeys it's /Users/John
DrForr Good thing, otherwise 'C' would be a dir John letter. 20:23
Hotkeys lol 20:24
20:25 MilkmanD1n is now known as MilkmanDan
n0tjack ha 20:25
Hotkeys that took me a second
[Coke] jnthn++
TimToady wonders whether Rat ranges should intuit a step based on precision, since 1.1, 2.1, 3.1, 4.1 etc. is not actually very useful 20:27
s/ranges/sequences/
but ranges delegation to sequences
*gate
then the question arises how it knows that you said 5.00 vs 5.0 20:28
Hotkeys can't you just do eg. 1.1, 1.2, ... 10
TimToady well, that's the question
if you start at 1.0, or 1.00, or 1.000...
[Coke] m: say 1.1, 1.2 ... 2 20:29
camelia rakudo-moar 7c6a55: OUTPUT«(1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2)␤»
[Coke] TimToady: that's all going to get constant folded, no?
TimToady but it could intuit a step based on the precision without the second value
Hotkeys m: say 1.01, 1.02, ... 10
camelia rakudo-moar 7c6a55: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WHAwAPpAPV␤Comma found before apparent series operator; please remove comma (or put parens␤ around the ... listop, or use 'fail' instead of ...)␤at /tmp/WHAwAPpAPV:1␤------> 3say 1.01, 1.02,7⏏5 …»
Hotkeys m: say 1.01, 1.02 ... 10
camelia rakudo-moar 7c6a55: OUTPUT«(1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.3 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.4 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.5 1.51 1.52 …»
Hotkeys seems like a reasonable thing to do 20:30
[Coke] I'd be happy saying expecting 1.00 to 10.00 to work with .01 intervals is too magical.
TimToady 1.00 is already a constant, but we'd have to force it to be lazy on .REDUCE-ME if we wanted to remember that it was specified with 2 places
n0tjack m: say 100 RX/ 100 ... 1000;
camelia rakudo-moar 7c6a55: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AHR3TSxBEC␤Operators 'RX/' and '...' are non-associative and require parentheses␤at /tmp/AHR3TSxBEC:1␤------> 3say 100 RX/ 1007⏏5 ... 1000;␤ expecting any of:␤ infix␤ infix st…»
Hotkeys I assume people would mean step by .1 (etc) over step by 1 in that case more often
so they could still have the second value to step by 1
TimToady yes, I think this would optimize for the common expectation
n0tjack m: say (100 ... 1000) X/ 100; 20:31
camelia rakudo-moar 7c6a55: OUTPUT«(1 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.3 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.4 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.5 1.51 1.5…»
n0tjack hmm, why does RX/ not do what I expect it to do?
TimToady it wasn't possible before I put in lazy Rat reduction, but now we could
n0tjack oh wait
m: say 100 XR/ 100 ... 1000;
camelia rakudo-moar 7c6a55: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YlQg38aoDj␤Operators 'XR/' and '...' are non-associative and require parentheses␤at /tmp/YlQg38aoDj:1␤------> 3say 100 XR/ 1007⏏5 ... 1000;␤ expecting any of:␤ infix␤ infix st…»
TimToady read the error message :)
n0tjack you know, programming languages to date have trained me very hard to ignore error messages :) 20:32
perl6++ for non-goose-chase messages. 20:33
TimToady we'll try to fix that, at least by making error message entertaining, if not always informative :)
20:33 WizJin left
n0tjack m: 100 XR/ (100 ... 1000); 20:33
camelia ( no output )
n0tjack m: say 100 XR/ (100 ... 1000);
camelia rakudo-moar 7c6a55: OUTPUT«(1 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.2 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.3 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.4 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.5 1.51 1.5…»
TimToady change of venue & 20:34
dalek kudo/curli: 3eac879 | (Stefan Seifert)++ | src/core/ (2 files):
Deny installation of already installed distributions

Distributions (identified by name, auth, version and api) should be immutable so there's no sense in installing it multiple times.
20:35
nine jnthn: I guess the "Short-name quick lookup file by sha1 of the shortname" contains the SHA-1 IDs of all dist files providing a module with the given short-name? 20:41
20:41 espadrine_ joined
PerlJam finally watched TimToady on twit.tv 20:42
The new perl6.org got some air time
ZoffixW neat 20:43
vendethiel PerlJam: twit.tv?
PerlJam twit.tv/shows/triangulation/episodes/225 20:44
grondilu lol what is that? SNL for geeks? 20:45
20:45 geraud joined 20:46 diana_olhovik joined
vendethiel PerlJam: the guy seems to be speaking a lot about himself though 20:48
PerlJam which guy? :) 20:49
vendethiel the interview one. The other one might be, but then, that's what we want him to do! 20:50
ZoffixW m: class Foo { has Bool $.bar; }; my $c = Foo.new; $c.bar(True) 20:53
camelia rakudo-moar 7c6a55: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at /tmp/FPzQSV4CZY:1␤␤» 20:54
20:54 diana_olhovik left
ZoffixW Huh? How do I set Bool attributes? 20:54
Oh, rw
Hm, nope 20:55
m: class Foo { has Bool $.bar is rw; }; my $c = Foo.new; $c.bar(True)
camelia rakudo-moar 7c6a55: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in block <unit> at /tmp/2e3wh5jCGu:1␤␤»
PerlJam TimToady: btw, I like how you barely said anything about Parrot when he asked what happened and then just segued into talking about the other VMs :)
autarch m: class Foo { has Bool $.bar is rw; }; my $c = Foo.new; $c.bar = True
camelia ( no output )
autarch m: class Foo { has Bool $.bar is rw; }; my $c = Foo.new; $c.bar = True; say $c.bar
camelia rakudo-moar 7c6a55: OUTPUT«True␤»
autarch ZoffixW: ^ 20:56
ZoffixW Thanks, autarch++
autarch attributes != methods - of course you could make a private attribute and a public setter
and I hope that it's possible to write a metaclass that does things like that for you automatically
Hotkeys PerlJam: leo laporte still does stuff? 21:00
cygx paraphrasing TimToady++, just wait for the Singularity to happen and the machine will use Perl6 to write the metaclass for you
Hotkeys I remember him from "The Lab with Leo Laporte"
ZoffixW nerdgasms over .? 21:02
I so so so miss it in P5
21:02 jonas1 joined
psch humm, some kind of progress, at least... 21:03
nine: moving the add_multi_method calls for pick and roll out of BEGIN time makes bool_enum work
nine psch: !!!
psch nine: i'm pretty sure that's not a solution, though
but it might be some kind of hint... vOv 21:04
nine psch: yes, I seem to remember jnthn++ telling me that it needs to be done at BEGIN time
psch as in, BEGIN time doesn't have enough lexical scopes or somesuch...
'cause that's what caused the (then) SEGV
as in, the generated MAST wants 2 outer scopes, but the outer of the outer is 0x0 21:05
xfix perl6: say ords "e\x301"
camelia rakudo-moar 7c6a55: OUTPUT«(233)␤»
..rakudo-jvm 7c6a55: OUTPUT«(101 769)␤»
21:05 [Tux] left
xfix What should it return? 21:05
21:05 [Tux] joined
xfix (I feel myself that JVM's answer is correct here) 21:05
dalek kudo/curli: c0fb3bf | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Create and update a short-name quick lookup file for each module

The quick lookup file contains the ids of the distributions containing a module by with the same short-name. With this we will only need to load those distribution's meta data when loading a module. Thus our startup time will no longer depend on the number of installed modules.
21:06
pink_mist xfix: no
xfix Eh, perhaps that was a bad example.
pink_mist xfix: \x301 is a combining codepoint, so perl6 treats it as one character, and normalised that'd be what moar says 21:07
xfix perl6: say ords ".\x[301]" 21:08
camelia rakudo-moar 7c6a55: OUTPUT«(46)␤»
..rakudo-jvm 7c6a55: OUTPUT«(46 769)␤»
xfix I don't think that losing combining characters is a good thing however.
Like, ords doesn't really work on graphemes.
Or does it? (this is confusing...)
psch m: say ".\x[301]".NFC 21:09
camelia rakudo-moar 7c6a55: OUTPUT«NFC:0x<002e 0301>␤»
arnsholt I'm inclined to say that ord on a synthetic codepoint should throw an exception
xfix I understand that .\x[301] may be a one grapheme, but... ords returns codepoints, not graphemes.
Or was that "\x[301]."? Combining characters are confusing. 21:10
cygx m: $*VM.version
camelia ( no output )
cygx m: say $*VM.version
camelia rakudo-moar 7c6a55: OUTPUT«v2015.10.103.gaf.3.b.12.e␤»
pink_mist xfix: humm, might be I'm thinking about this wrong 21:11
cygx it outputs (46 769) on my local moar 2015.10-95
xfix That's what it should IMO. 21:12
21:12 rindolf left
MadcapJake What are some common META.info fields that aren't included in perl6/ecosystem/spec.pod? 21:13
cygx according to the documentation: Returns a list of codepoint numbers, one for the base character of each grapheme in the string.
ZoffixW cygx, IIRC the ords stuff was very recently worked on
(and the docs might not be updated; and your VM might be outdated) 21:14
jdv79 MadcapJake: what is that?
cygx ZoffixW: the docs match Camelia behaviour, so it's probably my local build being out of date
hankache hello everybody 21:15
cygx o/
jdv79 the "real"? spec is for META6.json in S22
ZoffixW Ehhh... how do I get around this error? "Package Color is insufficiently type-like to qualify a parameter"
MadcapJake jdv79: github.com/perl6/ecosystem/blob/master/spec.pod
ZoffixW S22
#S22
hankache what is an enum?
psch ZoffixW: make it a class :)
jdv79 that looks outdated
hankache i can see that Int is a class 21:16
but Bool is an enum
jdv79 but probably what panda uses - idk
RabidGravy MadcapJake, if you find any please PR github.com/jonathanstowe/META6 ;-)
MadcapJake well i'm not worried about the real spec more what people use which is `META.info`,
ZoffixW psch, I have: github.com/zoffixznet/perl6-Color/...lor.pm6#L2 and I'm trying to use it in another file: github.com/zoffixznet/perl6-Color/...ors.pm6#L3 21:17
21:17 muraiki left
ZoffixW (I split up the ops, 'cause they're slow) 21:17
MadcapJake RabidGravy: thanks! Will do! Just adding a highlighter to language-perl6fe for META.info files
dalek kudo/curli: ad1b8a9 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Use the quick lookup file to find dist candidates when loading a module

CompUnit::Repository::Installation::need no longer uses the MANIFEST data for looking up distributions containing the needed module. Instead we use the quick lookup file to find dist candidates and load the dist's meta data out of the files in dist/.
21:18
psch ZoffixW: huh. maybe try the use before unit line? 21:19
+the
21:19 mscha left
Hotkeys I'm trying to watch this twit.tv interview but it keeps pausing on me 21:19
ZoffixW psch++ that did the trick 21:20
Hotkeys oh I can just download it
MadcapJake will `author` work in a META.info now? Or does it have to be `authors` and a list?
jnthn nine: Yes, the short name quick lookup file is for fast processing of "use Foo::Bar:ver(v2+)" style requests
nine jnthn: very well. Then what I just pushed is actually correct :) 21:21
jdv79 and is the first element in the authors list special?
jnthn nine: Though I was going to, as well as the distribution, have it cache enough info that unless we actually need %?RESOURCES and the like then the short file is good enough to actually get you to the precomp file
hankache what is the difference between an enum and a class? 21:22
jnthn nine: That could be done as an optimization later though I guess
nine jnthn: sounds like a nice additional feature down the road, yes 21:23
ZoffixW MadcapJake, well, I see a ton of people using 'author' currently
as for "work"... I'm dubious anything properly uses it right now..
MadcapJake ZoffixW: yeah and the spec seems to indicate that you should be using `authors` with a list (a single value if it's just a single author) 21:24
nine jnthn: I'm just glad that installing a module will no longer slow down our startup :) Just have to rip out the old MANIFEST code.
jnthn m: say ".\x[301]".ords
camelia rakudo-moar 7c6a55: OUTPUT«(46 769)␤»
nine I didn't think I would make it so far today :)
RabidGravy MadcapJake, there's at least one thing that tries author first then the first from authors
jnthn m: say ords ".\x[301]"
camelia rakudo-moar 7c6a55: OUTPUT«(46)␤»
jnthn bah, fail
jdv79 MadcapJake: what sort of highlighting are you doing? its just json, right?
MadcapJake jdv79: yeah but i'm plugging in a special rule for object fields to check through a list of fields and highlight those a little shade differently.
21:25 iv left, kaare_ left
ZoffixW RabidGravy, what thing is it? 21:25
jnthn nine: Yeah, avoiding that penalty was a specific design goal :) 21:26
RabidGravy can't remember, one of panda, the thing that builds the project.json or testers.perl6.org
ZoffixW grepped the ecosystem/server and modules.perl6.org builder and they don't seem to be using /authors?/ at all. 21:27
jdv79 testers looks like its using one of the fields 21:28
RabidGravy either testers or I'm mis-remembering then ;-)
MadcapJake well i've added highlighting for all the fields in the spec and in the outdated(?) ecosystem spec 21:29
dalek kudo/nom: 1dba450 | jnthn++ | src/core/Str.pm:
Toss duplicate and wrong .ords impl.
21:30
ast: befe2ef | jnthn++ | S32-str/ords.t:
Test ords with chars that'll become synthetics.
jnthn And .ord should be understood as equivalent to .ords[0] (that is, it's an operation on codepoints, not graphemes) 21:31
So it's fine doing what it does on a synthetic
TimToady fondly remembers when people wanted to get rid of .ords :) 21:32
21:33 crucialrhyme joined
jnthn TimToady: I still happily could 21:34
TimToady: And make people write .NFC
:) 21:35
But I can live with it too
TimToady well, .NFC returns a buf, which is not quite the same as a list of integers
jnthn A Uni, in fact :) 21:36
But yes
Though .ords is currently implemetned as .NFC.list :)
TimToady could conceivably be lazy
though .ord takes away most of the reason for that
jnthn Yeah, though .NFC is done VM-level so it is fairly snappy
dalek kudo/curli: 2c455fa | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
Remove dist metadata from MANIFEST

This gets us rid of the startup penalty from installed distributions. Also concurrent installation should now be safe since we read and write the MANIFEST file (only containing the file id counter) while holding the lock.
21:37
jnthn m: say rand xx 5
camelia rakudo-moar 7c6a55: OUTPUT«(0.510198391363677 0.512206611744998 0.248995485131321 0.274981213493002 0.724207259820388)␤»
jnthn m: say 5 xx rand
camelia rakudo-moar 7c6a55: OUTPUT«()␤»
jnthn m: say 5 Rxx rand
camelia rakudo-moar 7c6a55: OUTPUT«(0.20712211903467 0.20712211903467 0.20712211903467 0.20712211903467 0.20712211903467)␤»
nine The largest bit missing is now invalidation of precomp files.
jnthn Should R respect thunkiness?
Is DIHWIDT?
TimToady I've argued that one both ways 21:38
jnthn We know meta-ops in general (like [||]) don't short-circuit
nine But that's for another day :)
TimToady "know"
jnthn Yes, I know, but that doesn't help me close an xmas RT :P
heh :)
TimToady we'd need to invent a thunk list to make [||] work
jnthn Right
PerlJam jnthn: I think it should (R respect thunkiness)
TimToady but the fact is, we could know the thunk profile of an operator just as we know prec/assoc
so at least for literal metas, we could do the thunks 21:39
jnthn We could. How much do we want to? :)
And which metas will it matter for?
TimToady it really comes down to, do we want it enough to prohibit the other use currently
jnthn Well, yes, there is the "ban it so we can put off the decision" option too :) 21:40
TimToady [||] kinda duplicates first :so
RabidGravy want's to get thunked up www.youtube.com/watch?v=BbkcWo5I_A8
21:41 tokuhiro_ joined
b^_^d is testers.p6c.org setup on a cron to regenerate itself? 21:41
21:41 ifim left
RabidGravy testers takes submissions from panda 21:42
i.e PANDA_SUBMIT_TESTREPORTS=1 panda install whatever
b^_^d oh 21:43
I forgot about that.
TimToady quietfanatic++ points out that dwimming 1.0 ... 10.0 could be a wat if you pass parameters in and do $start ... $end, though arguably those should be declared Int if you mean that
also, there are places people currently get away with / 2 that would be force to become div 2, or get every array element twice 21:44
21:45 tokuhiro_ left
b^_^d RabidGravy: so if I run something now it should show up fairly quickly under recent reports? 21:45
RabidGravy yeah it submits straight away and gives you the URL of the report 21:46
b^_^d hehe: testers.perl6.org/reports/</html>.html
doesn't seem good.
RabidGravy :-( 21:51
hankache how can you clear a variable?
TimToady otoh, arguably the "correct" way is to generalize it as far as 5.0.succ == 5.1, and basically ++ always means add 1 to the numerator, which would induce even more wats in the absence of integer coercions 21:52
PerlJam hankache: $var = Nil;
hankache: though, that's guessing at what you really mean by "clear" :)
hankache thanks PerlJam 21:53
m: my $x = 3; say $x.WHAT; $x = Nil; say $x.WHAT; 21:54
camelia rakudo-moar 1dba45: OUTPUT«(Int)␤(Any)␤»
crucialrhyme simple question: I'm trying to 'panda install Task::Star' after installing moar and panda using rakudobrew, but tests fail for JSON::RPC. is there a solution/workaround? this is OS X El Capitan
hankache PerlJam that's exactly what I was looking for. Thanks a Mil
b^_^d crucialrhyme: which version of moar latest?
TimToady jnthn: as another datapoint, we just last week or so make 42 R= my $x work as expected, if you expect item assignment 21:55
*made 21:56
RabidGravy crucialrhyme, that module is passing travis tests at least
crucialrhyme b^_^d: "This is MoarVM version 2015.10-103-gaf3b12e built with JIT support"
jnthn TimToady: Hm, I missed that somehow :) 21:57
TimToady jnthn: so I think it'd be wicked cool if metaops dwam somehow
21:58 n0tjack left
jnthn TimToady: I can kinda see it for R 21:58
TimToady: Others need a bit more thought
TimToady well, also allows Z=
was a very simple patch, merely force to %item_assignment if $*IN_META 21:59
jnthn *nod*
TimToady m: my $a, my $b Z= 43, 43; say $b
camelia rakudo-moar 1dba45: OUTPUT«43␤»
21:59 _aaroneous joined
TimToady Python-style assignment for free :) 21:59
jnthn Though in those cases you evaluate the two sides as usual and feed them to the infix the opposite way around :)
grondilu is not sure if Z= is useful considering = already does list assignement :/ 22:00
TimToady seems to recall that grondilu despises parens :P
grondilu oh yeah there is that
vendethiel Sometimes, trying to go too crazy with optimizations make your language (here scala) go... uh... a tad weird pbs.twimg.com/media/CTy4-q_U8AA6RcC.png 22:01
RabidGravy crucialrhyme, it could be a line ending thing or something else, It's install it separately and if it fails then issue the failure on github
22:03 virtualsue left, xfix left 22:04 _aaroneous left
stmuk_ m: say sum(1) 22:04
camelia rakudo-moar 1dba45: OUTPUT«1␤»
TimToady jnthn: one problematic area is functions that might or might not thunk: 3 Rxx <mumble>
stmuk_ m: say sum(1,2)
camelia rakudo-moar 1dba45: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ASKWnS5xue␤Calling sum(Int, Int) will never work with declared signature (\SELF)␤at /tmp/ASKWnS5xue:1␤------> 3say 7⏏5sum(1,2)␤»
stmuk_ what is sum() (new in niceville)? 22:05
crucialrhyme RabidGravy: thanks, it still fails installing separately. i'll go post the issue
Skarsnik m: 1,2,3,4.sum()
camelia rakudo-moar 1dba45: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤Useless use of constant integer 2 in sink context (line 1)␤Useless use of constant integer 3 in sink context (line 1)␤»
Skarsnik m: (1,2,3,4).sum()
camelia ( no output )
PerlJam stmuk_: did you mean sum (1,2) ?
m: sum (1,2)
camelia ( no output )
PerlJam m: say sum (1,2) 22:06
camelia rakudo-moar 1dba45: OUTPUT«3␤»
Skarsnik m: (1,2,3,4).sum
camelia ( no output )
Skarsnik m: say (1,2,3,4).sum
camelia rakudo-moar 1dba45: OUTPUT«10␤»
Skarsnik I am dumb
jnthn TimToady: The non-thunk cases are just an optimization, though
TimToady: Oh, but you mean, with such a trait
TimToady troo
jnthn Yes, issue.
All thunks have specialized code-gen
stmuk_ PerlJam: I'm trying to see why JSON::RPC tests now fail
there was no sum() in niceville 22:07
jnthn I guess Rxx will be rare enough that we can always thunk...
stmuk_ note not .sum
m: sum(1) 22:08
camelia ( no output )
Skarsnik m: say sum(1)
camelia rakudo-moar 1dba45: OUTPUT«1␤»
TimToady m: say sum; 22:09
camelia rakudo-moar 1dba45: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Nw8VbZBrLs␤Calling sum() will never work with declared signature (\SELF)␤at /tmp/Nw8VbZBrLs:1␤------> 3say 7⏏5sum;␤»
TimToady hmm
stmuk_ niceville has "Undeclared routine" for sum()
TimToady yes, 'cuz I just added it a day or three ago
stmuk_ ah so refs to sum() in JSON::RPC probably need changing 22:10
22:10 hankache left
TimToady I assume it's doing something other than the new sum function? 22:12
one could rely on lexical shadowing, I suppose
[+] would still delegate properly to Any::sum
stmuk_ its used as a test rpc method 22:14
timotimo oh, it relies on that method not existing at all, eh? 22:15
stmuk_ yes
22:15 jonas1 left
timotimo Inline::Python also got confused by the addition of .sum :) 22:15
PerlJam That's weird.
22:15 skids left
timotimo arnsholt: didn't you say the tests of Net::ZMQ were fixed? i still can't install it via panda :( 22:16
22:17 espadrine_ left
dalek kudo/nom: eea43c3 | TimToady++ | src/core/Any.pm:
handle degenerate cases of sum() more correctly
22:17
RabidGravy I had it workin a bit back
22:17 rurban joined
TimToady but in addition to allowing [+] to be optimized on huge ranges, it also provides a postfix summation, which is awkward to get when you only have [+] or .reduce(&[+]) 22:18
and I suspect [+] is likely the most common reduction in use
PerlJam bets TimToady is correct :) 22:19
TimToady so worth a bit of irregularity, just as the most common bits of human language are the most irregular
jnthn
.oO( I wondered if such reasoning ised applied... )
22:21
ZoffixW Does anyone see anything wrong with this call? github.com/zoffixznet/perl6-Color/...hods.t#L52 22:27
22:27 virtualsue joined, virtualsue left
timotimo ZoffixW: too many arguments 22:28
bartolin I think something went wrong with rakudo commit 019a7ff7. it was meant to revert an earlier commit, but one line of code was not reverted, because it got changed between those two commits (github.com/rakudo/rakudo/blob/nom/...s.pm#L924)
ZoffixW timotimo, ohhh..
timotimo :)
bartolin I created a PR which should give a clean state again: github.com/rakudo/rakudo/pull/589
ZoffixW OMG, I'm such an idiot. It's telling me "Cannot call is(Str, Str, Str, Str); none of these signatures match".. and I thought it was calling method "is" in my object and I couldn't figure out why lol
22:29 kjs_ left
timotimo :) 22:29
bartolin it would be nice, if someone double checks my findings ...
Skarsnik you should bgr(a) 22:30
TimToady m: say sum; 22:31
camelia rakudo-moar eea43c: OUTPUT«0␤»
TimToady m: say sum 1,2;
timotimo bartolin: huh, it's only the -1 that got changed to a 0?
camelia rakudo-moar eea43c: OUTPUT«3␤» 22:32
timotimo m: say (9, 1, 2, 3, 4).sort
camelia rakudo-moar eea43c: OUTPUT«(1 2 3 4 9)␤»
dalek osystem: 6047c97 | (Zoffix Znet)++ | META.list:
Add Color to ecosystem

Format conversion, manipulation, and math operations on colours: github.com/zoffixznet/perl6-Color
ZoffixW Yeeey \o/ finally shipped this baby :) Thanks all for the help :P
Beer time!
Skarsnik :)
22:32 ZoffixW left
bartolin timotimo: yes, but commit f0c6a02c also changed the while construct 4 lines below 22:32
timotimo: and that was not reverted 22:33
timotimo ah, because postfix while executes the ++$i before doing the body once
and that'll get our indices started at 0 rather than 1
i can see why that would be correct, i'm a little surprised it didn't bust anything; perhaps our lists start out zeroed?
bartolin timotimo: I tried to test the code in separation and it looks we got (Any) instead of 0 22:34
moar didn't seem to have a problem there, jvm did 22:35
timotimo m: use nqp; my Mu $l := nqp::list(); nqp::setelems($l, 4); say nqp::isnull(nqp::atpos($l, 0));
camelia rakudo-moar eea43c: OUTPUT«1␤»
timotimo it's an nqp-level null, so probably VMNull on moar
it's probable that it only works by accident
bartolin just a moment, I'll create a gist
dalek kudo/nom: 5da0b3f | usev6++ | src/core/Any-iterable-methods.pm:
Fix initial value for index variable

This index variable was wrongly initialized to 0 with commit 019a7ff7.
Said commit reverted commit f0c6a02c, but in this specific case some related code was changed in the meantime with commit 3bbc9222. That lead to a situation where the corresponding change to the 'while' clause 4 lines below was not reverted -- only the initialization of $i.
This lead to some fallout on rakudo.jvm: Even '1.sort' resulted in a Null Pointer Exception. On rakudo.moar there seemed to be no spectest fallout.
22:36
kudo/nom: 1ca52fc | timo++ | src/core/Any-iterable-methods.pm:
Merge pull request #589 from usev6/sort_indices

Fix initial value for index variable
timotimo too late, i already merged it ^^
bartolin timotimo: gist.github.com/usev6/132c79cefca8ce12607d 22:37
thanks :-)
22:38 Actualeyes left
timotimo that sort method could perhaps use an nqp::list_i instead. i wonder why we don't do that already? 22:39
lucs m: my $x = '123'; say q:s/Foo$xBar/; # How do I get P5's "Foo{$x}Bar" ("Foo123Bar"), but without closure interpolation? 22:40
camelia rakudo-moar eea43c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/U1gdsNO5r5␤Variable '$xBar' is not declared␤at /tmp/U1gdsNO5r5:1␤------> 3my $x = '123'; say q:s/Foo7⏏5$xBar/; # How do I get P5's "Foo{$x}Ba␤»
timotimo m: use nqp; my Mu $l := nqp::list_i(); nqp::setelems($l, 4); say nqp::atpos_i($l, 0);
camelia rakudo-moar eea43c: OUTPUT«0␤»
timotimo m: use nqp; my Mu $l := nqp::list_i(); nqp::setelems($l, 4); say nqp::atpos_i($l, 1);
camelia rakudo-moar eea43c: OUTPUT«0␤»
bartolin timotimo: I extracted the code from src/core/Any-iterable-methods.pm
timotimo that seems to be zero-initialized for us, so we can even start with $i at 1 instead of 0 :)
that'll probably give us a tremendous speed boost when sorting 1-element lists!! 22:41
lucs (meant ${x})
timotimo m: my $x = '123'; say q:s/Foo$($x)Bar/;
camelia rakudo-moar eea43c: OUTPUT«Foo123Bar␤»
lucs Oh, neat, thanks. 22:42
22:42 kjs_ joined
timotimo :) 22:42
bartolin g'night, #perl6 22:45
timotimo gnite bartolin, and thanks for your patch :)
22:53 vendethiel left
b^_^d timotimo: thanks for the blog post! 22:54
timotimo you're welcome!
22:55 doublec_ joined
timotimo this blogpost made me want to have a little tool that i can just copy-paste module names into and get working links out of >_< 22:55
22:56 sufrosti1o joined 22:57 doublec left
Skarsnik panda givemelink Acme 22:58
22:58 zengargoylew left 22:59 spider-mario left
timotimo no, what i want is something i can copy-paste a link with the proper text from into the WYSIWYG editor 23:00
terminal won't do
23:02 sno left
cygx
.oO(you can't copy from a terminal?)
23:03
timotimo i can, but it won't give me a clickable link
alternatively, it could output html. then all i'd have to do is scroll all the way to the top of the page, change the editor to html mode, scroll back down to where i was, paste it in, go back to see if it worked right ...
by go back i mean scroll all the way to the top, change to wysiwyg, scroll back down to where i was 23:04
23:04 kjs_ left
Skarsnik maybe a browser extension? 23:04
cygx seems that could be hacked together rather quickly in JS, taking data from modules.perl6.org/proto.json 23:05
timotimo dunno
i don't do excessive amounts of JS :) 23:06
RabidGravy best policy 23:07
cygx so what do you need: input a module name, get out a <a href=...></a> to the github page?
23:07 molaf joined 23:08 sufrosti1o left
timotimo i want to input a bunch of module names 23:08
23:09 sufrostico left
RabidGravy or a chrome plugin 23:10
23:10 sufrostico joined
timotimo bbiab 23:10
Skarsnik A nice script will take you the weekly new addition on ecosystem, give you the url/description x)
RabidGravy highlight a module name, look it up on modules, substitite the linkiness 23:11
23:11 sufrosti1o joined
RabidGravy software so many options 23:13
23:16 ZoffixMobile joined
ZoffixMobile timotimo, fwiw, the mojo-app branch will support modules.perl6.org/repo/Foo::Bar links that redirect to repo. I'm planning to have the PR for merge to master ready tonight, depending on how drunk I'll ve when I get home :) And if you give me what you want the output to look like (given a list of module names), I can add that to the app 23:19
RabidGravy ZoffixMobile, do you have some keyboard macro to make the unicode operators in your Color thing with on key combination or just rememember the numbers? 23:22
ZoffixMobile RabidGravy, just remember the numbers, though I could easily add them to the compose key defs. I really kinda added for the "wee.. funky unicode ops" that I wanted to use for a long time, rather a decent practical reason. 23:25
*added them
RabidGravy somehow my brain cannot retain number -> symbol relations, I can't really remember ascii after using it for thirty something years
ZoffixMobile heh
Skarsnik Zoffix, you should add YUV and BGR(A) for your Color module :) 23:26
ZoffixMobile Skarsnik, thanks. I will :)
Skarsnik like targa image file (.tga) is bgr if I remember correctly. 23:27
RabidGravy it would be cool if there was a good way of shipping key definitions like that with the module :) 23:28
do-able for Linux I guess but who knows if it's even possibly with windows 23:30
Skarsnik I work with a subtitle file format that is coded like that for color: {c:$color} where color is (A)BGR, aka *** this 23:32
it so confusing xD
23:33 sno joined 23:37 ZoffixMobile left 23:40 crucialrhyme left 23:41 n0tjack joined 23:42 tokuhiro_ joined 23:47 tokuhiro_ left
Hotkeys Skarsnik: is it done like that because it's alphabetical lol 23:48
Skarsnik ahah I never thought about that
Hotkeys still a silly reason when rgb is standard
23:49 doublec_ is now known as doublec
cygx Zoffix: btw, your twitter image with the formula vs p6 has an error in it 23:49
on the left, we have L = /C_max + C_min)/2, on the right, (C_max - C_min)/2
* L = (C_max + C_min)/2 23:50
Zoffix cygx, yeah. It took me about 5 minutes of debugging to spot that
cygx glad I could help you out there after the fact :p
Zoffix :P
cygx, and I actually simplified that code by tossing both Δs: github.com/zoffixznet/perl6-Color/...r.pm6#L234 23:51
(and github.com/zoffixznet/perl6-Color/....pm6#L153) 23:52
Not sure why the formula in the picture brackets the two options, when Δ == 0 would still result in a zero, since its in the numerator
(we're talking about this, if anyone's curious: twitter.com/zoffix/status/666369101766397952 ) 23:53
s/tossing both Δs/tossing both ternaries/;
cygx Zoffix: perhaps to deal with 0/0 if L is 1 or 0? 23:54
(can that happen?)
23:55 skids joined
Zoffix cygx, oh, thanks for spotting a bug in my module! 23:55
Yeah, it will be 0/0 for black RGB
cygx++ 23:56
cygx glad to be of service, this time before you invested time in debugging ;)
Zoffix \o/
Skarsnik I really love the delta symbol in the code ^^ 23:57
Zoffix Me too :)
23:58 rurban left
ugexe landed another year long perl6 contract \o/ 23:59
Zoffix ugexe++
awesome
cygx Zoffix: if I read the fomula correctly, it not only fails for black, but also for white
Skarsnik if you want to please my lazyness you need a parse-hex() where I can write parse-hex('AABBCCDD', 'abgr')
timotimo whoa
neato