Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-11-17

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 telex joined #perl6
00:08 ifim joined #perl6
00:16 sprocket joined #perl6
00:16 Juerd Meh, pack/unpack a* does not round-trip for non-ascii strings :(
00:17 BenGoldberg joined #perl6
00:17 Juerd Is pack a* doing Str instead of Buf a design flaw?
00:23 timotimo zengargoyle: er, dunno?
00:23 timotimo arnsholt: oh, i didn't see the half second timeout
00:26 BenGoldberg joined #perl6
00:26 g4 joined #perl6
00:28 Juerd https://github.com/Juerd/p​6-mqtt/blob/master/mqtt.p6  # Yay, I can send "hello world" to an MQTT server!
00:28 Juerd Can't send anything non-ascii yet, though :|
00:29 Juerd I don't really understand Perl 6 pack/unpack, even though I've been using them for the past few hours.
00:29 Juerd Or maybe I don't understand Bufs. I don't know where I'm failing exactly.
00:30 uxfi joined #perl6
00:31 Psyche^ joined #perl6
00:31 uxfi left #perl6
00:33 ifim` joined #perl6
00:34 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>␤»
00:35 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␤␤»
00:35 BenGoldberg m: say pack( "A4 C n*", "perl6", 42, 0 );
00:35 camelia rakudo-moar 317746: OUTPUT«Buf:0x<70 65 72 6c 2a 00 00>␤»
00:35 BenGoldberg m: say pack( "A4 C n*", "perl6", 0x42, 0 );
00:35 camelia rakudo-moar 317746: OUTPUT«Buf:0x<70 65 72 6c 42 00 00>␤»
00:35 BenGoldberg m: say pack( "A4 C n*", "perl6", 0x42, 0xab, 0xcd );
00:35 camelia rakudo-moar 317746: OUTPUT«Buf:0x<70 65 72 6c 42 00 ab>␤»
00:36 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>␤»
00:36 Juerd pack ignores numbers on most types
00:37 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>␤»
00:37 Juerd To be precise, the 'amount' suffix is only used on A, a, and x.
00:37 Juerd So n* is just n.
00:37 BenGoldberg What *I* don't understand is why it's ignoring the * suffix on the n
00:37 Juerd Because there's no code to do anything with it :)
00:38 BenGoldberg Hmm...
00:38 BenGoldberg It ought to throw a NYI, then! :P
00:38 Juerd Oh, I'm mistaken about the Aax list.
00:39 Juerd No, I wasn't. It's just A, a, and x...
00:39 pink_mist ... or is it? :P
00:39 Juerd I didn't really mind that I couldn't do C4, for example, but I really needed length prefixes like n/a*
00:40 Juerd But now I'm stuck with the whole ascii/binary/str/buf-thing that either I don't understand, or is implemented wrong.
00:41 Juerd 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 #perl6
00:41 * BenGoldberg is tempted to suggest cheating, and using Inline::Perl5
00:42 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 Juerd Because I was wrapping pack anyway, I used the opportunity to introduce 'm', for MQTT length encoding.
00:43 Juerd https://github.com/Juerd/p6​-mqtt/blob/master/MyPack.pm lines 41..53
00:47 pink_mist you mean https://github.com/Juerd/p6-mqt​t/blob/master/MyPack.pm#L41-L53
00:48 pink_mist line 61 saddens me :(
00:48 Juerd Me too.
00:49 Juerd Couldn't find a way to let pack just include another Buf.
00:55 timotimo what is that supposed to do?
00:55 timotimo because isn't unpack("a*") the same as .decode("ascii")?
00:56 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
00:56 camelia rakudo-moar 317746: OUTPUT«Buf.new(104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100)␤"hello world"␤"hello world"␤»
00:56 timotimo ah, so something you'd use ~ for?
00:56 Juerd Yes, but in a pack tempalte, because I'm recursively calling mypack
00:56 Juerd s/tempalte/template/
00:57 Juerd I'm handing as much as I can off to the original pack
00:57 timotimo right
00:57 timotimo damn.
00:57 timotimo that's a use case that i totally didn't expect, but it makes a whole lot of sense
00:57 Juerd You'd need it if you wanted to make pack() itself recursive like this too :)
00:58 Juerd (Not saying that recursion is a good solution, but it's a solution.)
01:05 Juerd Also, pack is currently a sub, but it would be more symmetrical if it were a list method.
01:06 Juerd (...).pack.unpack.pack.unpack is nicer than pack(pack(...).unpack).unpack
01:06 Juerd Python's split/join has the same asymmetry
01:14 BenGoldberg Maybe the best solution for packing/unpacking won't be a simple string template, but a class object.
01:16 BenGoldberg class MyTemplate is repr('CStruct') { ... stuff here ... }; my MyTemplate $deserialized = MyTemplate.unpack( $buf ); # something like this.
01:17 uruwi joined #perl6
01:17 uruwi ping
01:17 timotimo could someone check if "return Failure.new(X::AdHoc.new('foo'))" is semantically the same as "fail 'foo'"?
01:17 Juerd That would make a lot of simple scripts much more complicated. On the other hand, it would also make them much more readable.
01:19 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…»
01:19 timotimo because the first one can be done a hundred thousand times in 4 seconds, the latter takes 66 seconds for the same task
01:19 timotimo oh
01:19 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/rz8BvYUOcw␤Undeclared routine:␤    eqv used at line 1␤␤»
01:19 uruwi m: sub a { fail 'foo'; }; sub b { return Failure.new(X::AdHoc.new('foo')); }; say a == b;
01:19 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;␤»
01:19 timotimo actually, i meant to say 'fail X::AdHoc.new("foo")'
01:19 timotimo changing fail to return Failure.new(...) seems to make no difference
01:20 BenGoldberg m: my $x = (-> { fail 'foo' })(); say $x;
01:20 camelia rakudo-moar 317746: ( no output )
01:20 BenGoldberg m: my $x = (-> { fail 'foo' })(); say so $x;
01:20 camelia rakudo-moar 317746: ( no output )
01:20 timotimo a pointy block is transparent to "return"
01:21 BenGoldberg m: sub bar { fail 'foo' }; my $x = bar; say so $x;
01:21 camelia rakudo-moar 317746: OUTPUT«False␤»
01:21 BenGoldberg m: sub bar { fail 'foo' }; my $x = bar; say $x;
01:21 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 #perl6
01:21 timotimo oh, huh
01:21 timotimo return Failure.new("oh no!") is actually slower than "fail 'oh no!'" apparently ?!?
01:21 BenGoldberg m: sub bar { return Failure.new( 'foo' ) }; my $x = bar; say $x;
01:21 camelia rakudo-moar 317746: OUTPUT«foo␤  in block <unit> at /tmp/dDggPiRBce:1␤␤Actually thrown at:␤  in block <unit> at /tmp/dDggPiRBce:1␤␤»
01:24 BenGoldberg Fail also produces 'in sub bar' .. 'in block <unit>' ...
01:29 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 timotimo if we could give a named parameter or something that'd let us do this, that'd be pretty fantastic
01:30 timotimo 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␤␤»
01:30 timotimo oh, perhaps that's why it's much faster %)
01:31 timotimo yeah, that's it
01:31 timotimo i was testing the performance of a regular exception vs a failure
01:34 Ben_Goldberg joined #perl6
01:46 dalek Net-ZMQ: ce00850 | arnsholt++ | lib/Net/ZMQ/Socket.pm:
01:46 dalek Net-ZMQ: Pass flags in all Net::ZMQ::Socket.send multis.
01:46 dalek Net-ZMQ:
01:46 dalek Net-ZMQ: This fixes the broken test in t/00-basic.t.
01:46 dalek Net-ZMQ: review: https://github.com/arnsholt​/Net-ZMQ/commit/ce00850d50
01:47 n0xff joined #perl6
01:50 adu joined #perl6
01:53 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>␤»
01:53 Ben_Goldberg m: sub foo { ( $ //= Failure.new('foo') ); do try { say foo() } for 1..10;
01:53 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>␤»
01:54 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>␤»
01:54 Ben_Goldberg m: sub foo { ( $ //= Failure.new('foo') ) }; for 1..10 { try { say foo() } };
01:54 camelia rakudo-moar 317746: ( no output )
01:54 Ben_Goldberg m: sub foo { ( $ //= Failure.new('foo') ) }; my $start = time; for 1..100 { try { say foo() } }; say time - $start;
01:54 camelia rakudo-moar 317746: OUTPUT«0␤»
01:55 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 #perl6
02:01 Actualeyes joined #perl6
02:05 Zoffix joined #perl6
02:07 skids joined #perl6
02:08 tokuhiro_ joined #perl6
02:08 Ben_Goldberg joined #perl6
02:10 BenGoldberg_ joined #perl6
02:12 sufrostico Hello there!
02:12 sufrostico I need some help, with some code
02:12 sufrostico the problem is this
02:13 sufrostico 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]]␤»
02:13 sufrostico why the double [[ ????
02:13 sufrostico how can I avoid that ?
02:14 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;
02:14 camelia rakudo-moar 317746: OUTPUT«[1 1]␤»
02:14 gfldex you basicly ask rakudo to store an array inside an array
02:14 hartenfels m: my @uno= [0,0]; my @dos=[[1,1],[2,2]]; @uno = @(@dos[0]); @uno.say;
02:14 camelia rakudo-moar 317746: OUTPUT«[1 1]␤»
02:14 hartenfels Yup.
02:14 flussence m: my @dos = [[1,1],[2,2]]; dd @dos[0]
02:14 camelia rakudo-moar 317746: OUTPUT«Array $var = $[1, 1]␤»
02:16 sufrostico jaja, thanks
02:17 xpen joined #perl6
02:18 FROGGS joined #perl6
02:18 sufrostico it seems so logical now that i think of that.
02:20 hartenfels I guess that's where the Perl 5 sigil variance made things clearer.
02:20 Sgeo joined #perl6
02:20 pink_mist that is one thing I'll miss from perl5 to be honest
02:21 sufrostico yes, perl 5 seems to have a stronger meaning
02:23 FROGGS_ joined #perl6
02:25 hartenfels I kinda miss list flattening, but I think that'll go away once the Perl 6 behavior feels natural.
02:26 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]␤»
02:27 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]␤»
02:27 gfldex in perl 6 you have to be explicit about destroying structure, in perl 6 you have to explicit about maintaining structure
02:28 pink_mist I assume the second perl 6 should have been a perl 5?
02:29 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
02:30 gfldex that may be because you didn't discover the proper perl 6 idioms yet
02:31 kaare_ joined #perl6
02:34 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 #perl6
02:37 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.
02:39 dj_goku_ ingy: you around?
02:40 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 #perl6
02:42 hartenfels Destructuring like that is definitely nice, makes iterating pairs painless.
02:45 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:45 MadcapJake joined #perl6
02:45 hartenfels I've used .flat and | to merge lists, since they don't do it on their own anymore.
02:45 MadcapJake Is the META.info file just a json file? Are `.info` files always json files?
02:45 hartenfels META.info is in JSON format at least.
02:45 hartenfels But .info doesn't necessarily say that it's gonna be a JSON file.
02:45 MadcapJake hmm, so there's no standard on using `.info` extension?
02:45 hartenfels I don't think so.
02:45 hartenfels At least I've seen plaintext in .info before in several places.
02:52 softmoth_ joined #perl6
02:52 sufrostico gfldex: probably right... my first perl6 program
02:52 sufrostico XD
02:53 sufrostico 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:54 japhb m: .001.rand.say
02:54 camelia rakudo-moar 317746: OUTPUT«0.000193847785014503␤»
02:54 japhb sufrostico: ^^  # It's all about setting your max value
02:55 japhb I wonder
02:55 japhb m: 5..6.rand.say
02:55 camelia rakudo-moar 317746: OUTPUT«WARNINGS:␤Useless use of ".." in expression "5..6.rand.say" in sink context (line 1)␤0.197314743109555␤»
02:55 japhb m: (5..6).rand.say
02:55 camelia rakudo-moar 317746: OUTPUT«1.92246654770251␤»
02:55 japhb Oh, heh
02:56 sufrostico japhb: thanks..
02:56 sufrostico I'll think about this...
02:57 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);
02:57 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)␤»
02:58 sufrostico instead I'll check my program
02:58 sufrostico good night
02:58 sufrostico bye
02:58 psch m: my $x; while True { $x = rand; last if $x < .001; }; say $x
02:58 camelia rakudo-moar 317746: OUTPUT«4.76954349019136e-05␤»
03:04 flussence m: say 1.rand ** 2
03:04 camelia rakudo-moar 317746: OUTPUT«0.232914057011131␤»
03:05 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␤␤»
03:05 flussence m: say sprintf('%.2f', (1.rand ** 2)) xx 10
03:05 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)␤»
03:05 flussence m: say sprintf('%.2f', (1.rand ** 5)) xx 10
03:05 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)␤»
03:05 flussence m: say sprintf('%.2f', (1.rand ** 500)) xx 10
03:05 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)␤»
03:05 flussence m: say sprintf('%.2f', (1.rand ** 50)) xx 10
03:05 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)␤»
03:05 flussence m: say sprintf('%.2f', (1.rand ** 20)) xx 10
03:05 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)␤»
03:05 japhb m: my $x = do { $x = rand until $x < ..01 }; say $x;
03:05 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⏏01 }; say $x;␤»
03:05 japhb m: my $x = do { $x = rand until $x < .001 }; say $x;
03:05 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␤␤»
03:06 japhb m: my $x = 1; $x = rand until $x < .001; say $x;
03:06 camelia rakudo-moar 317746: OUTPUT«0.000435780381308144␤»
03:06 dj_goku_ I am trying to debug a module with perl6-debug-m but I am getting 'Unhandled exception: ctxlexpad needs an MVMContext': https://gist.github.com/dj​goku/4b4d45062ba39043b6dc
03:08 japhb `panda install Text-Tabs-Wrap` gets: *fetch stage failed for Text-Tabs-Wrap: Unable to handle source 'https://github.com/flussence/Text-Tabs-Wrap/')
03:08 japhb I know that worked a week or two ago, so I'm wondering how it broke.
03:09 japhb 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:10 japhb Oh hmmm, https://github.com/flussence/Text​-Tabs-Wrap/blob/master/META6.json looks sane ...
03:11 ugexe there is no source-url field
03:12 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?
03:13 japhb ugexe: Huh: https://raw.githubusercontent.com/flus​sence/Text-Tabs-Wrap/master/META6.json
03:14 ugexe source-url
03:14 japhb dj_goku_: May be a bug there.  Did you already try it and experience anguish?
03:14 ugexe i think you have to invoke with PERL6LIB or do `use lib <whatever>` to get around that for REPL
03:15 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.
03:16 * 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
03:16 dj_goku_ japhb: http://fpaste.scsys.co.uk/501576
03:17 softmoth_ joined #perl6
03:17 rurban1 joined #perl6
03:18 dj_goku_ I am actually trying to fix one bug but found another. :(
03:18 japhb ugexe: Seems reasonable.
03:19 ugexe er, support<source> (not source<url>)
03:19 perlawhirl joined #perl6
03:19 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:20 telex joined #perl6
03:21 dj_goku_ oh sweet!
03:21 ugexe all test reports are being shown as a Pass on tests.perl6.org :(
03:23 Fleurety joined #perl6
03:25 hpd joined #perl6
03:27 grondilu joined #perl6
03:28 noganex_ joined #perl6
03:32 [Tux] joined #perl6
03:35 ggherdov joined #perl6
03:35 Sqirrel joined #perl6
04:00 dj_goku_ any idea what Str.?split() what the '?' means?
04:03 softmoth_ joined #perl6
04:04 Zoffix dj_goku_, http://doc.perl6.org/language/operators#postfix_.%3F
04:04 nightfrog joined #perl6
04:05 pierrot joined #perl6
04:06 dj_goku_ Zoffix: thanks.
04:09 adu joined #perl6
04:09 sprocket joined #perl6
04:20 |Tux| joined #perl6
04:20 * dj_goku_ wonders if split has changed recently.
04:22 BenGoldberg joined #perl6
04:26 juiko joined #perl6
04:28 dalek doc: 5f425ab | (Zoffix Znet)++ | doc/Language/faq.pod:
04:28 dalek doc: Use a more honest benchmark in FAQ to aleviate community friction
04:28 dalek doc:
04:28 dalek doc: 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 dalek doc: review: https://github.com/perl6/doc/commit/5f425ab8ed
04:29 dalek doc: 981a88c | (Zoffix Znet)++ | doc/Language/faq.pod:
04:29 dalek doc: Newlines? Tabs? UFOs? Toss 'em
04:29 dalek doc: review: https://github.com/perl6/doc/commit/981a88cee4
04:43 TEttinger joined #perl6
04:44 pjscott joined #perl6
04:45 ponbiki joined #perl6
04:47 pjscott joined #perl6
04:54 corbyhaas_ joined #perl6
04:54 mrsolo_ joined #perl6
04:55 hartenfe1s joined #perl6
04:56 novapatc1 joined #perl6
04:56 boegel|quassel joined #perl6
04:56 jdv79_ joined #perl6
04:56 El_Che_ joined #perl6
04:56 n0xff_ joined #perl6
04:56 freeze_ joined #perl6
04:56 shamu_ joined #perl6
04:56 Woodi_ joined #perl6
04:56 zostay_ joined #perl6
04:57 mr-foobar joined #perl6
04:57 bakedb_ joined #perl6
04:57 pjscott joined #perl6
04:59 frew1 joined #perl6
04:59 samb11 joined #perl6
04:59 dgl joined #perl6
04:59 jsimonet1 joined #perl6
05:00 go|dfish1 joined #perl6
05:00 stux|RC-only joined #perl6
05:01 woodruffw joined #perl6
05:01 khw joined #perl6
05:01 adu joined #perl6
05:01 risou joined #perl6
05:01 mr-fooba_ joined #perl6
05:01 BinGOs joined #perl6
05:02 obra joined #perl6
05:02 bitmap joined #perl6
05:03 quester joined #perl6
05:04 Spot__ joined #perl6
05:04 flaviusb joined #perl6
05:09 vendethiel joined #perl6
05:12 sprocket joined #perl6
05:17 dj_goku_ yay for perl6 MR!
05:17 adu what's MR?
05:17 dj_goku_ https://github.com/FROGGS/p6-IDNA-Punycode/pull/2
05:17 dj_goku_ well a module MR. not perl6 specifically other than the language.
05:18 Spot___ joined #perl6
05:18 Mouq joined #perl6
05:18 adu oh you mean PR
05:18 dj_goku_ blah
05:19 dj_goku_ adu: haha yeah, gitlab calls it MR (merge request), github calls them (pull request)
05:19 adu I've never heard of gitlab
05:20 dj_goku_ adu: RoR free alternative
05:20 dj_goku_ we use it at work.
05:20 novapatch joined #perl6
05:20 llfourn_ joined #perl6
05:21 adu Ruby on Rails?
05:21 dj_goku_ yeah
05:21 TEttinger dj_goku_: I'm curious what it does to replace a server
05:21 TEttinger I looked at it and didn't see an equivalent to gh-pages
05:22 adu I didn't know github was rails
05:22 TEttinger github has free static webpage hosting
05:22 TEttinger they claim there's a limit to size
05:22 TEttinger I have not hit it
05:22 adu gh-pages is awesome
05:22 Peter__R joined #perl6
05:23 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 http://tommyettinger.githu​b.io/home/PixVoxel/sau10/
05:23 Hotkeys_ joined #perl6
05:23 skaji_ joined #perl6
05:23 dj_goku_ TEttinger: we use it to host our git internally. We then submit MR (PR) for review.
05:24 TEttinger I'm just not sure how it replaces RoR
05:24 adu TEttinger: looks like a game
05:24 dj_goku_ TEttinger: pretty much the same exact flow as github, really.
05:24 TEttinger thanks adu
05:25 Bucciarati joined #perl6
05:26 doublec joined #perl6
05:27 chewie_1982 joined #perl6
05:27 sftp joined #perl6
05:30 silug joined #perl6
05:33 perlawhirl joined #perl6
05:41 quester I still can't find Rakudo Star 2015.10, which make me sad.  Does anyone recall seeing any announcement about it?
05:42 telex joined #perl6
05:50 xfix joined #perl6
06:02 FROGGS_ joined #perl6
06:03 Averna joined #perl6
06:07 TimToady joined #perl6
06:16 moritz there is no rakudo star 2015.10
06:24 xpen joined #perl6
06:41 darutoko joined #perl6
06:43 domidumont joined #perl6
06:56 geraud joined #perl6
06:59 domidumont joined #perl6
07:02 domidumont joined #perl6
07:05 [Tux] test             50000    21.407    21.291
07:05 [Tux] test-t           50000    18.290    18.174
07:06 nebuchadnezzar joined #perl6
07:22 rindolf joined #perl6
07:27 FROGGS joined #perl6
07:32 CIAvash joined #perl6
07:35 dalek Inline-Python: 531d2b6 | (Stefan Seifert)++ | lib/Inline/Python.pm6:
07:35 dalek Inline-Python: Pass through calls to Python methods previously shadowed by Any
07:35 dalek Inline-Python:
07:35 dalek Inline-Python: PythonObject inherits many method from Any. A fallback doesn't cut it for those
07:35 dalek Inline-Python: so we explicitly forward calls to any of Any's methods.
07:35 dalek Inline-Python:
07:35 dalek Inline-Python: Thanks to timotimo++ for the report!
07:35 dalek Inline-Python: review: https://github.com/niner/Inl​ine-Python/commit/531d2b6eca
07:36 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 #perl6
07:46 RabidGravy joined #perl6
07:47 xfix_ joined #perl6
07:59 dalek ecosystem: 8295c7d | sylvarant++ | META.list:
07:59 dalek ecosystem: Added Compress::Brotli
07:59 dalek ecosystem:
07:59 dalek ecosystem: see https://github.com/sylvarant/Compress-Brotli
07:59 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/8295c7d044
07:59 dalek ecosystem: 1078df9 | FROGGS++ | META.list:
07:59 dalek ecosystem: Merge pull request #95 from sylvarant/master
07:59 dalek ecosystem:
07:59 dalek ecosystem: Added Compress::Brotli
07:59 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/1078df94d6
08:10 bpmedley joined #perl6
08:19 JimmyZ joined #perl6
08:27 quester left #perl6
08:30 yeahnoob joined #perl6
08:32 dalek rakudo/curli: e1c25e7 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
08:32 dalek rakudo/curli: Support inexact matching for loading precompiled module in CURI
08:32 dalek rakudo/curli:
08:32 dalek rakudo/curli: Previously we could load a precompiled module only when the
08:32 dalek rakudo/curli: DependencySpecification matched the module's meta data exactly.
08:32 dalek rakudo/curli: Now we can load the precompiled version of any matching module.
08:32 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/e1c25e7a7a
08:34 zakharyas joined #perl6
08:34 znpy joined #perl6
08:43 mathw joined #perl6
08:45 dalek rakudo/curli: f887e6f | (Stefan Seifert)++ | src/core/CompUnit (2 files):
08:45 dalek rakudo/curli: Simplify CompUnit::Repository::Installation::need code
08:45 dalek rakudo/curli:
08:45 dalek rakudo/curli: Since we only use numbers as file names for module files and store them all in
08:45 dalek rakudo/curli: a single directory, we don't have to be all that careful when constructing the
08:45 dalek rakudo/curli: path to load. Just prepend our $.prefix.
08:45 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/f887e6f529
08:46 rdmtob joined #perl6
08:47 dalek rakudo/curli: 0a3171e | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
08:47 dalek rakudo/curli: Remove some now unused code.
08:47 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/0a3171e699
08:52 colomon joined #perl6
08:58 kjs_ joined #perl6
09:06 RabidGravy what's the easiest way of saying any non-whitespace except a comma?
09:06 RabidGravy in a regex
09:12 mrf <-[\S + ',']> ?
09:12 mrf <-[\s + ',']> ? rather
09:12 mrf RabidGravy: ^
09:13 arnsholt m: my $r = /<-[\s,]>/; say "a" ~~ $r; say "," ~~ $r; say " " ~~ $r; # RabidGravy
09:13 camelia rakudo-moar 317746: OUTPUT«「a」␤Nil␤Nil␤»
09:15 mrf ahh. I was close.
09:17 RabidGravy Hmm, yeah this sort of works
09:19 Humbedooh joined #perl6
09:20 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 jnthn DrForr: Why're you wanting to avoid "need to escape", ooc?
09:20 jnthn DrForr: It looks ugly?
09:21 RabidGravy okay I actually needed <-[\s,\:\*]> in that place but Hmm
09:21 DrForr "need to explain too much".
09:21 jnthn DrForr: OK. Not sure if putting them in quotes helps
09:21 jnthn e.g. '-' and ':'
09:21 DrForr yeah, that's how I'm writing it now.
09:22 dakkar joined #perl6
09:23 cognominal joined #perl6
09:24 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,\:\*\}]>+"
09:24 RabidGravy <.ident> didn't cut it
09:25 jnthn ident also has the "must have leading alpha or _" constraint
09:27 RabidGravy yeah, it was simply a working analogue for variable names in the uri template
09:28 abraxxa joined #perl6
09:28 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 jnthn Uh, it's a lot less edge case than non-Perl 6 regexes
09:30 jnthn At least there's a really, really clear rule
09:31 jnthn If it's alphanumeric, no escaping/quoting needed. Otherwise, it is.
09:31 DrForr Yeah, agreed, there's lots less edge casing than p5.
09:31 jnthn That you don't have a list of things to remember, just "alphanumeric or not", seems like something nice to point out :)
09:31 DrForr I'll just drop the \d**4 construct for a few slides and introduce that change.
09:32 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:51 brrt joined #perl6
09:59 * RabidGravy is trying to decide whether the test data here is broken or URI::Encode
10:00 RabidGravy would you think that "drücken" should encode to "dr%FCcken" or "dr%C3%BCcken"
10:01 moritz URL encoding should use UTF-8
10:01 moritz so the latter
10:02 RabidGravy URI::Encode then
10:02 RabidGravy book
10:02 RabidGravy booh
10:05 BooK RabidGravy
10:05 BooK sorry, I meant, er...
10:05 RabidGravy :-*
10:05 RabidGravy BooK! You cool?
10:06 BooK sure :-*
10:10 virtualsue joined #perl6
10:12 dalek rakudo/nom: 70b3a90 | jnthn++ | src/Perl6/Metamodel/SubsetHOW.nqp:
10:12 dalek rakudo/nom: Subset types should get stashes.
10:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/70b3a9091b
10:12 rurban joined #perl6
10:14 RabidGravy right, that's where it's going wrong:
10:15 RabidGravy m: say "ü".encode # is right
10:15 camelia rakudo-moar 317746: OUTPUT«utf8:0x<c3 bc>␤»
10:15 Actualeyes joined #perl6
10:15 domidumont joined #perl6
10:16 RabidGravy m: say "ü".ord.fmt('%%%02X')
10:16 camelia rakudo-moar 317746: OUTPUT«%FC␤»
10:16 RabidGravy is wrong
10:16 espadrine_ joined #perl6
10:17 domidumont joined #perl6
10:18 Upasaka joined #perl6
10:18 RabidGravy m: say "ü".encode.list.map({ .fmt('%%%02X')})
10:18 camelia rakudo-moar 317746: OUTPUT«(%C3 %BC)␤»
10:18 RabidGravy m: say "ü".encode.list.map({ .fmt('%%%02X')}).join('')
10:18 camelia rakudo-moar 317746: OUTPUT«%C3%BC␤»
10:20 RabidGravy Tsk, don't people actually use this software?
10:24 andreoss joined #perl6
10:34 Upasaka joined #perl6
10:35 RabidGravy presumably it does the wrong thing decoding as well
10:36 ShimmerFairy "ü".ord does exactly what it's supposed to do, I don't see the problem :)
10:37 rindolf joined #perl6
10:39 RabidGravy it does indeed, unfortunately the problem is it should be being used for URI encoding UTF-8 properly
10:39 RabidGravy shouldn't
10:39 ShimmerFairy of course not
10:40 jnthn Be *very* careful with .ord
10:41 jnthn (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
10:42 jnthn It only breaks on non-ASCII?
10:42 jnthn "only"...
10:42 RabidGravy so it seems
10:43 BooK add more tests!
10:43 jnthn m: say Pod::Block
10:43 camelia rakudo-moar 70b3a9: OUTPUT«(Pod::Block)␤»
10:49 RabidGravy MORE TESTS! MORE TESTS!
10:53 doublec joined #perl6
10:55 Skarsnik joined #perl6
11:01 Zoffix joined #perl6
11:04 RabidGravy [\x00..\xff] isn't "all code points" is it
11:05 RabidGravy the guy so copied this code from a Perl 5 module
11:05 softmoth_ joined #perl6
11:07 jnthn m: say "It's {100 * 0xFF / 0x10FFFF}% of codepoints"
11:07 camelia rakudo-moar 70b3a9: OUTPUT«It's 0.02288820% of codepoints␤»
11:08 RabidGravy so 0x10FFFF is the definitive top end of the range?
11:09 jnthn Well, it's all that Unicode defines
11:09 metasin perhaps an odd question, but which novel has the most quotation marks?
11:11 RabidGravy metasin, that's sort of unknowable
11:12 RabidGravy I'd go with some Dickens or something as them Victorians were big on the reported speach
11:12 RabidGravy speech
11:19 RabidGravy right, that's fixed now for the decoding which is a bit more tricky on the face of it
11:20 RabidGravy (in the sense of having to get contiguous %FF things together into one buffer
11:22 RabidGravy 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 RabidGravy this is almost certainly true, but this one needs fixing
11:24 RabidGravy 'Grüner Weg'
11:24 RabidGravy :-O
11:25 jnthn whacky mojibake...
11:26 dalek rakudo/nom: 1f678a0 | jnthn++ | src/Perl6/World.nqp:
11:26 dalek rakudo/nom: A clone to avoid destroying name arrays.
11:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1f678a09ca
11:26 dalek rakudo/nom: 6b44673 | jnthn++ | src/core/Complex.pm:
11:26 dalek rakudo/nom: Fix class stubbing scope inconsistency.
11:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6b44673cb2
11:26 jnthn Darn, fixing RT #118361 has turned into quite the task...
11:26 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=118361
11:32 * jdv79 now wonders if my use of ords is ok or not
11:39 znpy joined #perl6
11:39 jdv79 yeah, looks fine
11:42 jnthn ords should be fine
11:42 jnthn Since it's defined in terms of NFC
11:58 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␤»
11:58 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];
11:58 camelia rakudo-moar 6b4467: OUTPUT«Blob:0x<67 85 72 3a 7f 8c ab 19>␤»
11:59 arnsholt Why does the latter version set the first element of @H to be a Blob?
12:03 kid51 joined #perl6
12:06 azawawi joined #perl6
12:06 azawawi hi #perl6
12:06 dalek nqp: 05b7f78 | jnthn++ | src/how/NQP (6 files):
12:06 dalek nqp: Implement .^shortname in NQP MOP.
12:06 dalek nqp: review: https://github.com/perl6/nqp/commit/05b7f7841a
12:07 jdv79 arnsholt: because you asked it to?
12:08 jdv79 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? =)
12:09 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?
12:09 jnthn arnsholt: .list
12:09 jnthn m: say Buf ~~ Iterable
12:09 camelia rakudo-moar 6b4467: OUTPUT«False␤»
12:09 jdv79 azawawi: when was that discussed?
12:09 jdv79 afaik, no.
12:10 arnsholt jnthn: Doesn't look like .list does the trick
12:10 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].list; say @H[0];
12:10 camelia rakudo-moar 6b4467: OUTPUT«Blob:0x<67 85 72 3a 7f 8c ab 19>␤»
12:11 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
12:11 azawawi jdv79: http://irclog.perlgeek.de/p​erl6/2015-10-19#i_11398054
12:12 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 #perl6
12:12 arnsholt Oh, list on the Blob itself, right
12:13 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
12:13 camelia rakudo-moar 6b4467: OUTPUT«Grüner Weg␤»
12:13 moritz azawawi: pong
12:14 azawawi moritz: do you have any comment on https://github.com/perl6/DBIish/issues/29 ?
12:15 moritz azawawi: sorry, no time to review right now
12:15 moritz azawawi: but if it doesn't hurt the other drivers, I'm likely fine with merging it
12:15 azawawi moritz: No problem. I know you're busy :)
12:16 azawawi 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 azawawi s/add/adding
12:17 azawawi the next thing once this is complete is http://www.postgresql.org/do​cs/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...
12:19 RabidGravy probably awful TBH but I think "correct but simple" is my goal here ;-)
12:21 jdv79 i think i wouldn't have thought it through like that cause of my p5 thinking of method calls are expensive intuition
12:22 jdv79 gotta sep 5 and 6 better in my head
12:23 jdv79 and "core" is faster.  which around here is way less true.
12:24 azawawi Windows has way better support. `rakudobrew build moar && rakudobrew build-zef` now works. tadzik++
12:25 azawawi the thing we need to make rakudobrew detect visual studio somehow
12:25 azawawi moritz: Windows::StuffFinder should be my next project :)
12:25 tadzik :)
12:25 RabidGravy and ye tests pass
12:25 RabidGravy all good
12:26 azawawi tadzik: it works sometimes... sometimes it needs another run though
12:26 azawawi tadzik: i will send your PR regarding windows soon
12:26 azawawi tadzik: s/PR/a PR/
12:27 tadzik oh, awesome :)
12:27 azawawi tadzik: the sad thing though is https://github.com/tadzik/panda/issues/245
12:27 jdv79 azawawi: was there a discusssion or just your one line there?
12:27 azawawi jdv79: read after it :)
12:29 tadzik azawawi: aaaaaaaaaaa!!
12:29 tadzik that looks crazy :)
12:30 dalek rakudo/nom: f042d6b | jnthn++ | src/Perl6/Metamodel/ (11 files):
12:30 dalek rakudo/nom: Don't pass in longname separately to MOP.
12:30 dalek rakudo/nom:
12:30 dalek rakudo/nom: Instead, we'll always accept the fully qualified name (and adjust
12:30 dalek rakudo/nom: things so we provide that in all cases), and then expose a shortname
12:30 dalek rakudo/nom: meta-method that gets the unqualified name.
12:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f042d6be13
12:30 dalek rakudo/nom: 985ef11 | jnthn++ | tools/build/NQP_REVISION:
12:30 dalek rakudo/nom: Bump NQP_REVISION for .^shortname.
12:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/985ef11a60
12:31 jdv79 azawawi: don't see it.  anyway, that could be neat.
12:32 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
12:33 azawawi jdv79: sorry for that... wrong link lol :) http://irclog.perlgeek.de/p​erl6/2015-10-18#i_11394867
12:34 * azawawi blames his mind
12:34 jnthn arnsholt: What gives you an array?
12:34 jnthn m: my @ints = 1, 2, 3, 5; say Blob.new(@a) # contains those ints
12:34 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␤»
12:34 jnthn m: my @ints = 1, 2, 3, 5; say Blob.new(@ints) # contains those ints
12:34 camelia rakudo-moar 6b4467: OUTPUT«Blob:0x<01 02 03 05>␤»
12:35 jdv79 are azawawi and his mind seperate entities?
12:35 arnsholt Buf.new($stuff).list
12:36 jnthn m: my @ints = 1, 2, 3, 5; say Buf.new(@ints).list.WHAT
12:36 camelia rakudo-moar 6b4467: OUTPUT«(List)␤»
12:36 arnsholt Or a list. Thought it said Array at my REPL
12:36 jnthn But I'm not sure whey you'd do that when you already had @ints to start out wiht
12:36 jnthn What're you trying to achieve?
12:36 arnsholt See if I can't shave off some overhead in Digest's SHA256 function
12:37 jnthn By working on a buf instead of a List/Array?
12:37 jnthn Ah, is your confusion that assignment into an Array is *into* it, not replacing it?
12:37 jnthn m: my @a = Buf.new(4, 6, 8); say @a.WHAT
12:37 camelia rakudo-moar 6b4467: OUTPUT«(Array)␤»
12:37 jnthn m: my @a := Buf.new(4, 6, 8); say @a.WHAT
12:37 camelia rakudo-moar 6b4467: OUTPUT«(Buf)␤»
12:37 Skarsnik Hello
12:38 arnsholt Oh!
12:38 jnthn arnsholt: This may be a good place to use native arrays though
12:38 jnthn my uint8 @array; # or so
12:38 jdv79 oh, Markdown blocks and a renderer seems like a neat idea.
12:38 jnthn Which store just as compactly as Buf
12:38 jdv79 azawawi: are you working on that?
12:38 arnsholt I've completely lost the plot on listy things, clearly!
12:38 dalek rakudo/nom: 5ed61e0 | jnthn++ | src/core/Mu.pm:
12:38 dalek rakudo/nom: Type objects should always gist to short name.
12:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5ed61e010f
12:38 dalek rakudo/nom: 5751a25 | jnthn++ | src/core/traits.pm:
12:38 dalek rakudo/nom: `is export` on types should use short name.
12:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5751a2583f
12:38 dalek rakudo/nom: c1ed4f9 | jnthn++ | lib/NativeCall.pm:
12:38 dalek rakudo/nom: Fix a need for .^shortname in NativeCall.
12:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c1ed4f9bf8
12:39 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 rakudo/nom: 5159793 | jnthn++ | src/Perl6/ (3 files):
12:39 dalek rakudo/nom: Make .^name and .WHO.Str fully qualified.
12:39 dalek rakudo/nom:
12:39 dalek rakudo/nom: Always. Not just sometimes, as before.
12:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5159793003
12:40 dalek roast: 07fc1d2 | jnthn++ | S10-packages/basic.t:
12:40 dalek roast: Correct syntax of test and un-todo.
12:40 dalek roast: review: https://github.com/perl6/roast/commit/07fc1d29bf
12:40 dalek roast: 584d7aa | jnthn++ | S0 (4 files):
12:40 dalek roast: Merge branch 'master' of github.com:/perl6/roast
12:40 dalek roast: review: https://github.com/perl6/roast/commit/584d7aa298
12:40 dalek roast: 1e18170 | jnthn++ | S02-types/baghash.t:
12:40 dalek roast: Merge branch 'master' of github.com:/perl6/roast
12:40 dalek roast: review: https://github.com/perl6/roast/commit/1e1817037e
12:40 dalek roast: 7aeff20 | jnthn++ | S02-types/WHICH.t:
12:40 dalek roast: Update for .gist changes.
12:40 dalek roast:
12:40 dalek roast: It now reliably gives the shortname.
12:40 dalek roast: review: https://github.com/perl6/roast/commit/7aeff2003e
12:40 jnthn eek
12:40 arnsholt Skarsnik: The vim Perl 6 syntax is pretty heavy, yeah
12:40 jnthn Oh, I guess `make spectest` pulls...
12:40 jnthn Thus the merges.
12:41 dalek roast: 5439c65 | jnthn++ | S10-packages/basic.t:
12:41 dalek roast: Tests for RT #118361.
12:41 dalek roast: review: https://github.com/perl6/roast/commit/5439c65fff
12:41 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=118361
12:41 Skarsnik well it's slow on a 50 lines files already x)
12:41 azawawi jdv79: :)
12:42 azawawi jdv79: the issue started while i was working on perl6-electron. A lot of the wrapped API needed to be documented.
12:44 dalek roast: 2d2311d | jnthn++ | S10-packages/basic.t:
12:44 dalek roast: Unfudge a now-passing test.
12:44 dalek roast:
12:44 dalek roast: Oddly, the ticket it was associated with was already resolved; seems
12:44 dalek roast: there was a bit of .HOW vs. .WHO confusion.
12:44 dalek roast: review: https://github.com/perl6/roast/commit/2d2311d9b4
12:45 dalek roast: f41a28b | jnthn++ | S14-roles/namespaced.t:
12:45 dalek roast: Unfudge test for RT #124750.
12:45 dalek roast: review: https://github.com/perl6/roast/commit/f41a28b07a
12:45 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=124750
12:46 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:47 jdv79 right?
12:47 jnthn Phew. That was more effort than expected... :/
12:47 azawawi jdv79: perl6 --doc=MD or MARKDOWN you mean?
12:47 azawawi jnthn: https://github.com/softmoth/perl6-pod-to-markdown/
12:48 jnthn lunch &
12:48 jdv79 not if its embedded in pod6, no?
12:49 jdv79 idk anything about that stuff though
12:50 azawawi jdv79: or maybe reuse Pod::To::Text
12:52 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:53 softmoth_ joined #perl6
12:57 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:58 azawawi jdv79: Pod::To::Text chomps newlines off lists... bummer
12:59 jdv79 now that sounds promising
13:04 bombless joined #perl6
13:07 brrt silliest question i've seen today; can infinite be an integer
13:07 BooK m: say Inf.WHAT
13:07 camelia rakudo-moar 515979: OUTPUT«(Num)␤»
13:08 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
13:08 pink_mist what about by mathematics? :P
13:08 BooK I'd it depends on the space you're working in to get there :-)
13:09 BooK 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
13:11 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.
13:11 timotimo nine: excellent! thanks
13:11 BooK and technically, ∞ is not part of ℕ
13:12 BooK more surprising is:
13:12 BooK m: say Nan.WHAT
13:12 camelia rakudo-moar 515979: OUTPUT«5===SORRY!5=== Error while compiling /tmp/WE5XcXxrEa␤Undeclared name:␤    Nan used at line 1␤␤»
13:12 BooK m: say Na.WHAT
13:12 camelia rakudo-moar 515979: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qBMk2PBnoi␤Undeclared name:␤    Na used at line 1␤␤»
13:12 BooK m: say NaN.WHAT
13:12 camelia rakudo-moar 515979: OUTPUT«(Num)␤»
13:12 BooK dammit
13:12 BooK how to make a pun fall flat
13:13 timotimo oh, you mean "why is NaN a Num"?
13:13 BooK I think I understand why
13:13 BooK I mean, what else could it be?
13:13 pink_mist "Not a Number" is clearly a number >_>
13:14 timotimo somehow i ended up with a folder named ":" inside my panda folder
13:14 RabidGravy yay!
13:14 timotimo the folder has a bunch of subfolders
13:14 RabidGravy better than one called '..'
13:14 timotimo i cd'd all the way through and this is the pwd:
13:14 timotimo /home/timo/perl6/ecosystem/panda/:/home/timo/p​erl6/install/share/perl6/site/lib:/home/timo/p​erl6/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
13:14 BooK we don't want to know what's in your colon
13:14 BooK folder
13:15 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 .. ?
13:16 BooK '.. ' 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
13:16 BooK heh
13:17 RabidGravy but I have seem it actually be something else on a very broken Unix filesystem about twenty years ago
13:18 azawawi timotimo: yup
13:19 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:20 brrt clearly, infinite cannot be counted
13:20 brrt therefore, it is not within the set of integers
13:20 brrt even though the integers form an ifninitely large sets
13:20 brrt s[sets][set]
13:20 timotimo azawawi: i responded to the issue about JSON::Fast on panda
13:20 BooK and there are infinities of various sizes too
13:20 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 BooK https://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
13:22 RabidGravy now lots of plaster all over the pavement
13:23 azawawi timotimo: sure im looking at it
13:24 timotimo thanks
13:24 dalek rakudo/nom: 9ea6973 | (Stefan Seifert)++ | tools/build/Makefile-common-rules.in:
13:24 dalek rakudo/nom: Make spectest_update safer
13:24 dalek rakudo/nom:
13:24 dalek rakudo/nom: Only pull if we can do a fast foward to avoid making merge commits or
13:24 dalek rakudo/nom: worse merge conflicts if the local branch has been rebased.
13:24 dalek rakudo/nom:
13:24 dalek rakudo/nom: The automatic pull is a convenience feature. It must not make
13:24 dalek rakudo/nom: development inconvenient.
13:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9ea6973d73
13:24 nine jnthn: ^^^
13:24 jnthn nine: ooh!
13:24 azawawi timotimo: 13 before it dies ...
13:24 jnthn nine++
13:24 azawawi timotimo: say nqp::ordat($initial, 0);  # 13
13:25 * moritz must say that giving nine++ a commit bit was one of our better decision :-)
13:25 jnthn ;)
13:25 nine moritz: I'm glad you see it that way :)
13:26 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:27 jnthn I suspect nativesizeof could be taught about that
13:27 jnthn Given it's just gonna be the size of a pointer
13:27 timotimo azawawi: so why won't nom-ws skip over it?
13:28 timotimo azawawi: can you help me with this?
13:29 Skarsnik Let see how nativesizeof(ctructrep) work actually
13:29 azawawi timotimo: because it is too fast lol... looking into it
13:30 timotimo i'm glad you think it's too fast, but i was hoping i could make it faster yet
13:31 azawawi timotimo: wsord=4294967309  # huh?
13:31 timotimo uh? we're leaking a synthetic again?
13:32 jnthn Looks like...
13:32 timotimo ISTR a fix for that recently :S
13:32 jnthn ordat is a bad idea generally
13:32 jnthn I thougth so too
13:32 jnthn If it's ordat that's broken I'm as likely to toss it as fix it...
13:32 TimToady joined #perl6
13:33 timotimo damn. it's so convenient, though
13:33 jnthn No, it's not
13:33 timotimo JSON::Fast lives at an uncomfortable place
13:33 jnthn It's a great way to write broken code
13:33 timotimo where the thing coming in is supposed to be a freak version of utf8
13:34 timotimo as in: it allows only up to a certain codepoint and beyond that it requires surrogates
13:34 timotimo bwuh. disgusting.
13:34 jnthn ugh
13:34 jnthn But really, nqp::eqat is a *far* safer way
13:34 timotimo i definitely don't want to work with the incoming stuff at the Buf level
13:35 moritz yes, json basically rests on UCS-2 assumptions
13:35 jnthn Doesn't allocate, and does the right thing with synthetics
13:35 timotimo hum. that's probably the way to go, then.
13:35 timotimo oh, hum. but how's this:
13:36 timotimo we likely have to support strings that start with a combiner
13:36 timotimo my current implementation - and i expect JSON::Tiny's as well - will just consider the combiner to live on the "
13:36 timotimo ugh, makes my skin crawl
13:37 azawawi timotimo: this is strange voodoo... 'say $pos;' dies...
13:38 timotimo um, wat :)
13:41 dj_goku_ p6: '7qa'.split('', 2)
13:41 camelia rakudo-moar 9ea697: ( no output )
13:41 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?
13:42 dj_goku_ p6: '7qa'.split('')
13:42 camelia rakudo-moar 9ea697: ( no output )
13:42 dj_goku_ m: '7qa'.split('')
13:42 camelia rakudo-moar 9ea697: ( no output )
13:42 dj_goku_ oh
13:42 timotimo dj_goku_: please use "say" to get output
13:42 dj_goku_ m: say '7qa'.split('')
13:42 camelia rakudo-moar 9ea697: OUTPUT«( 7 q a )␤»
13:43 dj_goku_ aye. :D
13:43 dj_goku_ p6: say '7qa'.split('', 2)
13:43 camelia rakudo-moar 9ea697: OUTPUT«( 7qa)␤»
13:44 dj_goku_ timotimo: I was thinking that then said oh!
13:44 CIAvash joined #perl6
13:44 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
13:44 zengargoyle looks like i'm doomed to have to learn more nqp stuff...
13:45 zengargoyle i thought i could stuff some Perl into core/Pod.pm and use it easily, it seems not to be true.
13:46 nine ShimmerFairy: and trailing commas!
13:46 moritz ShimmerFairy: json5 supports comments (and NaN etc.)
13:46 moritz and yes, I think trailing commas too (not sure)
13:46 jdv79 blasphemers
13:48 ShimmerFairy moritz: gasp, you mean JSON had dared to soil the purity of their "just objects" format with the dreaded comments!?
13:50 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 #perl6
13:52 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:56 dj_goku_ timotimo: so your hands and keyboard smell fresh and clean now!
13:57 sprocket joined #perl6
13:57 timotimo i wiped off the hands, not the keyboard ;)
13:57 timotimo this is a chiclet keyboard; those are notoriously hard to clean
13:57 dj_goku_ haha. googling
13:58 dj_goku_ 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
13:58 dj_goku_ I have the full sized mac keyboard with a cover and just wash it.
13:59 timotimo this is a microsoft sculpt 2
14:07 pmurias joined #perl6
14:09 ifim joined #perl6
14:11 timotimo japhb: are you around right now?
14:12 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 :)
14:12 vytas thanks, and thanks for doing this, nice summarise of what's happening ! :)
14:13 timotimo don't thank me, thank lizmat! she's done the last 7 posts for me %)
14:14 timotimo of course i'm still glad to hear of people who read the weekly :)
14:16 rurban joined #perl6
14:21 pierrot joined #perl6
14:21 cognominal timotimo, whoever writes it, it is a must read.
14:22 timotimo <3
14:25 Skarsnik hm, does something see common mistake I could add checks with defininig nativecall cstruct: https://github.com/Skarsnik/nativecall-typediag (look the example)
14:32 skids joined #perl6
14:35 Skarsnik should that be fixed?
14:35 Skarsnik nqp/MoarVM/src/6model/reprs/CStruct.c
14:35 Skarsnik 239:                        "CStruct representation only handles int, num, CArray, CPointer, CStruct, CPPStruct and CUnion");
14:35 Skarsnik since putting int and num is a bad idea
14:35 timotimo maybe it should have "representations" at the end
14:36 timotimo that could make it clearer?
14:37 jnthn And correct it to P6int and P6num maybe
14:37 jnthn Since those are actual representation names
14:37 Skarsnik yes
14:38 jnthn m: say int.REPR; say int32.REPR; # etc
14:38 camelia rakudo-moar 9ea697: OUTPUT«P6int␤P6int␤»
14:38 Skarsnik quite confusing
14:39 jnthn Not really
14:39 jnthn Representations are (usually configurable) memory layout/management strategies
14:40 Skarsnik m: say Str.REPR;
14:40 camelia rakudo-moar 9ea697: OUTPUT«P6opaque␤»
14:40 cognominal why %?LANG is created only if the grammar is modified?
14:40 Skarsnik Str is also allowed
14:41 Skarsnik m: say Hash.REPR;
14:41 camelia rakudo-moar 9ea697: OUTPUT«P6opaque␤»
14:41 JimmyZ m: say str.REPR
14:41 camelia rakudo-moar 9ea697: OUTPUT«P6str␤»
14:41 softmoth_ joined #perl6
14:42 Skarsnik I had sigseg if I put str instead of Str in CStruct repr
14:45 arnsholt jnthn: Fun fact: Changing some "my @x" to "my uint32 @x" seems to generally slow the code down
14:45 arnsholt I suspect added type checks
14:46 jnthn arnsholt: More like added boxing
14:46 jnthn arnsholt: If you use native types you need to use them fairly consistently
14:46 jnthn arnsholt: It may also be about native refs not being optimized away
14:47 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 :)
14:47 jnthn Not to mention on understanding the profiler output :)
14:48 arnsholt That'd probably be nice. In the meantime, do you have any tips on how to track down what triggers the boxing?
14:49 jnthn The profiler! :P
14:49 jnthn Look on the allocations tab :)
14:49 timotimo it's not terribly fine-grained, though :(
14:50 jnthn Gets you to within a function
14:50 timotimo yup
14:50 dalek modules.perl6.org/mojo-app: 9fdc7d0 | (Zoffix Znet)++ | / (2 files):
14:50 dalek modules.perl6.org/mojo-app: Add TODO suggestion list
14:50 dalek modules.perl6.org/mojo-app:
14:50 dalek modules.perl6.org/mojo-app: Some ideas to take us further once mojo-app branch gets merged to master
14:50 dalek modules.perl6.org/mojo-app: review: https://github.com/perl6/modul​es.perl6.org/commit/9fdc7d0261
14:50 arnsholt Yeah. But I'm only working on a single function, unfortunately =)
14:51 arnsholt 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:52 jnthn Nothing is intended besides unboxing the values
14:52 jnthn What're you seeing?
14:52 timotimo the rwness multi-cache stuff is complete now, right?
14:52 jnthn timotimo: yeah
14:52 timotimo great
14:54 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...
14:55 arnsholt The results are the same for the first iteration, but then diverge
14:55 arnsholt Aha. In that case I'll try updating my Rakudo first
14:58 virtualsue joined #perl6
15:02 soggybread joined #perl6
15:04 johntravolta joined #perl6
15:05 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:06 timotimo you could try dd-ing it instead of just printing
15:07 timotimo that gives you a bit more clarity usually
15:09 arnsholt Indeed it was. The difference is "Array = $[...]" versus "array[uint32] = array[uint32].new(...)" according to dd()
15:10 dalek perl6-roast-data: 2aeeb87 | coke++ | / (9 files):
15:10 dalek perl6-roast-data: today (automated commit)
15:10 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/2aeeb87edc
15:10 timotimo still not that easy to see if that was an array of one element or something ...
15:15 ZoffixW joined #perl6
15:16 pippo joined #perl6
15:16 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 timotimo all we can do is perhaps inline something, but it's nowhere close to optimizing out the metaop machinery :(
15:18 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 #perl6
15:19 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 arnsholt But postcircumfix:<[ ]> is one of the more visible ones too
15:19 timotimo mhm
15:19 timotimo if the graph itself doesn't help much, at least you can click through the listing at the bottom
15:20 quietfanatic joined #perl6
15:22 xpen joined #perl6
15:22 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␤␤»
15:22 ZoffixW Directives? wat?
15:22 timotimo huh?
15:22 quietfanatic I think directive is referring to the %x, but
15:23 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)␤»
15:23 ZoffixW I figured what I want, but... no idea what that error was about :P
15:23 timotimo interesting, that could perhaps want mentioning that it comes from sprintf
15:23 timotimo ZoffixW: i think you potentially want .fmt instead of map for that?
15:23 timotimo m: my ( $r, $g, $b ) = (11, 30, 12); say ($r, $g, $b).fmt("%02x");
15:23 camelia rakudo-moar 9ea697: OUTPUT«0b 1e 0c␤»
15:23 * ZoffixW looks up fmt
15:24 timotimo m: my ( $r, $g, $b ) = (11, 30, 12); say ($r, $g, $b).fmt("%02x", "");
15:24 camelia rakudo-moar 9ea697: OUTPUT«0b1e0c␤»
15:24 timotimo m: my ( $r, $g, $b ) = (11, 30, 12); say ($r, $g, $b).fmt("%02x", ",");
15:24 * ZoffixW nerdgasms
15:24 camelia rakudo-moar 9ea697: OUTPUT«0b,1e,0c␤»
15:24 ZoffixW Man Perl6 is a bag of goodies. You keep finding awesome stuff :)
15:24 ZoffixW timotimo++ thanks.
15:24 quietfanatic oh, method form .sprintf is assuming the left side is the format
15:24 arnsholt Oh, yeah. Removing the metaops shaved off half a second on checksumming a kilobyte
15:24 quietfanatic "%x".sprintf(11)
15:24 quietfanatic m: "%x".sprintf(11)
15:24 camelia rakudo-moar 9ea697: ( no output )
15:24 quietfanatic m: say "%x".sprintf(11)
15:24 camelia rakudo-moar 9ea697: OUTPUT«b␤»
15:25 yqt joined #perl6
15:26 Skarsnik fmt is nice :)
15:26 timotimo arnsholt: that doesn't seem like much; how long does it take all in all?
15:27 Skarsnik half a second for 1kB is nice lol
15:27 RabidGravy Skarsnik, and it's less to type ;-)
15:27 arnsholt Skarsnik: Half a second off the total runtime =)
15:28 arnsholt 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?
15:28 timotimo so you can use --stagestats to see how long that part takes
15:29 arnsholt According to the profiler, it now spends 1531 ms in the tightest inner loop, which is 96% of the total time
15:29 arnsholt Yeah, I'm not precompiling since I keep fiddling with the library code
15:29 arnsholt Oh, stagestats is a good point
15:29 arnsholt timotimo++ # optimizing the optimization
15:30 arnsholt 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:<[ ]>
15:31 ZoffixW What profiler are you using?
15:31 arnsholt Worth a shot, I suppose
15:31 ZoffixW (as in, how do I get it to play with it and my code)
15:31 timotimo perl6 --profile foo.p6
15:31 ZoffixW Oh. Sweet.
15:32 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 timotimo and how much overhead do we get from the GC?
15:33 arnsholt 6% GC, 1.8% spesh. 11.5 percent of frames were eliminated by inlining
15:33 timotimo and jit? what about jit?
15:34 arnsholt 78% jitted frames
15:34 timotimo ah. not too bad
15:34 timotimo actually. how big is the html file? can you maybe put it online?
15:34 nine So brrt++ can rescue performance in this case ;)
15:35 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
15:35 timotimo oh, that's quite tiny
15:35 nine timotimo: I was referring to his work on a better jit :)
15:35 timotimo ah!
15:36 arnsholt timotimo: http://heim.ifi.uio.no/arnskj/profile.html
15:36 khw joined #perl6
15:37 tokuhiro_ joined #perl6
15:38 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 timotimo that'd tell me which frames don't get jitted and why
15:38 hankache joined #perl6
15:38 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!
15:39 timotimo arnsholt: does line 2036 in your m-BOOTSTRAP refer to find_best_dispatchee?
15:40 arnsholt src/gen/m-BOOTSTRAP.nqp:2036 here is a closing brace
15:41 timotimo oh, huh?
15:42 ZoffixW Oh. seems to do with the \Δ
15:43 timotimo i think the profiler results may be a bit ... confused here
15:43 timotimo the bars don't add up to 100%, for example
15:43 arnsholt timotimo: http://heim.ifi.uio.no/arnskj/jitlog.txt for the jitlog output
15:43 arnsholt And sha256.jitlog.txt for the whole shebang, if you want it
15:44 arnsholt 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
15:44 timotimo ah, coolt
15:44 arnsholt (I think there was a small change between the first profile and the second run)
15:44 kjs_ joined #perl6
15:44 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
15:45 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?
15:45 Skarsnik http://www.nyo.fr/~skarsnik/p​rofile-1447363824.08688.html I know that iceweasel does not like these profile file x)
15:46 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; }
15:46 camelia rakudo-moar 9ea697: OUTPUT«5\(Any)7␤ ----- ␤5\(6)7␤»
15:46 ZoffixW I'd call that a bug ^ :/
15:47 ZoffixW Is it?
15:47 timotimo sigil-less variables are quite special
15:47 timotimo does $Δ fare better?
15:47 ZoffixW Hm. Maybe I should avoid using them so liberally then :)
15:47 timotimo perhaps
15:47 jnthn You can't list-assign to a sigil-less var
15:47 PerlJam m: my (\a, \b) = (1,2);  say a; say b;
15:47 camelia rakudo-moar 9ea697: OUTPUT«(Any)␤(Any)␤»
15:48 arnsholt It's in find_best_dispatchee, yeah
15:48 moritz m: my ( $x, \Δ, $y ) = (5, 6, 7); say $x, Δ, $y;
15:48 camelia rakudo-moar 9ea697: OUTPUT«5(Any)7␤»
15:48 ZoffixW Yeah $Δ works, but it loses that special look :)
15:48 jnthn But we really shouldn't just let it end up as Any, we should fail to compile it...
15:48 ZoffixW +1 on failing
15:48 jnthn TimToady++ filed an RT to clean that up
15:48 moritz Skarsnik: chromium also complains "site unresponse" when I try to switch to the "call graph" tab
15:48 jnthn And to provide a way that works
15:48 timotimo jnthn: is it fair to say TimToady worked on the "most recent continuous match" thing?
15:48 jnthn Most recent continuous match?
15:49 jnthn I did that, and TimToady decided he didn't want those sematnics, and I still need to pull them out again...
15:49 timotimo yeah, backreferences to captures that match multiple times
15:49 timotimo oh?
15:49 mr_ron joined #perl6
15:49 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
15:49 jdv79 the profiler output is all but useless for non-trival sized code ime
15:49 timotimo so rather not put that into the weekly?
15:49 Skarsnik hm, the file work localy
15:49 jnthn timotimo: It can go in
15:49 jdv79 even the output of a few simple test files kill my browsers
15:50 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 timotimo ^- like this?
15:50 timotimo jdv79: there's a branch that works towards cutting the call tree a little bit, but it generates wrong results :(
15:50 jnthn timotimo: Well, that's what I did. But it should actually not ahve the "continuous" constraint
15:50 jdv79 i know.  you've typed about it many times. where is it?
15:50 timotimo it should just match from the earliest match to the last match?
15:51 mr_ron star-m: use URI::Escape; say uri_escape("drücken")
15:51 camelia star-m 2015.09: OUTPUT«dr%C3%BCcken␤»
15:51 timotimo jdv79: moarvm finite_callgraph_depth
15:52 jdv79 mr_ron: yes.  yours ane mine work fine.  its the other one that was (is?) not too super.
15:54 jdv79 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 jdv79 *dist
15:55 arnsholt timotimo++ # Calling AT-POS directly
15:55 timotimo arnsholt: how much is that worth?
15:55 arnsholt A LOT
15:56 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
15:56 timotimo upload the new profile so i can have both side-by-side? :)
15:56 arnsholt Yeah, my test script prints the result of "$gold eqv sha256($data)"
15:56 timotimo very good :)
15:57 arnsholt profile2.html
15:57 ZoffixW Weird. This works in Camelia, but in my code I get a failure:
15:57 ZoffixW m: sub foo () { return map { .round }, 64, 138, 192, 255 }; use Test; is-deeply foo(), (64, 138, 192, 255);
15:57 camelia rakudo-moar 9ea697: OUTPUT«ok 1 - ␤»
15:57 arnsholt Yeah, it took me a while to realize I needed to do that, but oh well =)
15:57 ZoffixW Failure being # expected: $(64, 138, 192, 255)    #      got: (64, 138, 191, 255).Seq
15:58 arnsholt timotimo: At this point rotr and infix:<⊕> not being inlined is starting to look interesting too
15:58 timotimo arnsholt: 404 :(
15:58 jdv79 timotimo: that's over a year old
15:58 arnsholt timotimo: Fixed
15:58 timotimo jdv79: yeah, it can probably still apply cleanly, though
15:58 arnsholt The university login cluster has an overzealous umask I've never bothered to fix
15:58 jdv79 no rush huh? :)
15:59 timotimo i tried to make it work two or three times, but the results were always wrong
15:59 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
16:00 timotimo 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) }"
16:00 timotimo easy, just use \n and \b, since they are read-only anyway
16:00 jdv79 will there ever be ro containers for something like has @.foo ?
16:01 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
16:01 jdv79 its nice that i can have a ro obj except not that the container attrs are not
16:01 timotimo it's responsible for 48k BOOTCode allocations of 140k
16:01 PerlJam .oO( how to work rotr.oh into the code ... )
16:01 jnthn arnsholt: Putting type decls in sub rotr may help
16:02 jnthn (on $n and $b)
16:02 timotimo arnsholt: were you making sure you're looking at m-BOOTSTRAP.nqp and not BOOTSTRAP.nqp?
16:02 arnsholt Yup. It's rakudo/src/gen/m-BOOTSTRAP.nqp
16:02 timotimo :|
16:03 timotimo shouldn't it be gen/moar/m-BOOTSTRAP.nqp?
16:03 timotimo no
16:03 timotimo yeah
16:03 arnsholt Aha!
16:03 timotimo it should be
16:03 timotimo the src/gen folder is outdated, i believe
16:03 arnsholt It's probably leftovers from when gen was src/gen
16:03 arnsholt Yeah
16:03 timotimo aye
16:03 timotimo so, is it find_best_dispatchee?
16:03 arnsholt Yup
16:03 timotimo damn it!
16:04 timotimo i'd have to go through the call graph to see what actually calls it. god damn it, what a dra.
16:04 timotimo drag.
16:04 znpy joined #perl6
16:04 timotimo re-generating the icicle graph each time makes it super crazy slow
16:04 hankache joined #perl6
16:05 arnsholt Adding types drops rotr down the list, yeah. Doesn't get inlined though
16:05 * 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 https://github.com/rakudo/rakudo/commit/​6d970110df1c9fc160833137c66d8394b8b9b328 )
16:05 jdv79 should i be able to stuff a list or a map into a container attr?
16:05 timotimo TimToady: i already have half of it watched :P
16:05 jdv79 that would be ro, no?
16:06 dalek rakudo/nom: a662e02 | TimToady++ | src/core/Range.pm:
16:06 dalek rakudo/nom: fix up Range.sum as b2gills++ pointed out
16:06 dalek rakudo/nom:
16:06 dalek rakudo/nom: It should always return Int, and it should allow integer wannabes.
16:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a662e0204d
16:06 jdv79 there's a new a new p6 video?
16:06 timotimo https://twit.tv/shows/triangulation/episodes/225
16:07 jnthn .oO( TimToady Was in TV )
16:07 johan_ joined #perl6
16:07 * jnthn queues it up to watch later :)
16:07 PerlJam Is there a place to link such videos on perl6.org?
16:08 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!
16:08 PerlJam TimToady: people inside the echo chamber have already noticed ;)
16:08 TimToady you can say that again
16:09 arnsholt timotimo: Huh. Changing rotr to take \n, \b breaks the code, for some reason.
16:10 timotimo oh
16:10 WizJin joined #perl6
16:10 arnsholt But adding type constraints gave a nice boost as well
16:10 cognominal joined #perl6
16:10 arnsholt Dropped from 21% to 7
16:10 timotimo i'm a little surprised
16:11 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 jnthn timotimo: So it saves quite a lot of Scalar allocations
16:12 timotimo oh!
16:12 timotimo i must keep that in mind!
16:27 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␤»
16:27 quietfanatic So, the spec seems to indicate its legal to split a module up into multiple locations like that
16:28 quietfanatic 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
16:29 dalek roast: d2ef359 | TimToady++ | S03-operators/range-int.t:
16:29 dalek roast: test Range.sum semantics
16:29 dalek roast: review: https://github.com/perl6/roast/commit/d2ef359401
16:29 Skarsnik Or should unit work for that?
16:29 quietfanatic Ah.  Would it be more normal to make the parts seperate modules and merge them with the import mechanism?
16:30 quietfanatic (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...)
16:30 TimToady m: module X { sub foo () { } }; augment module X { sub bar () { } }; foo();
16:30 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…»
16:30 TimToady heh
16:31 TimToady 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␤»
16:31 TimToady hehheh
16:31 quietfanatic it really does not want you to do that
16:31 TimToady well, foo wouldn't be visible without export anyway
16:31 quietfanatic You can't call X::foo()?
16:32 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();
16:32 camelia rakudo-moar a662e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9WWMST2dPD␤Undeclared routine:␤    foo used at line 1␤␤»
16:32 quietfanatic m: module X { sub foo () { } }; X::foo()
16:32 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␤␤»
16:32 quietfanatic oh
16:32 TimToady m: module X { sub foo () is export { } }; import X; foo();
16:32 camelia rakudo-moar a662e0: ( no output )
16:32 tony-o_ m: say from-json('{ }');
16:32 camelia rakudo-moar a662e0: OUTPUT«␤»
16:32 quietfanatic Skarsnik: I'm going to split according to SDL's C header scheme
16:32 TimToady functions are now lexical rather than package scoped
16:33 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();
16:33 camelia rakudo-moar a662e0: ( no output )
16:33 quietfanatic Right, okay
16:33 TimToady unless you use 'our'
16:34 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
16:34 quietfanatic SDL2
16:34 quietfanatic oh, I did not know that
16:34 timotimo :)
16:34 timotimo SDL2::Raw is mine. i'd be glad to give you a commit bit
16:34 quietfanatic searching for "perl6 sdl" was not enough I guess
16:34 timotimo huh, strange
16:36 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
16:37 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?
16:37 timotimo Skarsnik: that's totally wrong
16:37 timotimo a class is definitely not a repr
16:37 quietfanatic timotimo: yes
16:38 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)?
16:38 quietfanatic thanks!
16:38 timotimo that's all right
16:38 TimToady the specs say that native types should allow derived classes that only add methods, but we're not there yet
16:38 flussence there's another URI::Template?
16:39 timotimo https://p6weekly.wordpress.com/?p=9​75&amp;preview=true&amp;iframe=true - can people see this?
16:39 Skarsnik nop
16:39 flussence probably not, it doesn't have a mile-long string of hex chars...
16:39 Skarsnik should we have an account?
16:39 jnthn TimToady: Don't suppose you found a moment to ponder the semantics of callsame/nextsame when there's nowhere to defer to? :)
16:39 timotimo god fucking damn you, wordpress.
16:40 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…»
16:40 TimToady jnthn: we have to be a bit failsoft there
16:41 TimToady on account of the point of nextsame is to defer to .^mro when we don't necessarily know if we have siblings
16:41 TimToady why we have nextsame instead of SUPER::
16:42 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?
16:42 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␤␤»
16:42 TimToady so Nil is probably about the right softness
16:42 jnthn OK
16:42 jnthn And should nextsame/nextwith become like "return Nil"?
16:42 TimToady m: class MyInt is Int { method sum-of-range() { (1..+self).sum } }; say MyInt.new(42).sum-of-range
16:42 camelia rakudo-moar a662e0: OUTPUT«903␤»
16:42 jnthn That is, they don't let control flow past them even if there's nowhere to defer?
16:42 TimToady ooh, it does work
16:43 TimToady oh wait, that's not a native
16:43 TimToady m: class MyInt is int { method sum-of-range() { (1..+self).sum } }; say MyInt.new(42).sum-of-range
16:43 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␤»
16:43 TimToady yeah, NYI
16:43 psch m: say 12.round( (:16('A')) ).base(16) # ZoffixW
16:43 camelia rakudo-moar a662e0: OUTPUT«A␤»
16:44 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
16:45 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"?
16:45 psch m: say (:16('A'))
16:45 camelia rakudo-moar a662e0: OUTPUT«10␤»
16:46 psch well, yes... am i misunderstand what you want to do?
16:46 psch m: say 12.round(10)
16:46 camelia rakudo-moar a662e0: OUTPUT«10␤»
16:46 psch m: say 12.round(15)
16:46 camelia rakudo-moar a662e0: OUTPUT«15␤»
16:46 psch hmm, maybe i'm *also* misunderstanding .round :/
16:47 TimToady m: say 42.round(15)
16:47 camelia rakudo-moar a662e0: OUTPUT«45␤»
16:47 ZoffixW I'm trying to get 'FC' to end up as 'FF', 'F7' to end up as 'E0'
16:47 ZoffixW umm
16:47 ZoffixW FC -> 100
16:47 TimToady what about multiples of A?
16:47 jnthn TimToady: k, thanks :)
16:47 jnthn Gives me an easy-ish thing to do this evening :)
16:48 TimToady round is based on modular arithmetic, more or less
16:48 TimToady you can't just round in the last digit
16:48 psch m: :16($_).round('16').base(16).say for 'FC', 'F7'
16:48 camelia rakudo-moar a662e0: OUTPUT«100␤F0␤»
16:48 psch well, without the accidental Str to round
16:49 ZoffixW :16() is the reverse of .base(16), right?
16:49 ZoffixW Sweet
16:49 ZoffixW psch++ :D
16:49 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!  :-)
16:49 yoleaux japhb: I'll pass your message to timotimo.
16:49 sufrostico joined #perl6
16:50 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!  :-)
16:50 timotimo if this can be a synchronisation point, i'd like to ask you about the "pi-sequential" benchmark
16:50 japhb What about it?
16:51 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 lostinfog joined #perl6
16:52 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.
16:53 japhb Also, is @*ARGS[0] not an IntStr these days?
16:53 dalek ecosystem: 40c0bf6 | RabidGravy++ | META.list:
16:53 dalek ecosystem: Add URI::Template
16:53 dalek ecosystem:
16:53 dalek ecosystem: https://github.com/jonathanstowe/URI-Template
16:53 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/40c0bf6b67
16:54 timotimo not really sure
16:54 timotimo perhaps only when sub MAIN is used
16:54 RabidGravy there, with fudged encoding tests for the time being
16:55 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()?
16:55 flussence RabidGravy++ # neat, now I don't have to fix my one :D
16:55 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.  :-(
16:55 japhb Anyone else is of course encouraged to take that on, and I'd be happy to review and merge, or give a commitbit.
16:56 timotimo yeah :S
16:56 jdv79 uri templates are a thing now?  i've never used them.
16:56 arnsholt jnthn: Never mind. Looking closer at the profile I figured it out
16:56 RabidGravy jdv79, https://tools.ietf.org/html/rfc6570 a few years now
16:57 RabidGravy really useful for abstracting rest-like interfaces
16:58 RabidGravy flussence, I didn't realise you'd made one, if I had I would have just fixed that :)
16:58 jnthn arnsholt: The caller
16:58 japhb timotimo: Got to run, but .tell me later if there's more to discuss.
16:58 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!
17:02 timotimo https://p6weekly.wordpress.com/2015/11​/17/2015-47-the-knights-who-fail-nil/ - feedback appreciated!
17:02 pierrot /w/wc
17:02 timotimo feedback as well as additions
17:02 timotimo grammar/spelling improvements
17:02 timotimo etc etc
17:02 hoelzro o/ #perl6
17:03 timotimo yo hoelzro
17:03 psch timotimo: "Failure itself is now derived from Failure."
17:03 hoelzro howdy timotimo
17:03 timotimo oops!
17:03 arnsholt OH, wow. Browsing through a large profile balloons memory usage pretty quickly
17:03 timotimo yeah :(
17:04 quietfanatic The :D turned into a smiley
17:04 timotimo derp! :)
17:04 timotimo how do i prevent that? :\
17:04 RabidGravy flussence, I snarfed the https://github.com/uri-templates/uritemplate-test :) Passes all of them with the fixed URI::Encode :)
17:04 psch <code> or <quote> i guess
17:04 arnsholt timotimo: The ballooning memory use, or the smiley? =)
17:04 psch but you'd probably want to consistently use that for anything that's actually code
17:05 psch oh, or <pre> maybe
17:05 quietfanatic Sometimes there's a "don't parse smileys option" but then you'll lose the :)s
17:05 timotimo the memory usage
17:05 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)
17:05 quietfanatic Could cheat with a zwsp :)
17:05 psch "using the [+] reduce metaoperator on addition" probably wants to read "[...] on Ranges"?
17:06 telex joined #perl6
17:06 timotimo hm, potentially
17:06 timotimo i reworded it to "using [+], the ... ,"
17:06 arnsholt timotimo: It's "just" a great big JavaScript app, so presumably we'd have to find the memory leak
17:07 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
17:07 psch timotimo++ # p6weekly
17:07 arnsholt Yeah, probably. But that it just gobbles up more and more memory might be fixable
17:08 timotimo oh?
17:08 timotimo could be, yeah
17:08 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
17:08 yoleaux hoelzro: I'll pass your message to cygx.
17:08 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?
17:08 timotimo there's a flag that lets it write a bare json file, at least
17:09 timotimo 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 :)
17:10 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 espadrine_ joined #perl6
17:10 timotimo AFK for a little bit
17:14 molaf joined #perl6
17:17 dalek ecosystem: 69ab076 | (Sylvain Colinet)++ | META.list:
17:17 dalek ecosystem: Add NativeCall::TypeDiag
17:17 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/69ab076fc5
17:17 virtualsue joined #perl6
17:17 grondilu joined #perl6
17:25 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␤␤»
17:25 ZoffixW Is there a simple way to use a variable as a name of a method to call?
17:25 dalek Net-ZMQ: bf127b0 | arnsholt++ | lib/Net/ZMQ/ (2 files):
17:25 dalek Net-ZMQ: Make the message and sending API less strict about types.
17:25 dalek Net-ZMQ:
17:25 dalek Net-ZMQ: These functions used to require buf8 arguments, but that's a bit too strict,
17:25 dalek Net-ZMQ: since we only really care about getting an appropriate blob, not that specific
17:25 dalek Net-ZMQ: type.
17:25 dalek Net-ZMQ: review: https://github.com/arnsholt​/Net-ZMQ/commit/bf127b0480
17:25 dalek Net-ZMQ: 6e5489c | arnsholt++ | lib/Net/ZMQ/Message.pm:
17:25 dalek Net-ZMQ: Make Net::ZMQ::Message.data somewhat less horribly inefficient.
17:25 dalek Net-ZMQ: review: https://github.com/arnsholt​/Net-ZMQ/commit/6e5489cde2
17:26 jnthn ZoffixW: $obj."$name"()
17:26 ZoffixW Thanks, jnthn++
17:26 jdv79 ro container like attrs?  anyone?
17:29 [Coke] rakudo-jvm down to 4227 failures from 6068 yesterday.
17:31 ribasushi joined #perl6
17:33 timotimo jdv79: dunno :(
17:34 timotimo hm, i didn't even know Buf had .push
17:38 tokuhiro_ joined #perl6
17:41 kjs_ joined #perl6
17:42 sufrostico Hi, what is the community accepted way of multiline comments ?
17:42 PerlJam "community accepted"?  heh.
17:42 Skarsnik using pod?
17:43 PerlJam sufrostico: #`(( foo ))  will do you too
17:43 sufrostico =for comment? #`[ ] ? =begin comment =end comment ?
17:43 * ZoffixW just uses '#'
17:44 PerlJam sufrostico: pod is more for documentation.  comments are more for transfer of technical knowledge (IMHO)
17:44 ZoffixW Cue in CTRL+D in the editor that [un]comments stuff :)
17:44 * sufrostico still uses vim...
17:45 sufrostico not working on anything big for now...
17:45 * ZoffixW would be very surprised if vim did not support a "comment this" shortcut
17:45 sufrostico ZoffixW: good point
17:46 [Coke] anyone here use docker? hoelzro?
17:47 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?
17:47 PerlJam ZoffixW: S/// is like p5's s///r
17:48 ZoffixW Ah, sweet. PerlJam++
17:49 ZoffixW 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 #perl6
17:49 * ZoffixW rakes http://docs.perl6.org/language/regexes for the answer
17:49 virtualsue joined #perl6
17:49 muraiki how can I determine and/or specify how many threads are being used in $*SCHEDULER's thread pool?
17:50 sno joined #perl6
17:50 ZoffixW Don't see anything.
17:50 PerlJam muraiki: I think there's a method that tells you how many are boing used.
17:51 PerlJam er, s/boing/being/
17:51 PerlJam m: $*SCHEDULER.^methods.say
17:51 camelia rakudo-moar a662e0: OUTPUT«(BUILD queue cue loads handle_uncaught <anon> <anon> <anon>)␤»
17:51 PerlJam maybe .loads?
17:53 muraiki cool, thanks!
17:54 PerlJam See S17:145
17:54 synbot6 Link: http://design.perl6.org/S17.html#line_145
17:56 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!
17:57 ZoffixW badum ts
17:57 muraiki heh
17:57 Sgeo_ joined #perl6
17:58 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.
17:59 muraiki well that's weird, .loads seems to always return "1" even if I have 100 things scheduled
18:02 sufrostico joined #perl6
18:03 * TimToady off to writing group...
18:03 timotimo group. group. group. group. group. group. group. group.
18:05 sufrostico timotimo: just installed.. put everything with a # at the begining
18:05 timotimo yeah. is that bad?
18:05 arnsholt timotimo: Do you have any idea how to debug the messages sent between the kernel and ipython frontend?
18:05 timotimo hm. perhaps we may want to put a little patch into it
18:05 timotimo arnsholt: can you be more specific?
18:05 arnsholt I think I'm replying properly to some messages, but the frontend just keeps spamming me with the same requests over and over
18:05 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 #perl6
18:06 stux|RC-only joined #perl6
18:07 sufrosti2o joined #perl6
18:08 timotimo hm. what kind of request is that?
18:08 arnsholt kernel_info_request
18:09 Zoffix joined #perl6
18:09 timotimo and you're responding to that?
18:09 arnsholt yup
18:09 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
18:09 timotimo mhm
18:10 timotimo perhaps the checksum verification fails?
18:10 timotimo you can set the key to "" if you want it to be ignored, or something like that anyways
18:10 arnsholt Yeah, maybe I should do that
18:10 gfldex m: my $r = (0.1 .. 0.3); dd $r; say $r.roll(10);
18: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)␤»
18:10 arnsholt But I think the checksum should work, since I get the right HMACs on messages I receive
18:10 gfldex should that do what i think it should?
18:10 xfix joined #perl6
18:11 timotimo gfldex: i think it intifies $r or something silly like that
18:11 sufrosti2o left #perl6
18:11 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 #perl6
18:11 timotimo m: say (9..20).roll(10)
18:11 camelia rakudo-moar a662e0: OUTPUT«(20 12 15 14 14 10 20 10 17 16)␤»
18:11 timotimo m: my $r = 9..20; say $r.roll(10)
18:11 camelia rakudo-moar a662e0: OUTPUT«(14 10 10 16 9 15 13 12 11 15)␤»
18:11 timotimo the problem is probably that it interprets the ranges as integer lists
18:12 timotimo or rather "numbers with a distance of 1 in between"
18:13 gfldex i shall toss a coin if i rakudobug or not in that case
18:13 sufrostico joined #perl6
18:13 timotimo hah
18:13 timotimo do the specs mention this at all?
18:13 molaf joined #perl6
18:13 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␤»
18:14 gfldex i dont think so, but it should either work or warn
18:16 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)␤»
18:16 timotimo that's definitely a bit weird :D
18:16 timotimo m: say (1.5..4.5).roll(100).grep(4.5)
18:16 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)␤»
18:16 timotimo ah
18:17 FROGGS joined #perl6
18:17 psch m: say eager (0.1..0.3)
18:17 camelia rakudo-moar a662e0: OUTPUT«(0.1)␤»
18:17 psch m: say  (0.1..0.3).cache
18:17 camelia rakudo-moar a662e0: OUTPUT«(0.1)␤»
18:17 gfldex rakudobugged under #126664, you may want to add more examples
18:17 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=126664
18:17 psch m: say  (1..3).cache
18:17 camelia rakudo-moar a662e0: OUTPUT«(1 2 3)␤»
18:18 psch m: say  (0.1, 0.2..0.5).cache
18:18 camelia rakudo-moar a662e0: OUTPUT«(0.1 0.2..0.5)␤»
18:18 psch m: say  eager (0.1, 0.2..0.5)
18:18 camelia rakudo-moar a662e0: OUTPUT«(0.1 0.2..0.5)␤»
18:18 psch m: say  eager (0.1, |0.2..0.5)
18:18 camelia rakudo-moar a662e0: OUTPUT«(0.1 1..0.5)␤»
18:19 timotimo you want ... for the 0.1, 0.2 ... 0.5 thing
18:19 psch yeah, that works
18:19 timotimo yeah, because that's a full list of the individual numbers
18:19 psch right
18:19 timotimo but it's still not 0.4.rand + 0.1
18:19 ZoffixW Can someone help me translate P5 to P6? I want to pass a named arg, but only based on a condition:
18:19 ZoffixW m: sub foo(:$x, :$y) { say [ $x, $y ] }; foo (  x => 42, 1 ?? y => 52 !! () );
18:19 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␤␤»
18:20 timotimo ZoffixW: you'll have to use flattening for that
18:20 psch timotimo: 0.4.rand + 0.1?
18:20 ZoffixW timotimo, in the sub's signature?
18:20 ZoffixW Is it the "|" thing?
18:20 psch timotimo: does that mean 0.1..0.3 should be all reals between those two?
18:20 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
18:21 timotimo ZoffixW: that's right
18:21 ZoffixW That sucks :P
18:21 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
18:22 ZoffixW I guess. I still have a long way of getting used to all this typed stuff after P5.
18:22 psch m: sub foo(:$x, :$y) { say [ $x, $y ] }; my %nameds = x => 1; %nameds<y> = 2 if 1.rand > .5; say foo |%nameds
18:22 camelia rakudo-moar a662e0: OUTPUT«[1 2]␤True␤»
18:23 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␤»
18:23 psch -doublesay
18:23 psch (also, "what are the odds")
18:23 ZoffixW Oh, sweet.
18:23 ZoffixW m: sub foo(:$x, :$y) { say [ $x, $y ] }; foo | %( x => 42, 1 ?? y => 52 !! () );
18:23 camelia rakudo-moar a662e0: OUTPUT«[42 52]␤»
18:23 ZoffixW psch++ thanks
18:24 gfldex m: (0.1 .. 0.3).elems.say;
18:24 camelia rakudo-moar a662e0: OUTPUT«1␤»
18:24 ZoffixW Oh. It actually should be this even, to handle the "false" case correctly
18:24 ZoffixW m: sub foo(:$x, :$y) { say [ $x, $y ] }; foo | %( x => 42, 1 ?? y => 52 !! |() );
18:24 camelia rakudo-moar a662e0: OUTPUT«[42 52]␤»
18:25 gfldex m: say so (0.1 .. 0.3).elems ~~ Inf ;
18:25 camelia rakudo-moar a662e0: OUTPUT«False␤»
18:25 gfldex that may be the problem
18:26 timotimo well, pick and roll really are about picking individual elements
18:26 timotimo m: say (20 .. 99).rand
18:26 camelia rakudo-moar a662e0: OUTPUT«69.0979545256671␤»
18:26 gfldex from the compilers/implementors standpoint that's for sure right
18:26 timotimo m: say (20 .. 99).rand(10)
18:26 camelia rakudo-moar a662e0: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at /tmp/f2mJN98E6Y:1␤␤»
18:26 timotimo m: say (20 .. 99).rand() xx 100
18:26 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 timotimo hmm, that gives values < 20, because it probably just .Int the range
18:27 eternaleye joined #perl6
18:27 timotimo perhaps we really want to give Range a .rand method that DTRT
18:27 * gfldex nods
18:27 timotimo and ask people to use that instead of .roll and .pick for ranges that are not "the integers between start and end"
18:27 psch afair, $n..$m with $n, $m as Rats is specced as ($n.Int..$m.Int) >>+>> ($n - $n.Int)
18:28 psch as in, it adds the fractional part again
18:28 timotimo mhm, could be
18:28 psch i'm not sure that's actaully spec and not just emergent though
18:28 psch m: say 0.1 .. 4.3
18:28 camelia rakudo-moar a662e0: OUTPUT«0.1..4.3␤»
18:28 psch m: say eager 0.1 .. 4.3
18:28 camelia rakudo-moar a662e0: OUTPUT«(0.1 1.1 2.1 3.1 4.1)␤»
18:28 gfldex the current behaviour is quite dangerous because randomness is rarely ever tested
18:29 timotimo i'll be AFK for a bit
18:29 psch m: say eager 0.1 .. 0.3 # means 0 .. 0 >>+>> .1
18:29 camelia rakudo-moar a662e0: OUTPUT«(0.1)␤»
18:29 zengargoylew joined #perl6
18:30 psch +parens
18:30 psch m: say (0 .. 0) >>+>> .1  # like this
18:30 camelia rakudo-moar a662e0: OUTPUT«(0.1)␤»
18:30 psch m: say eager 0.3 .. 4.1
18:30 camelia rakudo-moar a662e0: OUTPUT«(0.3 1.3 2.3 3.3)␤»
18:30 psch well, and still correct bounds checking...
18:31 psch so, way i see it, randomness isn't the confusing bit, but the Range generation is
18:31 psch (baring that i overlooked something in the conversation earlier)
18:31 psch the dd call previously is confusing, because it doesn't show the reified list
18:36 psch S02-types/range.t says that 1.2..4 has to have 3 elems
18:36 psch m: say +(1.2..4)
18:36 camelia rakudo-moar a662e0: OUTPUT«3␤»
18:37 psch so the behavior is correct, .1 .. .3 has 1 element
18:37 psch .roll()ing on that element gives only that element
18:39 ZoffixW How come $! is empty?
18:39 ZoffixW m: my ( $v1, $op, $v2 ) = (2, '-', "zoffix"); my $x = try { EVAL "$v1 $op $v2"; CATCH { fail "Invalid operand to Color: Got error $!" } }; say $x
18:39 camelia rakudo-moar a662e0: OUTPUT«Use of Nil in string context  in block  at /tmp/Dg9t65PMrW:1␤===SORRY!===␤Invalid operand to Color: Got error ␤»
18:40 * ZoffixW is going by http://learnxinyminutes.com/docs/perl6/ that $! should contain the error message in that case
18:41 ZoffixW Um. never mind.
18:41 psch m: my ( $v1, $op, $v2 ) = (2, '-', "zoffix"); my $x = try { EVAL "$v1 $op $v2"; }; say $!
18:41 camelia rakudo-moar a662e0: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Undeclared routine:␤    zoffix used at line 1␤␤»
18:41 * ZoffixW is really lost
18:41 psch $! is set after the CATCH, inside you get $_
18:41 psch not sure if that's correct though, but it's what's impl'd
18:41 ZoffixW Ah, thanks psch++
18:42 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␤»
18:43 jdv79 is there an easy way to check if something is a synthetic codepoint?
18:43 timotimo flussence: why not put a few spaces?
18:43 gfldex m: try { fail 'foo'; CATCH { say * } }
18:43 camelia rakudo-moar a662e0: OUTPUT«*␤foo␤  in block <unit> at /tmp/mMEJQMrDKT:1␤␤»
18:44 timotimo gfldex: that's just say Whatever.new (basically)
18:44 FROGGS o/
18:44 psch o/ FROGGS
18:44 timotimo ohai FROGGS
18:44 ZoffixW \o
18:45 gfldex timotimo: does Whatever.new default to $_?
18:45 timotimo no
18:45 timotimo also, putting * into the arguments of a sub call terminates Whatever Currying
18:45 timotimo you'd have more success with *.say
18:45 psch m: try { fail 'foo'; CATCH { *.say } }
18:45 camelia rakudo-moar a662e0: OUTPUT«foo␤  in block <unit> at /tmp/ADvb7y9crV:1␤␤»
18:45 gfldex it does the right thing tho
18:46 psch the say prints a '*' and the Exception gets sunk
18:46 timotimo that's right
18:46 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 :)
18:48 gfldex Whatever is another thing that will take a whole chapter to explain in The Perl 6 Book.
18:52 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...
18:52 ZoffixW m: my $x = 0/0;
18:52 camelia rakudo-moar a662e0: ( no output )
18:52 gfldex you may want to try lauder
18:52 ZoffixW :D it's so awesome that doesn't die
18:52 * ZoffixW Tweets
18:52 psch m: say 0/0
18:52 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␤␤»
18:53 ZoffixW m: say (0/0).^name
18:53 camelia rakudo-moar a662e0: OUTPUT«Rat␤»
18:53 hankache joined #perl6
18:53 psch m: say (0/0).nude
18:53 camelia rakudo-moar a662e0: OUTPUT«(0 0)␤»
18:55 * ZoffixW tries to think of any useful feature from it not dieingg right away.
18:56 gfldex m: say so 0/0 ~~ NaN;
18:56 camelia rakudo-moar a662e0: OUTPUT«False␤»
18:56 gfldex m: say so 0/0 ~~ Inf;
18:56 camelia rakudo-moar a662e0: OUTPUT«True␤»
18:57 gfldex ZoffixW: there you go
18:57 * ZoffixW hears hordes of math nerds cry out that that equation is false.
18:58 masak joined #perl6
18:58 masak evenin', #perl6
18:58 ZoffixW \o
18:58 hankache good evening everyone
18:58 corbyhaas kusuriya: ping
19:00 * zengargoylew wonders if nqp has a &dd ...
19:00 nine ZoffixW: it's no equation, just an approximation, so math nerds should be fine
19:01 ZoffixW but 0/0 is undefined :D
19:01 gfldex in Perl 6 you can define anything!
19:01 moritz as is 0**0
19:01 spider-mario joined #perl6
19:01 ZoffixW moritz, really? I thought that was 1
19:02 nine isn't 0**0 = 1?
19:02 TEttinger no, special case
19:02 nine moritz: I've used that fact in the bool_enum branch. I very much hope it's true ;)
19:02 ZoffixW Hm, I almost got something semi-interesting, but for some reason the numerator doesn't change:
19:02 ZoffixW 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"
19:02 camelia rakudo-moar a662e0: OUTPUT«Universe will implode!␤Crisis averted: 0␤»
19:02 jnthn jdv79: sub is-synthetic($chr) { chr(ord($chr)) eq $chr }
19:03 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)␤»
19:03 ZoffixW huh? :S
19:04 TEttinger oh geez this is a can of worms http://www.askamathematician.com/2010/12/q-what-do​es-00-zero-raised-to-the-zeroth-power-equal-why-do​-mathematicians-and-high-school-teachers-disagree/
19:04 psch m: say Rat.new.nude
19:04 camelia rakudo-moar a662e0: OUTPUT«(0 1)␤»
19:04 psch m: say Rat.new(5, 1)
19:04 camelia rakudo-moar a662e0: OUTPUT«5␤»
19:04 ZoffixW Thanks
19:04 psch m: say Rat.^can('new')>>.candidates>>.signature.perl # for reference
19:04 camelia rakudo-moar a662e0: OUTPUT«($(:(Rat $: Int \nu = { ... }, Int \de = { ... }, *%_),), $(:(Mu $: *%), :(Mu $: $, *@, *%_)))␤»
19:05 ZoffixW Thanks again
19:07 TEttinger nine: what's 0.0 ** (1.0 / 0.0)
19:07 TEttinger m: say 0.0 ** (1.0 / 0.0)
19:07 camelia rakudo-moar a662e0: OUTPUT«0␤»
19:07 TEttinger m: say 0.0 ** (-1.0 / 0.0)
19:07 camelia rakudo-moar a662e0: OUTPUT«Inf␤»
19:07 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'»
19:07 TEttinger not what you would expect, but 0.0 raised to the negative infinity power is infinity
19:08 psch m: #| documentation␤ sub f { }; say &f.WHY
19:08 camelia rakudo-moar a662e0: OUTPUT«documentation␤»
19:08 masak TEttinger: you seem to throw these concepts around as if they weren't all limits.
19:08 psch m: sub f() #= other kind of documentation␤{ }; say &f.WHY
19:08 camelia rakudo-moar a662e0: OUTPUT«other kind of documentation␤»
19:08 TEttinger I guess.
19:09 TEttinger 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 `&`.
19:09 masak TEttinger: that's why limits help explain these things. because they're limits, not actual results.
19:10 TEttinger I really never got that far in math in schooling
19:10 ZoffixW Doesn't the limit of infinity not exist?
19:11 masak ZoffixW: infinity *is* a limit -- rather than an actual number on the real number line.
19:11 ZoffixW I see
19:11 masak ZoffixW: it's an abstraction, an "x such as x > y for any real number y"
19:11 masak such that*
19:12 TEttinger sorta a constraint that can never be met by a real number then
19:12 masak aye.
19:12 TEttinger without making it NaN
19:12 ZoffixW But Lim(1/x) for x->0 is undefined is what I was tought; not that it was an infinity
19:12 masak only mutually agreed sloppiness allows mathematicians to put Inf in places where real numbers go.
19:12 ZoffixW :D
19:12 pink_mist it approaches infinity as x approaches 0
19:12 masak or rather, it's allowed because it tends to work out fine.
19:12 pink_mist or something
19:13 ZoffixW pink_mist, but that's the point, you can't approach infinity :D
19:13 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
19:13 masak ZoffixW: 1/x has no limit when x->0. it does, however have a limit "from above" (Inf) and one "from below" (-Inf)
19:14 masak ZoffixW: it's because these two "directional limits" disagree that there's no true limit.
19:15 dalek rakudo/curli: 5bb42f8 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
19:15 dalek rakudo/curli: Have CompUnit::Repository::Installation represent a single repo
19:15 dalek rakudo/curli:
19:15 dalek rakudo/curli: Remove the code that supported multiple paths and manifests. There was no code
19:15 dalek rakudo/curli: that could actually trigger this situation.
19:15 dalek rakudo/curli: This gives us a nicer base to build the new features on.
19:15 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/5bb42f8dae
19:16 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.
19:16 masak (and it's Inf)
19:16 ZoffixW :o
19:17 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
19:17 * ZoffixW never learned that stuff
19:18 masak ZoffixW: on the complex plane, infinity kind of looks like an infinitely big circle.
19:18 ZoffixW 0.o
19:18 masak like, start at (0, 0), pick a random heading, and go infinitely far. you end up at infinity.
19:19 masak complex analysis is fun.
19:20 pink_mist all roads lead to infinity? :P
19:20 * moritz dimly remembers some integrals in closed paths around divergencies
19:20 masak yup.
19:20 cygx joined #perl6
19:20 moritz what was that, Cauchy-Schwarz?
19:21 nine jnthn: what did you have in mind for dist ID?
19:21 cygx masak: nothing wrong with compactifying the real line to S^1
19:21 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
19:22 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␤»
19:23 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 masak cygx: yes, but that's not what we do in normal real analysis :)
19:23 jnthn nine: Could just go with ascending integers.
19:24 jnthn (Assuming you mean IDs of installed distributions...)
19:24 jnthn Unless you've a use case that won't work for?
19:24 * jnthn didn't think of one, though
19:24 nine jnthn: I mean this: dist/[sha1]       # JSON-serialized distribution info (SHA-1 of dist ID)
19:24 jnthn hm
19:24 jnthn Lemme look
19:25 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:26 jnthn Right
19:27 jnthn Yeah, I found the section in question
19:29 vendethiel joined #perl6
19:29 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
19:30 jnthn Those together should uniquely identify it, ideally
19:30 vendethiel Zoffix++
19:30 diana_olhovik_ joined #perl6
19:30 ZoffixW vendethiel, I'm still unsure if that PR is right or not, but that's what I got from the conversation here :)
19:31 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
19:31 jnthn nine: Yeah, I think that's overkill
19:31 jnthn Distributions should be immutable
19:31 vendethiel but perhaps someone who knows the rules of CATCH a bit more than I do can confirm what psch++ said http://irclog.perlgeek.de/p​erl6/2015-11-17#i_11554028
19:32 timotimo nine: updated!
19:32 vendethiel also, hi #perl6 :-)
19:32 hoelzro o/ vendethiel
19:32 jnthn vendethiel: Believe so. It's $_ inside of CATCH 'cus you want to be able to smartmatch on it
19:33 vendethiel jnthn: right, that was my reasoning as well (when, default, ...)
19:33 nine timotimo:  :)
19:33 vendethiel today, I generated C++ code from a 6 script, then got yelled at for that. it's now a macro :'(
19:33 colomon :(
19:34 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.
19:34 colomon errr, most of those scripts are p5
19:34 vendethiel colomon: how well does it integrate in your build system?
19:35 colomon vendethiel: well, my build system is a shell script that calls a bunch of makefiles.
19:35 colomon one of the makefiles calls a bunch of perl scripts
19:36 vendethiel colomon: seems a bit painful :P
19:36 colomon most of the other makefiles are generated by perl scripts.  ;)
19:37 vendethiel doubly-linked hell then!
19:37 moritz that's all pretty standard for build systems these days
19:37 colomon it’s all very straightforward until something goes wrong.  ;)
19:37 moritz that too :-)
19:37 mscha joined #perl6
19:38 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 )
19:38 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
19:39 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
19:39 colomon (not so much build systems there, but still meta-ish and off topic)
19:39 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
19:39 DrForr Yep, Docker's been almost trivially rewritten in bash, for example.
19:39 masak colomon: I have private github repos, but I'm not sure what you're asking about.
19:39 AlexDaniel joined #perl6
19:39 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
19:39 colomon hoelzro: any gotchas?
19:39 tokuhiro_ joined #perl6
19:40 TEttinger colomon: private repos don't count towards github streak
19:40 moritz s/seem/see them/
19:40 hoelzro colomon: none that I can really think of, but I might just not notice
19:40 domidumont joined #perl6
19:40 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:41 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.
19:41 TEttinger colomon: you could host your own gitlab
19:41 TEttinger (get some more security)
19:41 TEttinger (or possibly less)
19:41 dalek roast: 73e9c36 | jnthn++ | S12-methods/defer-call.t:
19:41 dalek roast: Test callwith/callsame with nowhere to defer.
19:41 dalek roast: review: https://github.com/perl6/roast/commit/73e9c36943
19:42 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.
19:42 TEttinger haha
19:42 flussence What's the failure mode for private gh repos if you downgrade to a free account? Do they become readonly, inaccessible, or public?
19:42 colomon moritz: the only reason I want to move from my current setup is to get issue tracking.  :0
19:42 colomon :)
19:42 moritz colomon: oh well :-)
19:43 n0tjack joined #perl6
19:43 dalek roast: 0b1f547 | jnthn++ | S12-methods/defer-next.t:
19:43 dalek roast: Remove an incorrect deferal test.
19:43 dalek roast: review: https://github.com/perl6/roast/commit/0b1f547d93
19:45 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!
19:45 arnsholt The frontend crashed, complaining about an invalid signature =D
19:45 pink_mist github seems to be rolling out a new UI
19:45 pink_mist not sure how I feel about it yet
19:46 flussence also the tarball urls in gitlab aren't deterministic, which is pretty bad
19:47 mspo flussence: github isn't much better about it (but I think they're getting better?)
19:48 mspo flussence: the best is that the tarballs are autogenerated so they don't have a consistent checksum
19:49 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:50 timotimo arnsholt: progress! :)
19:50 arnsholt I know! =D
19:51 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
19:51 * ZoffixW is bummed out
19:52 mspo flussence: yeah pkgsrc eventually figured it out too
19:52 mspo flussence: I think they stabilized the fetch api in the last ~year
19:52 moritz (our ops team thought that was a good idea, for easy backupability; it was slooooooow)
19:52 mspo git it kind of slow generally
19:52 mspo especially if you have a bigger repo
19:53 mspo 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!
19:53 ZoffixW \o/
19:53 mspo moritz: nfs is an interesting case, though
19:54 mspo moritz: I wonder if it was all of the locking that slowed it down.  Did repacking make it faster?
19:55 jnthn ZoffixW: It's 'cus we end up recomputing the entire set of NFAs for the Perl 6 grammar.
19:55 ZoffixW :(
19:55 jnthn ZoffixW: And fixing it involves doing dependency analysis between them
19:56 dalek rakudo/curli: 36dba7f | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
19:56 dalek rakudo/curli: Store source files in the sources subdirectory of the repo
19:56 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/36dba7f491
19:56 jnthn Which is going to be a good bit of work.
19:56 ZoffixW jnthn, does that mean even if I precompile this module, I'll still have this huge delay?
19:56 jnthn ZoffixW: No, it's a compile time delay only
19:56 ZoffixW Ah, *phew* :)
19:56 jnthn ZoffixW: Well, though it's possible importing them will cause issues if the importer isn't pre-compiled
19:56 * 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
19:57 * 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 :)
19:57 timotimo arnsholt: sweet! glad to hear it!
19:57 timotimo (added a third low-hanging fruit to the weekly post)
19:57 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:59 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
20:00 TimToady and if there's a false positive because the language shifted too much, it'll never become official
20:00 dalek rakudo/nom: 7c6a55e | jnthn++ | src/core/control.pm:
20:00 dalek rakudo/nom: nextsame/nextwith should always cause a return
20:00 dalek rakudo/nom:
20:00 dalek rakudo/nom: Even in the case they have nowhere to go.
20:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7c6a55e964
20:00 TimToady the other approach is to do things lazily
20:01 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 #perl6
20:01 jnthn Similar for the other categories
20:02 dalek roast: 7eca0e4 | jnthn++ | S12-methods/defer-next.t:
20:02 dalek roast: Test nextsame/nextwith with nowhere to defer.
20:02 dalek roast: review: https://github.com/perl6/roast/commit/7eca0e4f48
20:02 dalek roast: fb3c699 | jnthn++ | S12-methods/lastcall.t:
20:02 dalek roast: Chase updated nextwith/nextsame semantics.
20:02 dalek roast: review: https://github.com/perl6/roast/commit/fb3c699e9b
20:03 autarch joined #perl6
20:03 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)]␤»
20:03 ZoffixW Isn't ^ that equivalent to what I have here https://github.com/zoffixznet/perl6-​Color/blob/master/lib/Color.pm6#L254 (the op() sub is defined right below, L275). For some reason I'm getting this error: http://fpaste.scsys.co.uk/501608 (Cannot call new(Color: Int, Int, Int, Int);)
20:03 ZoffixW er
20:04 cgfbee joined #perl6
20:04 ZoffixW the $foo_foo that is :)
20:05 ZoffixW 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 #perl6
20:06 jnthn nine: Yeah, you're right
20:07 jnthn 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
20:07 psch ZoffixW: that's probably not related to your question though :)
20:07 ZoffixW psch, wow! That's awesome
20:08 psch ZoffixW: oh, wait
20:08 psch ZoffixW: it's a string, so you have to do ::('&' ~ $op)
20:08 jnthn Down to 43 xmas :)
20:09 psch ...plus the infix stuff :/
20:09 psch hm
20:09 ZoffixW jnthn++
20:09 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
20:09 camelia rakudo-moar a662e0: OUTPUT«foozled␤True␤»
20:10 psch ZoffixW: ^^^ that's how it *actually* works... :S
20:10 ZoffixW :) Thanks
20:10 cygx btw, have there been any thoughts on loading modules from non-file sources in general and embedded bytecode data specifically?
20:11 cygx I added 'virtual files' to MoarVM some time ago (cf https://github.com/MoarVM/MoarVM/c​ompare/master...cygx:virtualfiles ) which worked great with NQP, but Rakudo did not like it...
20:12 jdv79 jnthn: thanks
20:12 jnthn TimToady: Next ticket that I'd like a ruling on: https://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)
20:12 jnthn TimToady: Related is what .? should do if the thing it finds is a multi.
20:12 Amnez777 joined #perl6
20:13 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 TimToady so .? and .* would only see protos
20:13 jnthn Right, that's how it works today
20:13 TimToady don't have a strong rationalization for it
20:13 jnthn Though, this can happen:
20:13 Amnez777 joined #perl6
20:14 dalek rakudo/curli: b1b04ee | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
20:14 dalek rakudo/curli: Lock the repository on installation
20:14 dalek rakudo/curli:
20:14 dalek rakudo/curli: Note that this does not actually help concurrency yet, since we still read the
20:14 dalek rakudo/curli: MANIFEST file in BUILD.
20:14 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/b1b04ee64e
20:14 jnthn m: class A { multi m(Cool) { say "cool" }; }; class B { multi m(Int) { say "int" } }; B.m("")
20:14 camelia rakudo-moar 7c6a55: OUTPUT«Method 'm' not found for invocant of class 'B'␤  in block <unit> at /tmp/fkIGKNl04O:1␤␤»
20:14 jnthn oops
20:14 jnthn m: class A { multi method m(Cool) { say "cool" }; }; class B is A { multi method m(Int) { say "int" } }; B.m("")
20:14 camelia rakudo-moar 7c6a55: OUTPUT«cool␤»
20:15 jnthn 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␤cool␤»
20:15 TimToady seems like a duck-typing decision
20:15 jnthn You get it twice 'cus the dispatch list is cloned during inheritance
20:15 jnthn *inheritance
20:16 ZoffixW Found my problem:
20:16 ZoffixW 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
20:16 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:18 TimToady well, writing group breaking up, so --> home
20:19 * 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: http://fpaste.scsys.co.uk/501610
20:19 jnthn masak: You filed https://rt.perl.org/Ticket/Display.html?id=119193 so may want to chime in on ^^ discussion :)
20:19 TimToady certainly the original concept was that those only are for calling a set of methods that know they're being called that way
20:20 [Coke] jnthn: is https://rt.perl.org/Ticket/Display.html?id=123808 moot post-GLR?
20:20 jnthn m: my $a = 42; say <<$a b c>>;
20:20 camelia rakudo-moar 7c6a55: OUTPUT«(42 b c)␤»
20:21 jnthn m: my $a = 42; say qqww{$a b c};
20:21 camelia rakudo-moar 7c6a55: OUTPUT«(42 b c)␤»
20:21 jnthn m: my $a = 42; say qqw{$a b c};
20:21 camelia rakudo-moar 7c6a55: OUTPUT«[42 b c]␤»
20:21 jnthn hmm
20:21 autarch anyone have any thoughts on this code ... https://github.com/autarch/perl6-Pod-NodeWalker - in particular, are these the right class & role names - also, is the code idiomatic?
20:21 TimToady there's a sense in which .* and .+ really only make sense on submethody semantics
20:21 Hotkeys_ > my $fh = open("C:/John/three", :w);
20:21 Hotkeys_ Failed to open file C:\John\three: no such file or directory
20:21 Hotkeys_ Shouldn't it create the file?
20:21 vendethiel what's .+ ?
20:21 jnthn m: my $a = 42; say .WHAT for <<$a b c>>, qqww{$a b c}, qqw{$a b c}
20:21 camelia rakudo-moar 7c6a55: OUTPUT«(List)␤(List)␤(Array)␤»
20:22 Hotkeys_ or am I missing something
20:22 jnthn [Coke]: Bit dubious that the last one is Array, not List too
20:22 ZoffixW Hotkeys, maybe 'John' dir doesn't exist?
20:22 [Coke] I'll add that to the ticket. Thanks.
20:22 Hotkeys oh
20:22 Hotkeys oops
20:22 Hotkeys you're right
20:22 ZoffixW \o/
20:22 jnthn TimToady: Good point on the link with submethods.
20:22 Hotkeys it's /Users/John
20:23 DrForr Good thing, otherwise 'C' would be a dir John letter.
20:24 Hotkeys lol
20:25 n0tjack ha
20:25 Hotkeys that took me a second
20:25 [Coke] jnthn++
20:27 * 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 TimToady s/ranges/sequences/
20:27 TimToady but ranges delegation to sequences
20:27 TimToady *gate
20:28 TimToady 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
20:28 TimToady well, that's the question
20:28 TimToady if you start at 1.0, or 1.00, or 1.000...
20:28 [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)␤»
20:29 [Coke] TimToady: that's all going to get constant folded, no?
20:29 TimToady but it could intuit a step based on the precision without the second value
20:29 Hotkeys m: say 1.01, 1.02, ... 10
20:29 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 …»
20:29 Hotkeys m: say 1.01, 1.02 ... 10
20:29 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 …»
20:30 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.
20:30 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
20:30 n0tjack m: say 100 RX/ 100 ... 1000;
20:30 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…»
20:30 Hotkeys I assume people would mean step by .1 (etc) over step by 1 in that case more often
20:30 Hotkeys so they could still have the second value to step by 1
20:30 TimToady yes, I think this would optimize for the common expectation
20:31 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…»
20:31 n0tjack hmm, why does RX/ not do what I expect it to do?
20:31 TimToady it wasn't possible before I put in lazy Rat reduction, but now we could
20:31 n0tjack oh wait
20:31 n0tjack m: say 100 XR/ 100 ... 1000;
20:31 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…»
20:31 TimToady read the error message :)
20:32 n0tjack you know, programming languages to date have trained me very hard to ignore error messages :)
20:33 n0tjack 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 n0tjack m: 100 XR/ (100 ... 1000);
20:33 camelia rakudo-moar 7c6a55: ( no output )
20:33 n0tjack m: say 100 XR/ (100 ... 1000);
20:33 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…»
20:34 TimToady change of venue &
20:34 dalek rakudo/curli: 3eac879 | (Stefan Seifert)++ | src/core/ (2 files):
20:34 dalek rakudo/curli: Deny installation of already installed distributions
20:34 dalek rakudo/curli:
20:34 dalek rakudo/curli: Distributions (identified by name, auth, version and api) should be immutable so
20:34 dalek rakudo/curli: there's no sense in installing it multiple times.
20:34 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/3eac879b00
20:41 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 espadrine_ joined #perl6
20:42 * PerlJam finally watched TimToady on twit.tv
20:42 PerlJam The new perl6.org got some air time
20:43 ZoffixW neat
20:43 vendethiel PerlJam: twit.tv?
20:44 PerlJam https://twit.tv/shows/triangulation/episodes/225
20:44 grondilu lol what is that?  SNL for geeks?
20:45 geraud joined #perl6
20:46 diana_olhovik joined #perl6
20:48 vendethiel PerlJam: the guy seems to be speaking a lot about himself though
20:49 PerlJam which guy? :)
20:50 vendethiel the interview one. The other one might be, but then, that's what we want him to do!
20:53 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 ZoffixW Huh? How do I set Bool attributes?
20:54 ZoffixW Oh, rw
20:55 ZoffixW Hm, nope
20:55 ZoffixW m: class Foo { has Bool $.bar is rw; }; my $c = Foo.new; $c.bar(True)
20:55 camelia rakudo-moar 7c6a55: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at /tmp/2e3wh5jCGu:1␤␤»
20:55 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  :)
20:55 autarch m: class Foo { has Bool $.bar is rw; }; my $c = Foo.new; $c.bar = True
20:55 camelia rakudo-moar 7c6a55: ( no output )
20:55 autarch m: class Foo { has Bool $.bar is rw; }; my $c = Foo.new; $c.bar = True; say $c.bar
20:55 camelia rakudo-moar 7c6a55: OUTPUT«True␤»
20:56 autarch ZoffixW: ^
20:56 ZoffixW Thanks, autarch++
20:56 autarch attributes != methods - of course you could make a private attribute and a public setter
20:56 autarch and I hope that it's possible to write a metaclass that does things like that for you automatically
21:00 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
21:00 Hotkeys I remember him from "The Lab with Leo Laporte"
21:02 * ZoffixW nerdgasms over .?
21:02 ZoffixW I so so so miss it in P5
21:02 jonas1 joined #perl6
21:03 psch humm, some kind of progress, at least...
21:03 psch nine: moving the add_multi_method calls for pick and roll out of BEGIN time makes bool_enum work
21:03 nine psch: !!!
21:03 psch nine: i'm pretty sure that's not a solution, though
21:04 psch 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
21:04 psch as in, BEGIN time doesn't have enough lexical scopes or somesuch...
21:04 psch 'cause that's what caused the (then) SEGV
21:05 psch 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"
21:05 camelia rakudo-moar 7c6a55: OUTPUT«(233)␤»
21:05 camelia ..rakudo-jvm 7c6a55: OUTPUT«(101 769)␤»
21:05 xfix What should it return?
21:05 [Tux] joined #perl6
21:05 xfix (I feel myself that JVM's answer is correct here)
21:06 dalek rakudo/curli: c0fb3bf | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
21:06 dalek rakudo/curli: Create and update a short-name quick lookup file for each module
21:06 dalek rakudo/curli:
21:06 dalek rakudo/curli: The quick lookup file contains the ids of the distributions containing a module
21:06 dalek rakudo/curli: by with the same short-name. With this we will only need to load those
21:06 dalek rakudo/curli: distribution's meta data when loading a module. Thus our startup time will no
21:06 dalek rakudo/curli: longer depend on the number of installed modules.
21:06 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/c0fb3bfbd0
21:06 pink_mist xfix: no
21:06 xfix Eh, perhaps that was a bad example.
21:06 pink_mist xfix: \x301 is a combining codepoint, so perl6 treats it as one character, and normalised that'd be what moar says
21:08 xfix perl6: say ords ".\x[301]"
21:08 camelia rakudo-moar 7c6a55: OUTPUT«(46)␤»
21:08 camelia ..rakudo-jvm 7c6a55: OUTPUT«(46 769)␤»
21:08 xfix I don't think that losing combining characters is a good thing however.
21:08 xfix Like, ords doesn't really work on graphemes.
21:08 xfix Or does it? (this is confusing...)
21:09 psch m: say ".\x[301]".NFC
21:09 camelia rakudo-moar 7c6a55: OUTPUT«NFC:0x<002e 0301>␤»
21:09 arnsholt I'm inclined to say that ord on a synthetic codepoint should throw an exception
21:09 xfix I understand that .\x[301] may be a one grapheme, but... ords returns codepoints, not graphemes.
21:10 xfix Or was that "\x[301]."? Combining characters are confusing.
21:10 cygx m: $*VM.version
21:10 camelia rakudo-moar 7c6a55: ( no output )
21:10 cygx m: say $*VM.version
21:10 camelia rakudo-moar 7c6a55: OUTPUT«v2015.10.103.gaf.3.b.12.e␤»
21:11 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
21:12 xfix That's what it should IMO.
21:13 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.
21:13 ZoffixW cygx, IIRC the ords stuff was very recently worked on
21:13 ZoffixW (and the docs might not be updated; and your VM might be outdated)
21:14 jdv79 MadcapJake: what is that?
21:14 cygx ZoffixW: the docs match Camelia behaviour, so it's probably my local build being out of date
21:15 hankache hello everybody
21:15 cygx o/
21:15 jdv79 the "real"? spec is for META6.json in S22
21:15 ZoffixW Ehhh... how do I get around this error? "Package Color is insufficiently type-like to qualify a parameter"
21:15 MadcapJake jdv79: https://github.com/perl6/eco​system/blob/master/spec.pod
21:15 ZoffixW S22
21:15 ZoffixW #S22
21:15 hankache what is an enum?
21:15 psch ZoffixW: make it a class :)
21:15 jdv79 that looks outdated
21:16 hankache i can see that Int is a class
21:16 hankache but Bool is an enum
21:16 jdv79 but probably what panda uses - idk
21:16 RabidGravy MadcapJake, if you find any please PR https://github.com/jonathanstowe/META6 ;-)
21:16 MadcapJake well i'm not worried about the real spec more what people use which is `META.info`,
21:17 ZoffixW psch, I have: https://github.com/zoffixznet/perl6​-Color/blob/master/lib/Color.pm6#L2 and I'm trying to use it in another file: https://github.com/zoffixznet/perl6-Colo​r/blob/master/lib/Color/Operators.pm6#L3
21:17 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
21:17 dalek rakudo/curli: ad1b8a9 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
21:17 dalek rakudo/curli: Use the quick lookup file to find dist candidates when loading a module
21:17 dalek rakudo/curli:
21:17 dalek rakudo/curli: CompUnit::Repository::Installation::need no longer uses the MANIFEST data for
21:17 dalek rakudo/curli: looking up distributions containing the needed module. Instead we use the
21:18 dalek rakudo/curli: quick lookup file to find dist candidates and load the dist's meta data out
21:18 dalek rakudo/curli: of the files in dist/.
21:18 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/ad1b8a9816
21:19 psch ZoffixW: huh.  maybe try the use before unit line?
21:19 psch +the
21:19 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
21:20 MadcapJake will `author` work in a META.info now? Or does it have to be `authors` and a list?
21:20 jnthn nine: Yes, the short name quick lookup file is for fast processing of "use Foo::Bar:ver(v2+)" style requests
21:20 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?
21:21 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
21:22 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
21:22 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
21:23 ZoffixW as for "work"... I'm dubious anything properly uses it right now..
21:23 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.
21:24 jnthn m: say ".\x[301]".ords
21:24 camelia rakudo-moar 7c6a55: OUTPUT«(46 769)␤»
21:24 nine I didn't think I would make it so far today :)
21:24 RabidGravy MadcapJake, there's at least one thing that tries author first then the first from authors
21:24 jnthn m: say ords ".\x[301]"
21:24 camelia rakudo-moar 7c6a55: OUTPUT«(46)␤»
21:24 jnthn bah, fail
21:24 jdv79 MadcapJake: what sort of highlighting are you doing?  its just json, right?
21:24 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 ZoffixW RabidGravy, what thing is it?
21:26 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
21:27 * ZoffixW grepped the ecosystem/server and modules.perl6.org builder and they don't seem to be using /authors?/ at all.
21:28 jdv79 testers looks like its using one of the fields
21:28 RabidGravy either testers or I'm mis-remembering then ;-)
21:29 MadcapJake well i've added highlighting for all the fields in the spec and in the outdated(?) ecosystem spec
21:30 dalek rakudo/nom: 1dba450 | jnthn++ | src/core/Str.pm:
21:30 dalek rakudo/nom: Toss duplicate and wrong .ords impl.
21:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1dba450627
21:30 dalek roast: befe2ef | jnthn++ | S32-str/ords.t:
21:30 dalek roast: Test ords with chars that'll become synthetics.
21:30 dalek roast: review: https://github.com/perl6/roast/commit/befe2efe8b
21:31 jnthn And .ord should be understood as equivalent to .ords[0] (that is, it's an operation on codepoints, not graphemes)
21:31 jnthn So it's fine doing what it does on a synthetic
21:32 * TimToady fondly remembers when people wanted to get rid of .ords :)
21:33 crucialrhyme joined #perl6
21:34 jnthn TimToady: I still happily could
21:34 jnthn TimToady: And make people write .NFC
21:35 jnthn :)
21:35 jnthn But I can live with it too
21:35 TimToady well, .NFC returns a buf, which is not quite the same as a list of integers
21:35 jnthn A Uni, in fact :)
21:36 jnthn But yes
21:36 jnthn Though .ords is currently implemetned as .NFC.list :)
21:36 TimToady could conceivably be lazy
21:36 TimToady though .ord takes away most of the reason for that
21:36 jnthn Yeah, though .NFC is done VM-level so it is fairly snappy
21:36 dalek rakudo/curli: 2c455fa | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
21:36 dalek rakudo/curli: Remove dist metadata from MANIFEST
21:36 dalek rakudo/curli:
21:36 dalek rakudo/curli: This gets us rid of the startup penalty from installed distributions.
21:36 dalek rakudo/curli: Also concurrent installation should now be safe since we read and write the
21:36 dalek rakudo/curli: MANIFEST file (only containing the file id counter) while holding the lock.
21:36 dalek rakudo/curli: review: https://github.com/rakudo/rakudo/commit/2c455fa956
21:37 jnthn m: say rand xx 5
21:37 camelia rakudo-moar 7c6a55: OUTPUT«(0.510198391363677 0.512206611744998 0.248995485131321 0.274981213493002 0.724207259820388)␤»
21:37 jnthn m: say 5 xx rand
21:37 camelia rakudo-moar 7c6a55: OUTPUT«()␤»
21:37 jnthn m: say 5 Rxx rand
21:37 camelia rakudo-moar 7c6a55: OUTPUT«(0.20712211903467 0.20712211903467 0.20712211903467 0.20712211903467 0.20712211903467)␤»
21:37 nine The largest bit missing is now invalidation of precomp files.
21:37 jnthn Should R respect thunkiness?
21:37 jnthn Is DIHWIDT?
21:38 TimToady I've argued that one both ways
21:38 jnthn We know meta-ops in general (like [||]) don't short-circuit
21:38 nine But that's for another day :)
21:38 TimToady "know"
21:38 jnthn Yes, I know, but that doesn't help me close an xmas RT :P
21:38 jnthn heh :)
21:38 TimToady we'd need to invent a thunk list to make [||] work
21:38 jnthn Right
21:38 PerlJam jnthn: I think it should (R respect thunkiness)
21:38 TimToady but the fact is, we could know the thunk profile of an operator just as we know prec/assoc
21:39 TimToady so at least for literal metas, we could do the thunks
21:39 jnthn We could. How much do we want to? :)
21:39 jnthn And which metas will it matter for?
21:39 TimToady it really comes down to, do we want it enough to prohibit the other use currently
21:40 jnthn Well, yes, there is the "ban it so we can put off the decision" option too :)
21:40 TimToady [||] kinda duplicates first :so
21:40 RabidGravy want's to get thunked up https://www.youtube.com/watch?v=BbkcWo5I_A8
21:41 tokuhiro_ joined #perl6
21:41 b^_^d is http://testers.p6c.org setup on a cron to regenerate itself?
21:41 ifim left #perl6
21:41 RabidGravy testers takes submissions from panda
21:42 RabidGravy i.e PANDA_SUBMIT_TESTREPORTS=1 panda install whatever
21:43 b^_^d oh
21:43 b^_^d I forgot about that.
21:43 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
21:44 TimToady 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:45 b^_^d RabidGravy: so if I run something now it should show up fairly quickly under recent reports?
21:46 RabidGravy yeah it submits straight away and gives you the URL of the report
21:46 b^_^d hehe: http://testers.perl6.org/reports/</html>.html
21:46 b^_^d doesn't seem good.
21:51 RabidGravy :-(
21:51 hankache how can you clear a variable?
21:52 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;
21:52 PerlJam hankache: though, that's guessing at what you really mean by "clear" :)
21:53 hankache thanks PerlJam
21:54 hankache m: my $x = 3; say $x.WHAT; $x = Nil; say $x.WHAT;
21:54 camelia rakudo-moar 1dba45: OUTPUT«(Int)␤(Any)␤»
21:54 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
21:54 hankache PerlJam that's exactly what I was looking for. Thanks a Mil
21:54 b^_^d crucialrhyme: which version of moar latest?
21:55 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:56 TimToady *made
21:56 RabidGravy crucialrhyme, that module is passing travis tests at least
21:56 crucialrhyme b^_^d: "This is MoarVM version 2015.10-103-gaf3b12e built with JIT support"
21:57 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 jnthn TimToady: I can kinda see it for R
21:58 jnthn TimToady: Others need a bit more thought
21:58 TimToady well, also allows Z=
21:59 TimToady was a very simple patch, merely force to %item_assignment if $*IN_META
21:59 jnthn *nod*
21:59 TimToady m: my $a, my $b Z= 43, 43; say $b
21:59 camelia rakudo-moar 1dba45: OUTPUT«43␤»
21:59 _aaroneous joined #perl6
21:59 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 :)
22:00 * grondilu is not sure if Z= is useful considering = already does list assignement :/
22:00 * TimToady seems to recall that grondilu despises parens :P
22:00 grondilu oh yeah there is that
22:01 vendethiel Sometimes, trying to go too crazy with optimizations make your language (here scala) go... uh... a tad weird https://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:04 stmuk_ m: say sum(1)
22:04 camelia rakudo-moar 1dba45: OUTPUT«1␤»
22:04 TimToady jnthn: one problematic area is functions that might or might not thunk: 3 Rxx <mumble>
22:04 stmuk_ m: say sum(1,2)
22:04 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)␤»
22:05 stmuk_ what is sum() (new in niceville)?
22:05 crucialrhyme RabidGravy: thanks, it still fails installing separately. i'll go post the issue
22:05 Skarsnik m: 1,2,3,4.sum()
22:05 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)␤»
22:05 Skarsnik m: (1,2,3,4).sum()
22:05 camelia rakudo-moar 1dba45: ( no output )
22:05 PerlJam stmuk_: did you mean  sum (1,2) ?
22:05 PerlJam m: sum (1,2)
22:05 camelia rakudo-moar 1dba45: ( no output )
22:06 PerlJam m: say sum (1,2)
22:06 camelia rakudo-moar 1dba45: OUTPUT«3␤»
22:06 Skarsnik m: (1,2,3,4).sum
22:06 camelia rakudo-moar 1dba45: ( no output )
22:06 Skarsnik m: say (1,2,3,4).sum
22:06 camelia rakudo-moar 1dba45: OUTPUT«10␤»
22:06 Skarsnik I am dumb
22:06 jnthn TimToady: The non-thunk cases are just an optimization, though
22:06 jnthn TimToady: Oh, but you mean, with such a trait
22:06 TimToady troo
22:06 jnthn Yes, issue.
22:06 jnthn All thunks have specialized code-gen
22:06 stmuk_ PerlJam: I'm trying to see why JSON::RPC tests now fail
22:07 stmuk_ there was no sum() in niceville
22:07 jnthn I guess Rxx will be rare enough that we can always thunk...
22:07 stmuk_ note not .sum
22:08 stmuk_ m: sum(1)
22:08 camelia rakudo-moar 1dba45: ( no output )
22:08 Skarsnik m: say sum(1)
22:08 camelia rakudo-moar 1dba45: OUTPUT«1␤»
22:08 TimToady m: say sum;
22:08 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;␤»
22:09 TimToady hmm
22:09 stmuk_ niceville has "Undeclared routine" for sum()
22:09 TimToady yes, 'cuz I just added it a day or three ago
22:10 stmuk_ ah so refs to sum() in JSON::RPC probably need changing
22:12 TimToady I assume it's doing something other than the new sum function?
22:12 TimToady one could rely on lexical shadowing, I suppose
22:12 TimToady [+] would still delegate properly to Any::sum
22:14 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 timotimo Inline::Python also got confused by the addition of .sum :)
22:15 PerlJam That's weird.
22:16 timotimo arnsholt: didn't you say the tests of Net::ZMQ were fixed? i still can't install it via panda :(
22:17 dalek rakudo/nom: eea43c3 | TimToady++ | src/core/Any.pm:
22:17 dalek rakudo/nom: handle degenerate cases of sum() more correctly
22:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eea43c3ff1
22:17 RabidGravy I had it workin a bit back
22:17 rurban joined #perl6
22:18 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 TimToady and I suspect [+] is likely the most common reduction in use
22:19 * 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
22:21 jnthn .oO( I wondered if such reasoning ised applied... )
22:27 ZoffixW Does anyone see anything wrong with this call? https://github.com/zoffixznet/perl6-​Color/blob/master/t/05-methods.t#L52
22:27 virtualsue joined #perl6
22:28 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 (https://github.com/rakudo/rakudo/blob/no​m/src/core/Any-iterable-methods.pm#L924)
22:28 ZoffixW timotimo, ohhh..
22:28 timotimo :)
22:28 bartolin I created a PR which should give a clean state again: https://github.com/rakudo/rakudo/pull/589
22:28 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 timotimo :)
22:29 bartolin it would be nice, if someone double checks my findings ...
22:30 Skarsnik you should bgr(a)
22:31 TimToady m: say sum;
22:31 camelia rakudo-moar eea43c: OUTPUT«0␤»
22:31 TimToady m: say sum 1,2;
22:31 timotimo bartolin: huh, it's only the -1 that got changed to a 0?
22:31 camelia rakudo-moar eea43c: OUTPUT«3␤»
22:32 timotimo m: say (9, 1, 2, 3, 4).sort
22:32 camelia rakudo-moar eea43c: OUTPUT«(1 2 3 4 9)␤»
22:32 dalek ecosystem: 6047c97 | (Zoffix Znet)++ | META.list:
22:32 dalek ecosystem: Add Color to ecosystem
22:32 dalek ecosystem:
22:32 dalek ecosystem: Format conversion, manipulation, and math operations on colours: https://github.com/zoffixznet/perl6-Color
22:32 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/6047c97e02
22:32 ZoffixW Yeeey \o/ finally shipped this baby :) Thanks all for the help :P
22:32 ZoffixW Beer time!
22:32 Skarsnik :)
22:32 bartolin timotimo: yes, but commit f0c6a02c also changed the while construct 4 lines below
22:33 bartolin timotimo: and that was not reverted
22:33 timotimo ah, because postfix while executes the ++$i before doing the body once
22:33 timotimo and that'll get our indices started at 0 rather than 1
22:33 timotimo i can see why that would be correct, i'm a little surprised it didn't bust anything; perhaps our lists start out zeroed?
22:34 bartolin timotimo: I tried to test the code in separation and it looks we got (Any) instead of 0
22:35 bartolin 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));
22:35 camelia rakudo-moar eea43c: OUTPUT«1␤»
22:35 timotimo it's an nqp-level null, so probably VMNull on moar
22:35 timotimo it's probable that it only works by accident
22:35 bartolin just a moment, I'll create a gist
22:36 dalek rakudo/nom: 5da0b3f | usev6++ | src/core/Any-iterable-methods.pm:
22:36 dalek rakudo/nom: Fix initial value for index variable
22:36 dalek rakudo/nom:
22:36 dalek rakudo/nom: This index variable was wrongly initialized to 0 with commit 019a7ff7.
22:36 dalek rakudo/nom:
22:36 dalek rakudo/nom: Said commit reverted commit f0c6a02c, but in this specific case some
22:36 dalek rakudo/nom: related code was changed in the meantime with commit 3bbc9222. That
22:36 dalek rakudo/nom: lead to a situation where the corresponding change to the 'while'
22:36 dalek rakudo/nom: clause 4 lines below was not reverted -- only the initialization of $i.
22:36 dalek rakudo/nom:
22:36 dalek rakudo/nom: This lead to some fallout on rakudo.jvm: Even '1.sort' resulted in
22:36 dalek rakudo/nom: a Null Pointer Exception. On rakudo.moar there seemed to be no
22:36 dalek rakudo/nom: spectest fallout.
22:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5da0b3faed
22:36 dalek rakudo/nom: 1ca52fc | timo++ | src/core/Any-iterable-methods.pm:
22:36 dalek rakudo/nom: Merge pull request #589 from usev6/sort_indices
22:36 dalek rakudo/nom:
22:36 dalek rakudo/nom: Fix initial value for index variable
22:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1ca52fc70c
22:36 timotimo too late, i already merged it ^^
22:37 bartolin timotimo: https://gist.github.com/usev6/132c79cefca8ce12607d
22:37 bartolin thanks :-)
22:39 timotimo that sort method could perhaps use an nqp::list_i instead. i wonder why we don't do that already?
22:40 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␤»
22:40 timotimo m: use nqp; my Mu $l := nqp::list_i(); nqp::setelems($l, 4); say nqp::atpos_i($l, 0);
22:40 camelia rakudo-moar eea43c: OUTPUT«0␤»
22:40 timotimo m: use nqp; my Mu $l := nqp::list_i(); nqp::setelems($l, 4); say nqp::atpos_i($l, 1);
22:40 camelia rakudo-moar eea43c: OUTPUT«0␤»
22:40 bartolin timotimo: I extracted the code from src/core/Any-iterable-methods.pm
22:40 timotimo that seems to be zero-initialized for us, so we can even start with $i at 1 instead of 0 :)
22:41 timotimo that'll probably give us a tremendous speed boost when sorting 1-element lists!!
22:41 lucs (meant ${x})
22:41 timotimo m: my $x = '123'; say q:s/Foo$($x)Bar/;
22:41 camelia rakudo-moar eea43c: OUTPUT«Foo123Bar␤»
22:42 lucs Oh, neat, thanks.
22:42 kjs_ joined #perl6
22:42 timotimo :)
22:45 bartolin g'night, #perl6
22:45 timotimo gnite bartolin, and thanks for your patch :)
22:54 b^_^d timotimo: thanks for the blog post!
22:54 timotimo you're welcome!
22:55 doublec_ joined #perl6
22:55 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:56 sufrosti1o joined #perl6
22:58 Skarsnik panda givemelink Acme
23:00 timotimo no, what i want is something i can copy-paste a link with the proper text from into the WYSIWYG editor
23:00 timotimo terminal won't do
23:02 cygx .oO(you can't copy from a terminal?)
23:03 timotimo i can, but it won't give me a clickable link
23:03 timotimo 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 ...
23:03 timotimo by go back i mean scroll all the way to the top, change to wysiwyg, scroll back down to where i was
23:04 Skarsnik maybe a browser extension?
23:05 cygx seems that could be hacked together rather quickly in JS, taking data from http://modules.perl6.org/proto.json
23:05 timotimo dunno
23:06 timotimo i don't do excessive amounts of JS :)
23:07 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 #perl6
23:08 timotimo i want to input a bunch of module names
23:10 RabidGravy or a chrome plugin
23:10 sufrostico joined #perl6
23:10 timotimo bbiab
23:10 Skarsnik A nice script will take you the weekly new addition on ecosystem, give you the url/description x)
23:10 RabidGravy highlight a module name, look it up on modules, substitite the linkiness
23:11 sufrosti1o joined #perl6
23:13 RabidGravy software so many options
23:16 ZoffixMobile joined #perl6
23:18 ZoffixMobile timotimo, fwiw, the mojo-app branch will support http://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:22 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:25 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 ZoffixMobile *added them
23:25 RabidGravy somehow my brain cannot retain number -> symbol relations, I can't really remember ascii after using it for thirty something years
23:25 ZoffixMobile heh
23:26 Skarsnik Zoffix, you should add YUV and BGR(A) for your Color module :)
23:26 ZoffixMobile Skarsnik, thanks. I will :)
23:27 Skarsnik like targa image file (.tga) is bgr if I remember correctly.
23:28 RabidGravy it would be cool if there was a good way of shipping key definitions like that with the module :)
23:30 RabidGravy do-able for Linux I guess but who knows if it's even possibly with windows
23:32 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 Skarsnik it so confusing xD
23:33 sno joined #perl6
23:41 n0tjack joined #perl6
23:42 tokuhiro_ joined #perl6
23:48 Hotkeys Skarsnik: is it done like that because it's alphabetical lol
23:48 Skarsnik ahah I never thought about that
23:48 Hotkeys still a silly reason when rgb is standard
23:49 cygx Zoffix: btw, your twitter image with the formula vs p6 has an error in it
23:49 cygx on the left, we have L = /C_max + C_min)/2, on the right, (C_max - C_min)/2
23:50 cygx * L = (C_max + C_min)/2
23:50 Zoffix cygx, yeah. It took me about 5 minutes of debugging to spot that
23:50 cygx glad I could help you out there after the fact :p
23:50 Zoffix :P
23:51 Zoffix cygx, and I actually simplified that code by tossing both Δs: https://github.com/zoffixznet/perl6-​Color/blob/master/lib/Color.pm6#L234
23:52 Zoffix (and https://github.com/zoffixznet/perl6-​Color/blob/master/lib/Color.pm6#L153)
23:52 Zoffix 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
23:53 Zoffix (we're talking about this, if anyone's curious: https://twitter.com/zoffix​/status/666369101766397952 )
23:53 Zoffix s/tossing both Δs/tossing both ternaries/;
23:54 cygx Zoffix: perhaps to deal with 0/0 if L is 1 or 0?
23:54 cygx (can that happen?)
23:55 skids joined #perl6
23:55 Zoffix cygx, oh, thanks for spotting a bug in my module!
23:55 Zoffix Yeah, it will be 0/0 for black RGB
23:56 Zoffix cygx++
23:56 cygx glad to be of service, this time before you invested time in debugging ;)
23:56 Zoffix \o/
23:57 Skarsnik I really love the delta symbol in the code ^^
23:57 Zoffix Me too :)
23:59 ugexe landed another year long perl6 contract \o/
23:59 Zoffix ugexe++
23:59 Zoffix awesome
23:59 cygx Zoffix: if I read the fomula correctly, it not only fails for black, but also for white
23:59 Skarsnik if you want to please my lazyness you need a parse-hex() where I can write parse-hex('AABBCCDD', 'abgr')
23:59 timotimo whoa
23:59 timotimo neato

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo