Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-08-16

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:16 cognominal joined #perl6
00:32 aborazmeh joined #perl6
00:32 aborazmeh joined #perl6
00:45 tinyblak joined #perl6
00:59 llfourn joined #perl6
01:36 dalek rakudo/glr: 91b2dd6 | skids++ | src/core/native_array.pm:
01:36 dalek rakudo/glr: Add temporary short-circuits to "array" preventing some test hangs.
01:36 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/91b2dd6fe0
01:36 dalek rakudo/glr: 8450fbb | skids++ | src/core/Array.pm:
01:36 dalek rakudo/glr: s/$!items/$!reified/ in typed array BIND-POS.
01:36 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/8450fbb08c
01:36 dalek rakudo/glr: 76b71ca | lizmat++ | src/core/ (2 files):
01:36 dalek rakudo/glr: Merge pull request #495 from skids/glr
01:36 dalek rakudo/glr:
01:36 dalek rakudo/glr: Add temporary short-circuits to "array" preventing some test hangs.
01:36 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/76b71ca560
01:36 rangerprice joined #perl6
01:37 rangerprice Hi
01:40 dha joined #perl6
01:42 virtualsue joined #perl6
01:46 ilbot3 joined #perl6
01:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
01:47 skids joined #perl6
01:54 Zoffix hi
01:58 Peter_R joined #perl6
02:00 eam joined #perl6
02:03 dha hi
02:07 dalek rakudo/glr: 8a7b83f | lizmat++ | src/core/Cool.pm:
02:07 dalek rakudo/glr: Undo special tests for index/rindex/indices
02:07 dalek rakudo/glr:
02:07 dalek rakudo/glr: The test should really live in nqp::unbox_i, as mentioned in
02:07 dalek rakudo/glr: http://irclog.perlgeek.de/perl6/2015-08-15#i_11061969
02:07 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/8a7b83f0d8
02:10 lizmat dha o/
02:10 lizmat Zoffix o/
02:10 lizmat rangerprice o/
02:11 dha lizmat-  why are you awake? :-)
02:12 lizmat because it's 11am here, in Tokyo
02:12 dha Ah!
02:12 * dha can't keep track of lizmat's location...
02:12 * lizmat has a hard time as well
02:12 lizmat in 2 weeks, it'll be Switzerland
02:12 ShimmerFairy .oO(Where in the World is lizmat Sandiego?)
02:12 lizmat and the week after that Spain
02:12 dha If This Is Tuesday, It Must Be Belgium.
02:13 dha ShimmerFairy++
02:13 lizmat If It's Wednesday, This Must Be Rome  :-)
02:13 dha lizmat++
02:13 lizmat dha++
02:13 ShimmerFairy lizmat++  dha++  :)
02:14 dha Most people do not get that reference. they jsut think I'm crazy.
02:14 dha Granted, I'm sort of used to that...
02:15 lizmat yeah...  know the feeling :-)
02:15 dha Huh. Never realized that was written by Donovan.
02:15 lizmat was it ?
02:15 lizmat or does he claims he wrote it ?
02:15 lizmat :-)
02:18 dha Apparently, he did write it, but the version in the movie is by someone else.
02:31 noganex joined #perl6
03:00 llfourn joined #perl6
03:10 ugexe this helps fix CURLI.install on glr if a better idea isn't needed https://github.com/ugexe/rakudo/commit/d1738017ed2d66b91139d33a4c4f92907839a31f
03:12 ugexe that and %*CUSTOM_LIB<site> isn't getting created, so you get the no writable path error unless you manually create it
03:50 lizmat finally remembered the singer who made it famous in NL: Bojoura
03:50 lizmat https://www.youtube.com/watch?v=iB16qJmJGA8
04:01 dalek roast/glr: 1c77dca | lizmat++ | S17-supply/lines.t:
04:01 dalek roast/glr: Fix because <a b c> does not flatten inside []
04:01 dalek roast/glr: review: https://github.com/perl6/roast/commit/1c77dca177
04:02 dha Aparrently J. P. Rags did the version in the film, although Donovan is credited as "Singer in Youth Hostel"
04:08 llfourn joined #perl6
04:12 lizmat $ 6 '1...10'
04:12 lizmat Type check failed in binding; expected 'Positional' but got 'Seq'
04:13 lizmat jnthn: fixing that in SEQUENCE will probably make a lot of tests pass  :-)
04:17 lizmat perhaps the underlying issue: $ 6 'say (10,).list.flat.WHAT'
04:17 lizmat (Seq)
04:17 lizmat afk for sightseeing&
04:21 dha have fun
04:38 aborazmeh joined #perl6
04:38 aborazmeh joined #perl6
05:02 aborazmeh joined #perl6
05:02 aborazmeh joined #perl6
05:09 kaare_ joined #perl6
05:52 jack_rabbit joined #perl6
06:14 tinyblak joined #perl6
06:36 tinyblak_ joined #perl6
06:37 domidumont joined #perl6
06:42 domidumont joined #perl6
06:52 rurban joined #perl6
07:07 ilbot3 joined #perl6
07:07 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
07:07 nine dinesh_: that's a tough one. It very much depends on what you are learning it for?
07:09 dinesh_ @nine .. i want to contribute to perl too as i do some production coding..
07:11 JimmyZ learn both, and use whatever you want :P
07:14 silug_ joined #perl6
07:14 nine My answer would be: Perl 5 is currently the better career path. Perl 6 is more fun for me :)
07:17 nine Learning both is probably a sensible path. With both you have all the features of Perl 6 and all of CPAN available to you.
07:18 dinesh_ thanks @nine and @JimmyZ ...
07:19 llfourn learning http://mojolicio.us/ is probably what i would recommend to someone wanting to learn and get things done at the same time
07:22 dinesh_ i'll start with learning perl and come to perl 6 gradually .. coz learning fundamentals  & laying foundation makes more sense that will help me in contributing to the language in coming future ..thanks @llfourn
07:22 llfourn dinesh_: sounds good to me :)
07:25 RabidGravy joined #perl6
07:37 dalek roast/glr: 9aa1eef | (Stefan Seifert)++ | S17-promise/allof.t:
07:37 dalek roast/glr: Fix hang in S17-promise/allof.t
07:37 dalek roast/glr:
07:37 dalek roast/glr: Need to flatten explicitely to avoid creating a self-referencing array.
07:37 dalek roast/glr: review: https://github.com/perl6/roast/commit/9aa1eef47e
07:48 Alina-malina joined #perl6
07:48 dinesh_ left #perl6
07:53 ChoHag joined #perl6
07:55 ChoHag I want to create a class which on the face of it is a list/array, primarily to be able to access elements positionally. Would it be 'better' (FSVO) to do this by extending List (or Array), or by creating a bog standard class with an overridden [] method?
07:58 tinyblak joined #perl6
08:00 rindolf joined #perl6
08:01 [Tux] http://tux.nl/Files/20150816100056.png
08:03 [Tux] panda not yet supported for glr?
08:03 RabidGravy ChoHag, some variant of the latter, make it a Positional and implement AT-POS etc as per http://docs.perl6.org/language/subscripts#Methods_to_implement_for_positional_subscripting
08:04 [Tux] note: my rakudobrew home is NOT ~/.perl6
08:09 [Tux] (or ~/.rakudobrew)
08:09 [Tux] if I create the folder by hand, it still fails
08:09 * [Tux] switches back to moar-nom
08:10 ShimmerFairy [Tux]: I'd be very surprised if panda (not to mention most things) worked on glr yet
08:10 [Tux] there is no harm in trying, right? :)
08:11 ShimmerFairy :)
08:15 rhr joined #perl6
08:18 llfourn joined #perl6
08:21 [Tux] Oh my. Entering utf-8 in git issues causes bad display in preview
08:22 [Tux] but it shows correct when submitted
08:22 isBEKaml joined #perl6
08:24 darutoko joined #perl6
08:26 rurban joined #perl6
08:35 eam joined #perl6
08:40 nine ChoHag: I'd override []
08:42 nine [Tux]: File::ShellCommand uses some meta ops that are NYI in glr
08:42 nine I tried before :)
08:43 _itz_ I've been trying to run ufo on glr on the basis its more likely to work than panda right now
08:43 _itz_ of course it doesn't either
08:44 laben joined #perl6
08:44 laben hello p6'ers
08:45 araujo joined #perl6
08:47 _itz_ Method 'gimme' not found for invocant of class 'Array'
08:50 eam joined #perl6
08:50 araujo joined #perl6
08:50 nine One can get around missing panda by adding a lot of paths to PERL6LIB ;)
09:00 diana_olhovik joined #perl6
09:02 tinyblak joined #perl6
09:14 nine m: my @a; @a.push: [1, 2];
09:14 camelia rakudo-moar 383db0: ( no output )
09:14 nine m: my @a; @a.push: [1, 2]; say @a;
09:14 camelia rakudo-moar 383db0: OUTPUT«1 2␤»
09:22 telex joined #perl6
09:28 nine m: my @a; @a.push: [1, 2]; say @a.perl;
09:28 camelia rakudo-moar 383db0: OUTPUT«[[1, 2]]<>␤»
09:28 nine aha!
09:30 nine m: sub foo(\f) { say f.perl; }; foo([1]);
09:30 camelia rakudo-moar 383db0: OUTPUT«[1]␤»
09:31 nine m: my @v = [] xx 2; @v.perl.say;
09:31 camelia rakudo-moar 383db0: OUTPUT«[[], []]<>␤»
09:33 laben m: my @v = [1,2] , [3,4]; @v.perl.say;
09:33 camelia rakudo-moar 383db0: OUTPUT«[[1, 2], [3, 4]]<>␤»
09:33 laben what result should i get with glr?
09:34 laben the same or flattened?
09:34 JimmyZ the same
09:35 nine glr in general does less flattening
09:35 laben m: my @v=[1,2];@v.push: [3,4]; say @v.perl;
09:35 camelia rakudo-moar 383db0: OUTPUT«[[1, 2], [3, 4]]<>␤»
09:36 laben ok WORKSFORME
09:36 dalek roast/glr: 6eae697 | (Stefan Seifert)++ | S17-supply/unique.t:
09:36 dalek roast/glr: Fix some copy&pasted test names to reflect what's actually being tested
09:36 dalek roast/glr: review: https://github.com/perl6/roast/commit/6eae6971f7
09:37 dalek rakudo/glr: 6fa6bef | (Stefan Seifert)++ | src/core/Supply.pm:
09:37 dalek rakudo/glr: Fix hangs in Supply.unique
09:37 dalek rakudo/glr:
09:37 dalek rakudo/glr: Need to itemize the Array argument to push. Otherwise it will be slurped
09:37 dalek rakudo/glr: in.
09:37 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/6fa6beffe6
09:41 nine Only 4 hanging test files left! :)
09:46 FROGGS__ joined #perl6
09:49 nine And one is because List.rotor is NYI
09:54 plicease joined #perl6
09:58 diana_olhovik_ joined #perl6
10:05 _itz_ nine++
10:06 pmurias joined #perl6
10:06 dalek nqp/js: 2635c3b | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
10:06 dalek nqp/js: When compiling the pass regex op insert commas correctly
10:06 dalek nqp/js: review: https://github.com/perl6/nqp/commit/2635c3bac7
10:06 dalek nqp/js: 9470abb | (Pawel Murias)++ | / (3 files):
10:06 dalek nqp/js: Implement and test nqp::getlexdyn.
10:06 dalek nqp/js: review: https://github.com/perl6/nqp/commit/9470abb201
10:16 nine m: say 3.list;
10:16 camelia rakudo-moar 383db0: OUTPUT«3␤»
10:16 nine m: say 3.list.perl;
10:16 camelia rakudo-moar 383db0: OUTPUT«(3,)␤»
10:18 nine m: my @c := 3.list; my @d := (@c xx 3).list; say +@d[0];
10:18 camelia rakudo-moar 383db0: OUTPUT«3␤»
10:19 ShimmerFairy I think it'd be nice if the various .gists for Positional types didn't go with a space-separated, unbracketed list. It just makes it so hard to see the structure of things.
10:20 nine my @c := 3.list; my @d := (@c xx 3).list; say +@d[0]; gives me 1 in glr. What would be the equivalent code after glr?
10:21 nine For someone who works on fixing GLR TODOs, I have surprisingly little understanding of Perl 6' listy features :/
10:21 nine m: my @c := 3.list; my @d := (@c xx 3).list; say @d.perl;
10:21 camelia rakudo-moar 383db0: OUTPUT«(3, 3, 3)␤»
10:21 nine m: my @c := 3.list; my @d := (@c xx 6).list; say @d.perl;
10:21 camelia rakudo-moar 383db0: OUTPUT«(3, 3, 3, 3, 3, 3)␤»
10:22 ShimmerFairy m: my $c = 3.list; my $d = ($c xx 6).list; say $d.perl;
10:22 camelia rakudo-moar 383db0: OUTPUT«$($(3,), $(3,), $(3,), $(3,), $(3,), $(3,))␤»
10:22 ShimmerFairy well, they're itemized now, but otherwise mostly the same :P
10:23 ShimmerFairy nine: does .list have a meaning of "any listy thing", or is it supposed to be basically .List in GLR?
10:27 nine Array inherits .list from List if that answers your question.
10:27 nine So I'd say the former.
10:28 ShimmerFairy but does it convert to a List, or does it convert to anything Positional? (If just a List, then it should be called .List to emphasize that it's a type conversion. Otherwise it can carry on as it's spelled ☺)
10:28 nine m: sub rotor(*@cycle) { say @cycle.perl; }; sub call-rotor(\pos) { rotor(|pos.list); }; call-rotor(3);
10:28 camelia rakudo-moar 383db0: OUTPUT«[3]<>␤»
10:29 nine m: sub rotor(*@cycle) { my @c := (@cycle xx *).list; for @c -> $s { say $s.perl; last }; }; sub call-rotor(\pos) { rotor(|pos.list); }; call-rotor(3);
10:29 camelia rakudo-moar 383db0: OUTPUT«3␤»
10:30 nine Oh, in glr, I get $[3]. That's the difference
10:30 rindolf joined #perl6
10:33 dalek rakudo/glr: de6156a | (Stefan Seifert)++ | src/core/List.pm:
10:33 dalek rakudo/glr: Bring back List.rotor
10:33 dalek rakudo/glr:
10:33 dalek rakudo/glr: Fixes hang in t/spec/S32-list/rotor.t
10:33 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/de6156a0a2
10:34 nine One down, three to go :)
10:40 xinming joined #perl6
10:40 [Tux] joined #perl6
10:41 xinming joined #perl6
10:54 shamu joined #perl6
11:01 domidumont joined #perl6
11:01 rurban joined #perl6
11:07 dalek perl6-examples: f93f916 | paultcochrane++ | categories/parsers/ (2 files):
11:07 dalek perl6-examples: Add vim coda and fix whitespace issues in parsers category
11:07 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/f93f9161e5
11:07 dalek perl6-examples: 3d6051b | paultcochrane++ | categories/parsers/ (2 files):
11:07 dalek perl6-examples: Add v6 pragma to parsers examples
11:07 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/3d6051b2ed
11:07 dalek perl6-examples: 9b98ee5 | paultcochrane++ | categories/parsers/ (2 files):
11:07 dalek perl6-examples: Add docs to parsers category examples
11:07 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/9b98ee5622
11:07 dalek perl6-examples: 88e6653 | paultcochrane++ | lib/Pod/Htmlify.pm6:
11:07 dalek perl6-examples: Find and process example .pm files
11:07 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/88e6653b29
11:09 smls joined #perl6
11:11 brrt joined #perl6
11:13 tinyblak joined #perl6
11:14 llfourn joined #perl6
11:14 espadrine joined #perl6
11:28 nine woah! "g" > 0; hangs in glr!
11:29 nine Which is the reason for the hang in t/spec/integration/advent2012-day13.t
11:30 RabidGravy joined #perl6
11:46 ecocode joined #perl6
12:01 ggoebel2 joined #perl6
12:17 BenGoldberg joined #perl6
12:17 TimToady joined #perl6
12:17 jdos2 joined #perl6
12:17 TimToady [6~[6~[6~[6~[6~[6~/e
12:20 lizmat joined #perl6
12:26 RabidGravy I don't think I have the font for that :-\
12:27 RabidGravy
12:27 ShimmerFairy Those are just ANSI escape codes. For... something.
12:31 TimToady page down, as it happens
12:35 ShimmerFairy Ah, I forgot that my terminal tends to generate codes ending in ~ . I couldn't find any mention of it on the wiki page :)
12:37 tinyblak joined #perl6
12:40 rindolf joined #perl6
12:40 RabidGravy I just couldn't see the little numbers in the square which xchat put in place of the characters
12:42 RabidGravy is it deliberate that Routine.wrap doesn't honour the "is rw" on the wrapper Routine?
12:42 RabidGravy m: my $a = "10"; my $s = sub () is rw { $a; } $s.wrap(sub () is rw { say "wrapped"; nextsame } ); say $s(); $s() = "foo"; say $s();
12:42 camelia rakudo-moar 383db0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/45W8C1uiVY␤Strange text after block (missing semicolon or comma?)␤at /tmp/45W8C1uiVY:1␤------> 3 $a = "10"; my $s = sub () is rw { $a; }7⏏5 $s.wrap(sub () is rw { say "wrapped"; n␤    expecting an…»
12:43 ShimmerFairy Ah, fair enough :)
12:43 RabidGravy m: my $a = "10"; my $s = sub () is rw { $a; }; $s.wrap(sub () is rw { say "wrapped"; nextsame } ); say $s(); $s() = "foo"; say $s();
12:43 camelia rakudo-moar 383db0: OUTPUT«wrapped␤10␤wrapped␤Cannot assign to a readonly variable or a value␤  in block <unit> at /tmp/OLMySVnHHQ:1␤␤»
12:43 RabidGravy rather
12:43 RabidGravy feels like a bugette to me
12:47 ShimmerFairy TimToady: I've got a question about roles as interfaces. I know you can stub only methods in a role to make them a requirement for classes to implement, but I haven't been able to find a way to do the same with multi methods. Is that sensible to allow?
12:47 ShimmerFairy m: role R { multi method M($a) { !!! } }; class C does R { multi method M($name) { say "HELLO $name" } }; C.M("SAILOR")
12:47 camelia rakudo-moar 383db0: OUTPUT«Ambiguous call to 'M'; these signatures all match:␤:(C $: $name, *%_)␤:(C $: $a, *%_)␤  in block <unit> at /tmp/6i7F4k_M4u:1␤␤»
12:48 ShimmerFairy ^ that's how I would expect to do it, based on how it's done with only methods. I wasn't able to find anything in the specs about this.
12:48 laben ShimmerFairy: did you try "proto method"?
12:48 ShimmerFairy laben: yes, but it doesn't allow me to require specific multis :)
12:49 laben what do you mean by specific multis?
12:49 ShimmerFairy As in, "you need to implement the foo(Int $a, Int $b) multi, any other multis named 'foo' are optional", for example
12:50 laben if you specify proto foo (Int $a, Int $b) arent they forced to have the same signature?
12:51 laben i thought proto specified the vaguest possible signature multi can then implement
12:51 laben like proto ($a, $b?) allows for multi ($a) and multi ($a, $b)
12:52 ShimmerFairy The thing I'm working on is improving our various string types (currently writing a new S32::Stringy), and I'd like it if I could specify the C<Stringy> role as an interface that guaranteed various methods.
12:54 RabidGravy that feels like a bug to me too
12:54 laben RabidGravy: which one?
12:54 ShimmerFairy laben: sure, protos (as far as I understand them) explicitly specify a name that will be subject to MMD. But regardless of how you use that 'proto', it can't be stubbed. (Or else it'll complain about implementation requirements, as though it were an only or something)
12:55 RabidGravy that the multi in a role isn't be over-ridden like it would with a plain method
12:55 ShimmerFairy RabidGravy: I would think so too, but I couldn't find anything in the docs about stubbing multi methods (maybe not multi subs either), so I can't tell if that's intended or not :)
12:57 ShimmerFairy (by docs I mean specs, specifically)
13:03 lizmat m: my @a; if @a.grep({$_}) -> @b { say @b.elems }
13:03 camelia rakudo-moar 383db0: ( no output )
13:03 lizmat $ 6 'my @a; if @a.grep({$_}) -> @b { say @b.elems }'
13:03 lizmat 0
13:03 lizmat ^^^ subtle change in GLR
13:05 lizmat jnthn TimToady: ^^^ is that to be expected?  it feels like a bug to me
13:06 ShimmerFairy m: my @a; say @a.grep({$_}).perl; say ?@a.grep({$_})
13:06 camelia rakudo-moar 383db0: OUTPUT«()␤False␤»
13:06 ShimmerFairy Could it be that boolification hasn't been corrected yet?
13:07 lizmat $ 6 'my @a; say @a.grep({$_}).perl; say ?@a.grep({$_})'
13:07 lizmat Seq.new
13:07 lizmat True
13:07 lizmat I guess it's the instantiated Seq that's True
13:07 ShimmerFairy Yeah. I wonder how you can tell if it would generate anything.
13:08 lizmat I guess it should do a pull-one ?
13:08 ShimmerFairy lizmat: also, what happens if you add .list after the grep? I imagine that would fix it
13:08 lizmat yeah, that fixes it
13:09 lizmat I guess I sorta expected the -> @b to do that for me
13:09 ShimmerFairy lizmat: I think the easiest solutions are either 1) You just have to put .list there now, or 2) make .grep not return a Seq if it found nothing
13:10 lizmat a Seq that has an empty iterator could still be an iterator, no?
13:10 ShimmerFairy my understanding of GLR is very limited, unfortunately :)
13:10 lizmat and it doesn't know it's empty at the moment the Seq.new is done
13:12 dalek rakudo/glr: ac9d315 | lizmat++ | src/core/signals.pm:
13:12 dalek rakudo/glr: Make signal() work again
13:12 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/ac9d315949
13:12 ShimmerFairy Another thought: if grep returned a (Seq) for no matches, then you could probably switch that 'if' to a 'with'
13:12 lizmat yeah, but the point was that I wanted it to wind up in @b  :-)
13:13 lizmat *and* not fire the if if it was empty :-)
13:13 rmgk_ joined #perl6
13:13 ShimmerFairy with can store things in variables though, right? :)
13:15 lizmat duh  :-)
13:16 laben ShimmerFairy: trying out the multi thing you said, i got to see that if you have a class method not acceptable, it complains at run time, not compile time
13:16 lizmat ShimmerFairy: still, that won't be possible, as the grep only finds out after processing all of its input, that there is nothing to return
13:17 lizmat it has already returned by then
13:17 nine Shortest glr hang yet, in just 5 characters: "a" <0
13:17 nine m: "a" <0
13:17 camelia rakudo-moar 383db0: OUTPUT«WARNINGS:␤Useless use of "<" in expression "\"a\" <0" in sink context (line 1)␤Earlier failures:␤ Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in block <unit> at /tmp/5GYs0opqyZ:…»
13:17 nine m: "a" < 0
13:17 camelia rakudo-moar 383db0: OUTPUT«WARNINGS:␤Useless use of "<" in expression "\"a\" < 0" in sink context (line 1)␤Earlier failures:␤ Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in block <unit> at /tmp/kkqmMBabYD…»
13:17 nine m: say "a" < 0
13:17 camelia rakudo-moar 383db0: OUTPUT«Earlier failures:␤ Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in block <unit> at /tmp/eL_ztg8dcx:1␤␤Final error:␤ Cannot call Real(Failure: ); none of these signatures match:…»
13:17 lizmat yeah, I was trying with signal(SIGINT).tap(&die) to get a stacktrace, but alas
13:18 ShimmerFairy laben: yes, that's true, but if you _do_ provide the acceptable multi, it just blows up :)  And also, if it's allowed in the first place, it would be nice to catch that at compile-time, like with only methods
13:18 nine I bet it's in Expression.pm when creating the error message. I'll probably find it this evening if noone beats me to it :)
13:19 laben ShimmerFairy: you mean you get an "ambiguous call" error?
13:19 ShimmerFairy yes
13:19 laben lemme try that, i only tried wrong ones on purpose
13:20 lizmat nine: I assume you mean Exception.pm ?
13:21 laben ShimmerFairy: you're right, it does say that. how do we disambiguate then?
13:22 ShimmerFairy laben: I think the real issue is that the stubbed multi method isn't recognized as stubbed code that must be implemented :)
13:22 ShimmerFairy But, since the specs say _nothing_ about stubbing multi methods, I can't tell if it's supposed to work or if the current behavior is expected.
13:22 laben yeah, that would also probably auto fix the non compile time error thing
13:23 ShimmerFairy I think it should work, but I also know I'm not nearly familiar enough with MMD to be able to guess how terrible that would be to implement :)
13:24 laben the synop you mention is S14, right?
13:24 ShimmerFairy I don't think I mentioned a specific one
13:25 ShimmerFairy I did say I was writing a new version of S32::Str(ingy), though :)
13:25 laben ok but the roles one is that one, or are there other mentions?
13:26 ShimmerFairy S14, S03, S10, S12, S32::Exception, S11, and S06 all contain the word "stub" in them :)
13:27 ShimmerFairy The closest I found was a mention of a proto stub, but that's something for putting inside a class when you want to force methods you get from roles to be multi.
13:28 laben i think this section is quite clear that it should work like you mean, http://design.perl6.org/S14.html#Compile-time_Composition
13:28 laben quote "A class's explicit method definition hides any role definition of the same name"
13:29 laben also "Alternately, if the role's methods are declared multi, they can be disambiguated based on their long name."
13:29 tinyblak joined #perl6
13:29 laben i think maybe the multi stub thing is just NYI
13:38 RabidGravy ignore my previous question about wrap, it is actually the difference between nextsame & callsame that confused me
13:41 psch nqp-m: my $x := "0x02"; nqp::say(~+$x) # #124559
13:41 camelia nqp-moarvm: OUTPUT«2␤»
13:41 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=124559
13:41 psch nqp-j: my $x := "0x02"; nqp::say(~+$x) # #124559
13:41 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=124559
13:41 camelia nqp-jvm: OUTPUT«(signal ABRT)#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# pthread_getattr_np␤# An error report file with more information is saved as:␤# /tmp/jvm-23385/hs_error.log␤»
13:41 psch hum, does nqp-j even actually work here?
13:41 psch also, hi #perl6 o/
13:42 RabidGravy :)
13:42 psch $ nqp-j -e'my $x := "0x02"; nqp::say(~+$x)'
13:42 psch 0
13:42 psch ^^^ that was the desired output :)
13:42 psch instead of SIGABRT
13:44 skids joined #perl6
13:47 laben ShimmerFairy: according to src/Perl6/Metamodel/RoleToClassApplier.nqp#L115, conflicts for multi methods are not resolved during composition, but by the multi dispatcher later on (at run time?)
13:48 nine lizmat: of course Exception.pm, yes :)
13:48 psch laben: the mmd code is in Perl6/Metamodel/BOOTSTRAP.nqp:2280
13:48 psch (about there, somewhere... :) )
13:49 psch laben: i have a feeling though that we could resolve the kind of conflict ShimmerFairy brought up at composition time
13:49 laben maybe we could check there if there are cases of multi stubs and resolve them there
13:49 laben psch: yeah i think we should fix stubs at composition time nad let the rest as it is now
13:49 laben s/nad/and/
13:50 laben it is done for normal stubs, but not for multi ones
13:50 laben IMO it would adhere to the specs and be quite the useful and intuitive behaviour
13:57 psch laben: i suspect figuring out how to tell if a given multi has "throw X::StubCode" as code could be fun :)
13:58 laben psch: is that the exception thrown by .yada?
13:59 psch laben: yes, sometimes... see Perl6/Actions.nqp:4612
13:59 laben im trying to wrap my head around that code, but it's way too much for now
13:59 laben oh, even nqp
14:00 ShimmerFairy psch: interestingly, multi methods in roles don't show up in Role.^methods O_o
14:01 laben oh wow, i did not know there were mutliple ways to define a yada with different results
14:03 ShimmerFairy laben: yes, it depends on how serious you are about the fact that there's stubbed code :P
14:03 psch ShimmerFairy: that's somewhat odd.  i wonder if there's some design bit that would make that make sense
14:03 psch m: role F { method f { }; multi method g { } }; say F.^methods, F.new.^methods # punning helps
14:03 camelia rakudo-moar 383db0: OUTPUT«ff g␤»
14:04 ShimmerFairy psch: yeah, but I suspect the fact that it doesn't show up is a clue :)
14:04 laben they show up in the instance, not in the type obj
14:05 bjz joined #perl6
14:06 aborazmeh joined #perl6
14:06 aborazmeh joined #perl6
14:07 ShimmerFairy psch: ParametricRoleHOW does Perl6::Metamodel::MultiMethodContainer, but ParametricRoleGroupHOW doesn't.
14:07 ShimmerFairy m: role R { }; say R.HOW.WHAT
14:07 camelia rakudo-moar 383db0: OUTPUT«(Perl6::Metamodel::ParametricRoleGroupHOW)␤»
14:09 psch that does look like it could have something to do with it
14:10 ShimmerFairy I don't think so, taking a deeper look (.^candidates[0] will get you a ParametricRoleHOW, which still won't show a multi method)
14:10 zakharyas joined #perl6
14:11 domidumont joined #perl6
14:12 ShimmerFairy psch: I have an idea, but I'd be very surprised if I get it right the first time :P
14:14 psch ShimmerFairy++
14:14 psch not like my ideas work out the first time usually :)
14:19 ShimmerFairy Hm, well, the idea I came up with might work in a simple test-case, but surely won't work out in Real Codeâ„¢ :)
14:21 laben are there no tests for this kind of behaviour?
14:26 ShimmerFairy laben: I'd imagine not, since the spec mentions nothing explicit about multi method stubs :)
14:28 laben ShimmerFairy: well then, you have the honour of spec'ing and testing this stuff XD
14:29 [TuxCM] joined #perl6
14:29 ShimmerFairy psch: I'm certainly not gonna fix it tonight, but at first glance (knowing just about nothing on the Metamodel), my guess at the implementation would be either carrying some info on where a multi yada'd method came from to the dispatcher, or having some signature comparison in the applier.
14:29 ShimmerFairy (which as I understand the comments, the applier tries to avoid doing any of ☺)
14:29 llfourn joined #perl6
14:33 dalek rakudo/glr: 9c5d5da | lizmat++ | src/core/Iterator.pm:
14:33 dalek rakudo/glr: Add naive implementation of Iterator.count-only
14:33 dalek rakudo/glr:
14:33 dalek rakudo/glr: The idea being that if we have a situation like "foo".IO.lines.elems, we
14:33 dalek rakudo/glr: can call "count-only" on the iterator, which would not bother pushing anything
14:33 dalek rakudo/glr: to the target, but do a much faster low level count.  *AND* would allow any
14:33 dalek rakudo/glr: consumer class to optimize that case even further (like now with the :count
14:33 dalek rakudo/glr: adverb on IO::Handle.lines).
14:33 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/9c5d5da13f
14:33 psch ShimmerFairy: my metamodel-fu is rather limited as well, i can't really give any advice
14:34 ShimmerFairy psch: Well, the good thing is that I already feel like I understand how multis work way more than I did a short while ago :)
14:35 lizmat .tell jnthn could you look at the sanity of https://github.com/rakudo/rakudo/commit/9c5d5da13f ?  :-)
14:35 yoleaux lizmat: I'll pass your message to jnthn.
14:37 BenGoldberg joined #perl6
14:39 khw joined #perl6
14:42 psch #124599 is turning out rather interesting :/
14:42 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=124599
14:42 psch i can't find an appropriate spot in moar to cargo-cult anything
14:43 psch the problem comes down to nqp using Double.parseDouble for << ~+"0x02" >>, but that doesn't know about bases
14:43 psch Long.parseLong does, but that's not what we're using there
14:44 ShimmerFairy Isn't Double for floating-point anyway?
14:44 psch i'm hesitant to go smart_numify -> coerce_s2n -> coerce_n2i
14:44 psch err
14:44 psch s/n2i/i2s/
14:44 psch ShimmerFairy: yeah, double precision
14:45 psch m: (+"0x02").WHAT.say
14:45 camelia rakudo-moar 383db0: OUTPUT«(Int)␤»
14:45 psch j: (+"0x02").WHAT.say
14:45 ShimmerFairy nqp-m: say(~+"0x02.8")
14:45 camelia rakudo-jvm 383db0: OUTPUT«(Int)␤»
14:45 camelia nqp-moarvm: OUTPUT«2.5␤»
14:45 cognominal joined #perl6
14:45 psch but nqp-j has some wonkies in ~+"0x02" handling
14:46 ShimmerFairy psch: you may have to either split on the . and parse each half in an integer-like fashion (and then reassemble), or detect "oh radices" and use them to override the default base.
14:47 psch ShimmerFairy: yeah, the first suggestion should work out; Double can't handle non-10 bases at all it
14:49 psch ...which is kind of annoying, because java allows hex float literals :l
14:50 psch oh, valueOf, not parseDouble
14:50 * psch makes a note to read docs more thoroughly
14:51 psch ah, but that only gets me hex, no oct or bin
14:52 psch nqp-m: say(~+"0o10")
14:52 camelia nqp-moarvm: OUTPUT«0␤»
14:52 psch well, in that case... :P
14:52 psch nqp-m: say(~+"0b10")
14:52 camelia nqp-moarvm: OUTPUT«0␤»
15:00 nine I think it's actually List.join that may cause the infinite loops
15:06 lizmat $ 6 '<a b c>.list.join("").say'
15:06 lizmat abc
15:06 lizmat nine: seems fine to me ?
15:09 nine lizmat: yes, I have not found a golf to reproduce this. Nevertheless I've seen many stack traces with endless recursions between join and Str. Maybe depends on the exact state of the List WRT lazyness
15:10 lizmat well, a lazy list will hang in a join, wouldn't it ?
15:10 nine lizmat: there's for example still: +            # XXX GLR this dies when trying to stringify, even though @s is just the List ("sec")
15:10 nine +            #"Did you mean '{ @s.join("', '") }'?";
15:10 * lizmat wishes we had a glr: on camelia
15:12 lizmat do you mean it dies there (with a stacktrace) or hangs ?
15:12 nine hangs
15:12 nine with hang meaning that it eats CPU and memory until you kill it
15:13 mst nine: well, it *is* called nom ...
15:13 lizmat mst: :-)
15:14 nine :)
15:15 lizmat .tell jnthn would it be possible to stick in a flag in the opcode loop that would cause an immediate abort (with stacktrace) if set?  then we could set that from e.g. signal(SIGINT).tap{...} and have a control-C cause a stacktrace on where it is stuck in a loop
15:15 yoleaux lizmat: I'll pass your message to jnthn.
15:17 ugexe module fetch/build/test/install seems to be 15% faster on glr atm for what takes 65s on nom
15:20 lizmat .tell jnthn I notice you're using anonymous classes to build iterators.  With SupplyOperations you chose to use named classes.  Is there a particular reason for either, or is this a case of progressing insight?
15:20 yoleaux lizmat: I'll pass your message to jnthn.
15:29 dalek rakudo/glr: 18e485a | (Stefan Seifert)++ | src/core/Exception.pm:
15:29 dalek rakudo/glr: Fix hang when creating X::Multi::NoMatch exception message
15:29 dalek rakudo/glr:
15:29 dalek rakudo/glr: Looks like another self-referencing array created by @a = 'foo', @a;
15:29 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/18e485a8d7
15:29 diana_olhovik joined #perl6
15:29 nine Or maybe List.join is innocent after all.
15:31 lizmat nine++  :-)
15:33 ugexe perl6 -e 'say %CUSTOM_LIB<site>'
15:33 ugexe (Mu)
15:33 ugexe i cant find where such directories get created :(
15:33 nine Wow, looks like this fixed all remaining hangs :)
15:33 nine make spectest is safe now
15:34 nine Except for t/spec/S32-io/IO-Socket-Async.rakudo.moar which really hangs as in "doing nothing at all"
15:34 timotimo well, yeah, but that's at least known to be problematic
15:34 timotimo very well done, everyone!
15:35 nine And now I have to be off to show a newbie how to fly :)
15:35 timotimo cool
15:35 timotimo what kind of vehicle?
15:38 * lizmat hopes a plane of sorts
15:45 dalek rakudo/nom: f185e08 | lizmat++ | src/core/SupplyOperations.pm:
15:45 dalek rakudo/nom: Get rid of class names
15:45 dalek rakudo/nom:
15:45 dalek rakudo/nom: So we don't have to specify them twice
15:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f185e08f64
15:52 ugexe lets say you compile module A against module B, and then move module B to a different directory (moved or re-precompiled but otherwise identical, whichever as long as B works). If A still knows where B is, does it still need to be precompiled again against B?
15:55 laben shouldnt it be the same as long as B is still in a INCluded path?
15:56 lizmat ugexe: afaik, the path of any pre-compiled dependencies is hard-code into the pre-comp
15:56 lizmat *hard-coded
15:56 lizmat whether that is an absolute path or not, I don't know
15:57 ugexe i see. thanks!
16:05 dalek perl6-roast-data: 597b128 | coke++ | bin/git.p5:
16:05 dalek perl6-roast-data: Revert "stop fetching pugs."
16:05 dalek perl6-roast-data:
16:05 dalek perl6-roast-data: This reverts commit 3c97153f10cfbd8e8c141f5fa5b5ef12e4eeff9d.
16:05 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/597b128b03
16:05 dalek perl6-roast-data: 29fcc95 | coke++ | bin/cull:
16:05 dalek perl6-roast-data: Revert "don't add pugs to the daily list of runs"
16:05 dalek perl6-roast-data:
16:05 dalek perl6-roast-data: This reverts commit 3b54531b6b6f93c94efdff97019a007cf0de9350.
16:05 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/29fcc953fd
16:05 dalek perl6-roast-data: f6b1285 | coke++ | bin/ (2 files):
16:05 dalek perl6-roast-data: Revert "Stop running Pugs every day."
16:05 dalek perl6-roast-data:
16:05 dalek perl6-roast-data: This reverts commit 6c41218378810731692a772f06950cffa6652f70.
16:05 dalek perl6-roast-data:
16:05 dalek perl6-roast-data: Conflicts:
16:05 dalek perl6-roast-data: bin/doit
16:05 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/f6b1285c71
16:19 lizmat $ 6 'my @a; @a.push: [0,1,2]; say @a.perl'
16:19 lizmat [0, 1, 2]
16:20 lizmat ^^^ this feels wron to me, would have expected [[0,1,2]]
16:20 laben m: my @a; @a.push: [0,1,2]; @a.perl.say
16:20 camelia rakudo-moar 383db0: OUTPUT«[[0, 1, 2]]<>␤»
16:24 lizmat laben: that's pre GLR, my code is on the GLR
16:25 laben is there a way to tell camelia to run rakudo-glr?
16:28 lizmat not yet, In wish there was
16:29 lizmat someone like moritz or FROGGS could set this up quite quickly, I would hope  :-)
16:37 dalek rakudo/glr: 360ac8e | lizmat++ | src/core/asyncops.pm:
16:37 dalek rakudo/glr: Make EARLIEST somewhat more functional
16:37 dalek rakudo/glr:
16:37 dalek rakudo/glr: @a.push: [1,2,3] is flattening the values, fixed by manually itemizing.
16:37 dalek rakudo/glr: Which brings us to the next bug, with @todo.pick(*) apparently not being
16:37 dalek rakudo/glr: allowed to run more than once.  Weird.
16:37 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/360ac8eda7
16:37 lizmat and with that, I call it a day...
16:37 lizmat so good night #perl6 from Tokyo!
16:43 [Coke] m: 48 X/ 3,4  # dies on glr with "Method gimme not found..."
16:43 camelia rakudo-moar f185e0: ( no output )
16:48 laben [Coke]: iirc metaops are NYI or WIP in glr
16:52 RabidGravy joined #perl6
17:07 laben alarm! newest rakudo now fails this test during "make test": t/01-sanity/55-use-trace.t ........... Dubious, test returned 1 (wstat 256, 0x100)
17:11 brrt joined #perl6
17:13 ChoHag Can you have a scalar which is restricted to only one of two completely unrelated things?
17:13 ChoHag my Foo|Bar $thing;
17:15 flussence nope, you need to use a subset for that currently
17:17 RabidGravy well you can do "my $a where Foo|Bar;"
17:18 RabidGravy m: class Bar {}; class Foo { }; my $a where Foo|Bar;  $a = Foo.new;  say $a; $a = 1;
17:18 camelia rakudo-moar f185e0: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
17:19 psch m: class A {}; class B {}; sub C where A|B; my C $x = Foo.new; say $a; $a = 1 # flussence++
17:19 camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ndLO8092YR␤Missing block␤at /tmp/ndLO8092YR:1␤------> 3class A {}; class B {}; sub C7⏏5 where A|B; my C $x = Foo.new; say $a; $␤    expecting any of:␤        new name to be defined␤»
17:19 psch m: class A {}; class B {}; subset C where A|B; my C $x = Foo.new; say $a; $a = 1 # flussence++
17:19 camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gP8T0KdsNL␤Variable '$a' is not declared␤at /tmp/gP8T0KdsNL:1␤------> 3set C where A|B; my C $x = Foo.new; say 7⏏5$a; $a = 1 # flussence++␤»
17:19 psch m: class A {}; class B {}; subset C where A|B; my C $x = Foo.new; say $x; $x = 1 # two is enough
17:19 camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Pwnjb0ggEG␤Undeclared name:␤    Foo used at line 1␤␤»
17:19 psch why oh why
17:19 psch i'm losing focus :P
17:19 RabidGravy the ^ code does work in my REPL
17:19 psch m: class A {}; class B {}; subset C where A|B; my C $x .=new; say $x; $x = 1 # two is enough
17:19 camelia rakudo-moar f185e0: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
17:20 psch oh, the .=new is bogus anyway
17:20 psch i'm really not quite there right now it seems
17:20 psch m: class A {}; class B {}; subset C where A|B; my C $x = A.new; say $x; $x = 1 # two is enough
17:20 camelia rakudo-moar f185e0: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
17:20 psch yeah, i give up
17:20 psch m: subset Foo of Any where Int|Str; my Foo $x = "bar"; $x = 5; say "so far so good"; $x = 5e0; # this worked in privmsg to camelia before
17:20 camelia rakudo-moar f185e0: OUTPUT«so far so good␤Type check failed in assignment to '$x'; expected 'Foo' but got 'Num'␤  in block <unit> at /tmp/rphwkfTB4I:1␤␤»
17:21 psch the <of Any> seems to have been the missing part
17:21 RabidGravy m: class Bar {}; class Foo { }; my $a where Foo|Bar;   $a = 1;
17:21 camelia rakudo-moar f185e0: OUTPUT«Type check failed in assignment to '$a'; expected '<anon>' but got 'Int'␤  in block <unit> at /tmp/rdYBmgqlQq:1␤␤»
17:22 RabidGravy does work
17:22 psch m: class A {}; say 1 ~~ A
17:22 camelia rakudo-moar f185e0: OUTPUT«False␤»
17:22 psch RabidGravy++
17:22 psch j: class Bar {}; class Foo { }; my $a where Foo|Bar;  $a = Foo.new;  say $a; $a = 1;
17:22 camelia rakudo-jvm f185e0: OUTPUT«===SORRY!===␤Can not invoke object '&infix:<|>'␤»
17:23 RabidGravy m: class Bar { }; class Foo { }; my $a where Foo|Bar;  $a = Foo.new; say $a.WHAT
17:23 camelia rakudo-moar f185e0: OUTPUT«(Foo)␤»
17:23 RabidGravy yeah it's something boguesa with the "say"
17:26 baest_ joined #perl6
17:43 dha joined #perl6
17:48 laben m: role R{method m(Int $a) {say "ROLE";}};class C does R{method m($a) {say "CLASS";}}; my $c = C.new; $c.m(1);
17:48 camelia rakudo-moar f185e0: OUTPUT«CLASS␤»
17:48 laben m: role R{method m(Int $a) {say "ROLE";}};class C does R{method m($a) {say "CLASS";}}; my $c = C.new; $c.m('a');
17:48 camelia rakudo-moar f185e0: OUTPUT«CLASS␤»
17:50 laben ShimmerFairy: the whole thing of restricting signatures from roles is not implemented, even for normal methods. i dont know if it's intended or simply NYI
17:50 psch m: role R{method m(Int $a) {say "ROLE";}};class C does R{method m(Str $a) {say "CLASS";}}; my $c = C.new; $c.m(5); # this fits my expectation
17:50 camelia rakudo-moar f185e0: OUTPUT«Type check failed in binding $a; expected 'Str' but got 'Int'␤  in method m at /tmp/aJnTwrLX9z:1␤  in block <unit> at /tmp/aJnTwrLX9z:1␤␤»
17:51 psch but that's because i expect the role method to be fully shadowed
17:51 psch ...which might not be as designed :)
17:51 laben psch: the class method it's equally strict as the role method in your case, in mine it's Int vs Any
17:52 laben psch: it has no meaning anyway since there is no checking of signatures while composing roles
17:52 psch laben: yes, i noticed.  both cases fit my expectation
17:52 laben it checks only names
17:52 laben and since roles are composed after class defs
17:53 psch m: role R{method m(Int $a) { ... } }; class C does R{method m( $a) {say "CLASS";}}; my $c = C.new; $c.m('a'); # this seems incomplete
17:53 camelia rakudo-moar f185e0: OUTPUT«CLASS␤»
17:53 laben if class defines a method with that name, the role one is superseded
17:53 psch laben: that probably shows clearest what you mean, iiuc
17:53 jack_rabbit joined #perl6
17:54 psch as in, the stub from the role should demand a signature-fitting implementation in the class
17:54 laben probably, still it's worth knowing if we want to restrict class methods and multis by roles definitions
17:54 RabidGravy is there any way that I can set "is rw" somewhat dynamically on a method such that a callsame/callwith in it will behave correctly?
17:54 laben psch: im gonna read a bit more of the specs to see if there's somethign to clarify
17:55 psch laben++
17:55 psch i'm still fiddling with those hex (and oct and bin...) strings :)
17:56 laben psch: the problem is, i dunno how possible it would be to check signatures during composition, it seems to me it duplicates MMD work (even in non multi case)
18:04 psch laben: actually, i think composition time might be prohibitively difficult to do useful enough
18:04 psch laben: .^add_method is around after all
18:05 psch hm, but methods carry their own dispatcher around, don't they
18:05 psch i guess in the end we'd need someone who actually *knows* the dispatch code... :)
18:06 laben psch: from the knowledge i distilled form S14, there's no mention of actually restricting methods and multi methods based upon roles declarations
18:07 laben psch: that is the hard part, adding methods or multis is easy
18:07 huf joined #perl6
18:08 psch laben: oh, okay.  right, you mentioned "would be nice", not "is buggy"
18:10 laben psch: yeah, it's totally missing. so, i would need to ask a core dev what do we want. Do we want to be able to restrict methods through roles or not?
18:13 * psch doesn't feel particularly core-dev-y
18:14 laben .tell TimToady i would like to ask you what do you think of restricting (multi) methods definitions of a class with the (multi/proto) methods signature of composited roles
18:14 yoleaux laben: I'll pass your message to TimToady.
18:14 laben whew, i guess i can see where my non-english nativeness comes out
18:14 sjn \o
18:14 laben needed to much time to write that statement clearly
18:14 psch commit bit not withstanding...
18:14 laben s/to/too
18:15 psch o/ sjn
18:15 laben still, i have to admit the code was not hard at all to understand, it's just that there's so much
18:16 Sgeo joined #perl6
18:18 * sjn is trying to figure how to elegantly generate a color cube values
18:18 sjn -a
18:19 spider-mario joined #perl6
18:20 nine timotimo: it was this one: http://segelflieger-linz.at/static/1/7/8/259/image/IMG_4431_-_Kopie.JPG
18:20 nine lizmat: ^^^
18:20 dha nine - you left me a message asking about the p5->p6 docs recently, yes?
18:21 nine dha: I did
18:21 dha Right. Working on cleaning them up for inclusion in the main doc tree. If you need to look at them in the meantime, they're at https://github.com/dha/perl5-to-perl6-docs
18:21 nine thanks :)
18:21 dha Although, as I get ready to put them in the docs, the names of the files may change.
18:22 dha probably s/may/will/; :-)
18:23 nine It just occured to me: the reason why Inline::Perl5 already works on glr is probably because I don't know all that much about Perl 6 and have not used all those NYI advanced features ;)
18:24 dha Well, if they're NYI, you can't really use them, can you? :-)
18:24 nine NYI on glr
18:24 skids Yeah, it is hard sometimes when writing tests for one feature to go through the extra effort not you use other features.
18:24 skids *to
18:25 pmurias nine: how does Inline::Perl5 work with precompilation?
18:28 skids m: "123456".match(/\d/, :nth(1,2,3), :x(2)).say; # is there a situation where :nth+:x would fail because there are over :x(2) matches?
18:28 camelia rakudo-moar f185e0: OUTPUT«「1」 「2」␤»
18:28 nine pmurias: don't ask :/ Is the biggest item on my TODO list. You can precompile Inline::Perl5 without trouble. But precompiling modules that _use_ Inline::Perl5 will lead to problems. Using Inline::Perl5 changes the state of the Perl 5 interpreter. This state is not saved on precompilation and thus will not be the same when loading your module.
18:28 skids (In glr-implementing that ATM).
18:28 skids *I'm
18:29 skids like can :nth + :x be applied to a grammar somehow...
18:29 pmurias and precompilation is still done manually?
18:29 nine 271/1036 test files failing on glr
18:29 nine pmurias: yes, it's still done by panda
18:30 pmurias :(
18:30 FROGGS o/
18:30 psch o/ FROGGS
18:35 nine 272/1047 test files failing on glr when Inline::Perl5 is available :)
18:36 yqt joined #perl6
18:38 * FROGGS likes to remove stuff from roast like this one: my @s = { $^a <=> $^b }.sort: @a;
18:39 * FROGGS just goes on and does it
18:39 llfourn joined #perl6
18:43 dalek roast: cf34ae9 | FROGGS++ | S32-list/sort.t:
18:43 dalek roast: remove tests for Callable.sort(), which is insane
18:43 dalek roast: review: https://github.com/perl6/roast/commit/cf34ae9838
18:47 dalek roast: f827beb | FROGGS++ | S32-list/grep.t:
18:47 dalek roast: remove tests for Callable.grep(), which is insane
18:47 dalek roast: review: https://github.com/perl6/roast/commit/f827beb031
18:48 dalek roast: b007c41 | FROGGS++ | S32-list/ (2 files):
18:48 dalek roast: adjust plan
18:48 dalek roast: review: https://github.com/perl6/roast/commit/b007c410d0
18:51 [Tux] joined #perl6
18:52 laben m: dd Int.HOW;
18:52 camelia rakudo-moar f185e0: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in any name at src/gen/m-Metamodel.nqp:87␤  in block <unit> at /tmp/x1G_7ILgvC:1␤␤»
18:52 laben m: say Int.HOW;
18:52 camelia rakudo-moar f185e0: OUTPUT«Perl6::Metamodel::ClassHOW.new␤»
18:52 laben m: say Int.HOW.WHAT;
18:52 camelia rakudo-moar f185e0: OUTPUT«(Perl6::Metamodel::ClassHOW)␤»
18:52 laben how can i inspect .HOW?
18:54 laben m: say Int.HOW.WHAT.^attributes
18:54 camelia rakudo-moar f185e0: OUTPUT«Method 'gist' not found for invocant of class 'NQPAttribute'␤  in block <unit> at /tmp/vEuHjeR3lk:1␤␤»
18:54 laben m: dd Int.HOW.WHAT.^attributes
18:54 camelia rakudo-moar f185e0: OUTPUT«Method 'perl' not found for invocant of class 'NQPAttribute'␤  in block <unit> at /tmp/TFr2drQli0:1␤␤»
18:54 laben m: dd Int.HOW.WHAT.^methods
18:54 camelia rakudo-moar f185e0: OUTPUT«Method 'perl' not found for invocant of class 'NQPRoutine'␤  in block <unit> at /tmp/DLJlu84Avi:1␤␤»
18:57 dalek roast: c82bbd5 | FROGGS++ | S05-metasyntax/charset.t:
18:57 dalek roast: add test for RT #120511, <?[\n]>
18:57 dalek roast: review: https://github.com/perl6/roast/commit/c82bbd55ff
18:57 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=120511
18:59 dalek rakudo/glr: 3bb6333 | ugexe++ | src/core/CompUnitRepo/Local/Installation.pm:
18:59 dalek rakudo/glr: Distribution.provides initialization
18:59 dalek rakudo/glr:
18:59 dalek rakudo/glr: Works around a rw parameter related 'Cannot assign to an immutable value' and allows `CompUnitRepo::Local::Installation.install` to finish.
18:59 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/3bb6333783
18:59 dalek rakudo/glr: 552f8ab | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
18:59 dalek rakudo/glr: Merge pull request #497 from ugexe/patch-1
18:59 dalek rakudo/glr:
18:59 dalek rakudo/glr: Distribution.provides initialization
18:59 dalek rakudo/glr: review: https://github.com/rakudo/rakudo/commit/552f8ab7d7
18:59 [Tux] joined #perl6
19:02 BenGoldberg joined #perl6
19:03 vendethiel joined #perl6
19:04 * vendethiel waves from home
19:04 vendethiel I don't know how you people keep traveling like this :-). one day in the train and I'm totally exhausted...
19:05 dha I'm exhausted and I haven't gone anywhere but downtown.
19:06 dha Ok, the Perl 5 to Perl 6 documents are, I think, almost ready to be folded into the docs. I'm thinking of titling them after the Perl 5 docs they're based on: 5to6-perlvar, 5to6-perlfunc, etc.
19:07 dha Thoughts?
19:07 FROGGS +1
19:10 vendethiel +1 :)
19:10 vendethiel (as someone whose first perl5 program was pretty much last week...)
19:13 dha Congratulations! :-)
19:19 jack_rabbit joined #perl6
19:20 pmurias vendethiel: have you been using the 5to6 docs in reverse? ;)
19:20 vendethiel pmurias: I had no internet, so, no!
19:20 zakharyas joined #perl6
19:20 vendethiel pmurias: I used the book woolfy++ and lizmat++ gave me :-)
19:21 dha Which one?
19:22 vendethiel "programming perl fourth edition", I think. Well, I didn't bring the book with me physically, but I used what I learned throughout...
19:23 dha Ah.
19:23 vendethiel dha: you don't like that book?
19:23 dha No! Good book!
19:23 dha That was just a confirming "ah". :-)
19:24 vendethiel :) it was a looong road. But a well worth it one!
19:24 vendethiel and it gave me new insights as to why some things work this way in perl6. What was "fixed", or something
19:24 dha Actually, although I have it, I'm not sure I've read the 4th edition. :-)
19:26 dha Just so many times you can read that thing... :-)
19:27 vendethiel Right! I probably wouldn't go through it many times as well. 1000+ pages is a lot to read...
19:29 dha Yep. :-)
19:34 telex joined #perl6
19:41 dha_ joined #perl6
19:43 skids my @a = (1,2,3).grep: { 42.say; True.last }; @a.say; # any trick to finagle this before it is implemeted?
19:51 vendethiel skids: True.last?
19:55 dalek nqp/js: c264dcc | (Pawel Murias)++ | src/QRegex/Cursor.nqp:
19:55 dalek nqp/js: Revert "Port over a hack, pass more tests on the js backend."
19:55 dalek nqp/js:
19:55 dalek nqp/js: This reverts commit f15ab3c077002d80b8a126801d10f135ca03f711.
19:55 dalek nqp/js: review: https://github.com/perl6/nqp/commit/c264dccd20
19:55 dalek nqp/js: 6aedbc4 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
19:55 dalek nqp/js: Call the .Str method when we don't know how to stringify something
19:55 dalek nqp/js: review: https://github.com/perl6/nqp/commit/6aedbc493b
19:55 dalek nqp/js: 85faf51 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
19:55 dalek nqp/js: Partial implementation of rxtype subrule
19:55 dalek nqp/js: review: https://github.com/perl6/nqp/commit/85faf516e7
19:59 dha Ok, with a +2 to go on, and no dissent, I'm going to go with this naming scheme.
20:06 RabidGravy dha, for the sake of dewarnockificaztion that seems cool to me
20:06 dha Thanks.
20:06 dha Now, the question is, do I fork and do a pull request, or do I just commit directly to the main tree?
20:08 RabidGravy straight in I'd say, people can make their own changes :)
20:08 pmurias it's always possible to revert
20:08 dha Ok, then.
20:09 nine @
20:09 nine dha: congratulations :)
20:10 dha Thanks. :-)
20:11 skids vendethiel:  "foo".last is supposed to terminate the loop with a final-iteration return value of "foo".  Whereas "last foo" terminates the loop labeled "foo"
20:11 vendethiel skids: ah, TIL. I thought labels were supposed to be objects so that you could call .last on them!
20:14 laben MMD code is ginormous, i dont even know if i should check out analyze_dispatch or find_best_dispatchee :/
20:15 vendethiel so, #perl6. I've been writing (g)awk code during the holidays (...) and I translated a bit of that to perl5. I wanted to translate it to perl6, but I think we're "missing" some stuff.
20:15 vendethiel the thing I wanted was "current-line" or something ($. in perl5 IIRC, and NR in awk)
20:17 vendethiel (really, it's about writing one-liners, "perl6 -Msloppy" or something ;-).)
20:18 laben did you check https://github.com/dnmfarrell/Perl6-One-Liners ?
20:19 vendethiel at the very beginning, I think.
20:20 vendethiel I think there's "$++", but that won't work well with ff-style things (NR == 10, NR == 15 { print } in awk, say)
20:20 laben this one does it "perl6 -ne 'say "{++$} $_"' example.txt"
20:21 cognominal joined #perl6
20:22 vendethiel laben: O_o. I don't know how that works. but i'm not sure how I can use that to do what I talked about in my previous message, though
20:23 pmurias what the heck is ++$?
20:23 laben $ perl6 -ne 'if ++$ == 5 { say $_ }' example.txt
20:23 laben pmurias: dunno, but it works
20:24 vendethiel pmurias: implicit state, anonymous variable
20:24 vendethiel equivalent to "++(state $)"
20:24 vendethiel laben: again -- not easy to make it work with ff
20:24 vendethiel well, I'd have to name it :(-
20:25 laben vendethiel: with ff you mean flipflops?
20:25 vendethiel laben: yes
20:25 dha Well, here goes nothing...
20:25 dalek doc: dead7d2 | (David H. Adler)++ | lib/Language/5to6-perl (4 files):
20:25 dalek doc: Added 5to6-perlfunc.pod, 5to6-perlop.pod, 5to6-perlsyn.pod, and
20:25 dalek doc: 5to6-perlvar.pod to lib/Language\
20:25 dalek doc: review: https://github.com/perl6/doc/commit/dead7d2627
20:25 vendethiel dha++
20:25 dha Thanks.
20:26 laben vendethiel: sorry never used ff, but they are a class of operators in perl6, i think you can work it out, since it worked inside an if
20:26 vendethiel laben: the problem is that I need to refer twice to the anonymous variable in the if.
20:26 BenGoldberg m: ++$ == 6 and .say for lines
20:26 camelia rakudo-moar f185e0: OUTPUT«Ag taisteal dom amach trí chnoic Ghleann Domhain ’s an Mucais ar mo chúl␤»
20:27 RabidGravy surely, thats's just "perl6 -ne 'say  $_ if ++$ ~~ 10|15'"
20:27 vendethiel RabidGravy: that would print line 10 and 15, not 10 *to* 15
20:27 RabidGravy oh I see
20:27 vendethiel yes, awk's "," is ... "surprising" to say the least
20:28 BenGoldberg m: my $test = 5; say ($test ~~ 5|10)
20:28 camelia rakudo-moar f185e0: OUTPUT«True␤»
20:28 RabidGravy oh I see
20:28 BenGoldberg Instead of an 'if', maybe you need to use 'given'/'when' ?
20:28 laben m: my $a = 7; say ($a ~~ 5..10)
20:28 camelia rakudo-moar f185e0: OUTPUT«True␤»
20:28 RabidGravy perl6 -ne 'say  $_ if ++$ ~~ (10 .. 15)' README.m
20:28 laben here it is
20:28 BenGoldberg m: given( 5 ) { when(5|10) { .say } }
20:28 camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5===␤Word 'given' interpreted as 'given()' function call; please use whitespace instead of parens␤at /tmp/aCKqo1z2tn:1␤------> 3given7⏏5( 5 ) { when(5|10) { .say } }␤Unexpected block in infix position (two terms in a row)␤at /…»
20:28 vendethiel BenGoldberg: `given $++ { .. stuff here }`?
20:28 BenGoldberg m: given ( 5 ) { when (5|10) { .say } }
20:28 camelia rakudo-moar f185e0: OUTPUT«5␤»
20:29 vendethiel RabidGravy: great. now, how do I print the line number in the "say"?: P
20:29 BenGoldberg m: given ( ++$_ ) { when (5|10) { .say } } for .lines
20:29 camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CXTOk1GUz9␤Strange text after block (missing semicolon or comma?)␤at /tmp/CXTOk1GUz9:1␤------> 3given ( ++$_ ) { when (5|10) { .say } }7⏏5 for .lines␤»
20:29 laben m: ++$ ~~ 10..15 and .say for lines
20:29 camelia rakudo-moar f185e0: OUTPUT«␤Níorbh é mo mhiansa imeacht ariamh ó mo thír bheag dhílis féin␤Ach trom lámh Gall, le cluain 's le feall, a thiomáin mé i gnéill␤B'é rún mo chroíse pilleadh arís, nuair a dhéanfainn beagán stór␤'S deireadh mo shaoil a chaitheamh l…»
20:29 laben should be good enough
20:30 laben vendethiel: is that ok for your use?
20:30 vendethiel laben: no, because I can't print the line number now
20:31 dalek doc: 0cec370 | (Steve Mynott)++ | lib/Language/5to6-perl (2 files):
20:31 dalek doc: fix minor typos
20:31 dalek doc: review: https://github.com/perl6/doc/commit/0cec37089c
20:31 laben m: if ++$ ~~ 10..15 { say $, $_ }
20:31 camelia rakudo-moar f185e0: ( no output )
20:31 vendethiel I guess "given ++$ { ... }" can work, though
20:32 laben m: if ++$ ~~ 10..15 { say ($), $_ }
20:32 camelia rakudo-moar f185e0: ( no output )
20:32 vendethiel (given ++$ {when 10..15 { .say }})
20:32 BenGoldberg m: for ( lines.kv ) -> $i, $line { next unless $i ~~ 5|10; say $i, $line }
20:32 camelia rakudo-moar f185e0: OUTPUT«5Ag taisteal dom amach trí chnoic Ghleann Domhain ’s an Mucais ar mo chúl␤10Níorbh é mo mhiansa imeacht ariamh ó mo thír bheag dhílis féin␤»
20:33 BenGoldberg How about that?
20:33 vendethiel BenGoldberg: interesting that you put the parentheses *outside* the for's call :)
20:33 vendethiel BenGoldberg: it's a bit "long" for one-liners. but yes, it works.
20:33 laben m: if ++$n ~~ 10..15 { say $n , $_ } #### this should do
20:33 camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/GIUrhVQjxM␤Variable '$n' is not declared␤at /tmp/GIUrhVQjxM:1␤------> 3if ++7⏏5$n ~~ 10..15 { say $n , $_ } #### this s␤»
20:33 BenGoldberg The parens are optional there.
20:33 laben ok not on camelia but on shell
20:33 BenGoldberg m: for lines.kv -> $i, $line { say $i, $line if $i ~~ 5|10 }
20:33 camelia rakudo-moar f185e0: OUTPUT«5Ag taisteal dom amach trí chnoic Ghleann Domhain ’s an Mucais ar mo chúl␤10Níorbh é mo mhiansa imeacht ariamh ó mo thír bheag dhílis féin␤»
20:34 vendethiel BenGoldberg: well, they're if you have "lines" alone. that's what I was thinking about.
20:34 BenGoldberg Maybe perl6 needs a commandline flag to loop over lines.kv instead of lines?
20:34 laben vendethiel: can you try that one "if ++$n ~~ 10..15 { say $n , $_ }"?
20:35 vendethiel laben: needs something to be put in lax-mode, no?
20:35 laben vendethiel: should work out by default
20:35 * vendethiel needs to recompile a new perl6
20:35 laben vendethiel: WORKSFORME, tried just now
20:36 vendethiel laben: great, thanks :-).
20:36 laben vendethiel: i recommend rakudobrew
20:36 vendethiel laben: I prefer doing it by hand, but thanks
20:36 RabidGravy maybe  someone should do an a2p6 and shake this stuff out ;-)
20:36 vendethiel laben: now, how do you get the equivalent to FNR? current file's line number?
20:37 vendethiel I looked at the ArgFiles class, but it doesn't have any such thing :(.
20:39 dha RabidGravy - Well volunteered!
20:40 laben vendethiel: can check out $*ARGFILES
20:40 vendethiel laben: don't worry... I did ;-)
20:40 vendethiel laben: ArgFiles is the class implementing that.
20:40 bin_005 joined #perl6
20:41 RabidGravy dha, I'm only one module down on my TODO since you last said that ;-P
20:41 laben vendethiel: you can always try to ask TimToady if more vars can be added
20:41 dha \o/
20:41 vendethiel laben: well, I'd think we might get some -Msloppy or something, kinda like "6;"
20:42 vendethiel that could be a nice slang, I guess?
20:42 * vendethiel 's not sure it needs to be a slang at all
20:44 laben vendethiel: sorry, dont use much awk, how do you use FNR?
20:44 vendethiel laben: when you have multiple files as input, FNR is the current line relative to the current file
20:44 llfourn joined #perl6
20:44 vendethiel laben: I wrote my first "awk" script last week, I have no clue what i'm doing :)
20:45 laben vendethiel: if you can somehow find if the current file has changed, you could reset $
20:45 * geekosaur *perk*
20:45 vendethiel laben: yeah. but I think that's just going to be too much anyway.
20:45 laben vendethiel: how to do that in a one liner is a challenge
20:45 geekosaur also I thought at one point there was something documented about how to emulate the magic perl5 $. behavior
20:45 vendethiel I was just asking random questions about one-liners :P
20:46 vendethiel I'm not asking for perl5's "if 5 {}"
20:46 laben let's see what others one liners we can port
20:47 vendethiel laben: awk can be used to write great *scripts* :P https://github.com/vendethiel/inibeauty/blob/master/inibeauty.awk
20:47 vendethiel or https://github.com/vendethiel/psmemparse/blob/master/psmemparse.gawk :P
20:47 * vendethiel notices he forgot to commit the perl6 version
20:49 vendethiel oh, I also think I found a bug related to... multi-dispatch with &-capture? not sure. lemme get a reprod here...
20:50 vendethiel (might've been my out-of-date rakudo)
20:50 RabidGravy I wrote my first awk script more than twenty years ago but I really don't use it much at all
20:51 vendethiel m: subset PosInt of Int where $_ >= 0; subset One of Int where $_ == 1; multi f(One) { say "one!"; }; multi f(PosInt $x) { say "i got $x"; $x == 2 ?? ($x, $x).map(&f) !! f($x - 1) }; f(2)
20:51 camelia rakudo-moar f185e0: OUTPUT«i got 2␤i got 2␤i got 2␤»
20:52 vendethiel m: subset PosInt of Int where $_ >= 0; subset One of Int where $_ == 1; multi f(One) { say "one!"; }; multi f(PosInt $x) { say "i got $x"; $x == 2 ?? ($x - 1,).map(&f) !! f($x - 1) }; f(2)
20:52 camelia rakudo-moar f185e0: OUTPUT«i got 2␤one!␤»
20:52 vendethiel alright, it seems this "bug" was fixed on master. I'll update my rakudo and double check :-).
21:04 bin_005_v joined #perl6
21:09 dalek rakudo-star-daily: 05ced75 | coke++ | log/MoarVM- (4 files):
21:09 dalek rakudo-star-daily: today (automated commit)
21:09 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/05ced7575d
21:12 Sgeo left #perl6
21:12 Sgeo joined #perl6
21:13 Sgeo m: my @a = 1,2,3; my @b; @b[0]=@a; say @b.perl
21:13 camelia rakudo-moar f185e0: OUTPUT«[[1, 2, 3]]<>␤»
21:16 dha Hrm. 5to6-perlfunc seems to be slightly troublesome. Otherwise, I think things went fairly well.
21:21 timotimo we just had a rather impressive thunderstorm here at the camp
21:21 DrForr Yay! As per blog comment, looking forward to reading what I"m doing wrong :)
21:21 timotimo DrForr: what? where? :)
21:22 dha Ooh. My first blog comment.
21:22 DrForr Re: dha above.
21:22 dha Now if only I can figure out how to get the perlfunc file to index correctly... Hrm...
21:22 DrForr Yeah, thought I'd spread the joy, especially seeing as I'll own another blog site soonish :)
21:25 DrForr timotimo: Getting lightning out here too.
21:25 DrForr May have to open my door after turning out the lights.
21:26 dha Another blog site?
21:27 DrForr blogs.perl.org :)
21:27 dha oh, right.
21:30 dha Ok, so it seems that the doc htmlify.p6 script creates index links from =head2 tags. Anyone have any idea how I should deal with this in 5to6-perlfunc, when there are sometimes multiple headings for a section? (for instance, the various get* functions are all grouped together)
21:33 AlexDaniel joined #perl6
21:33 psch ooh lightning storm
21:33 psch the tennants i lived in got struck by lightning 3 nights back
21:33 psch blew the FI
21:34 laben how would one match the EOF in a regex? $ and $$ seems to match EOL
21:34 psch the RCCB that is, that's what the internet says the english word is :)
21:35 psch (i probably should have gone with "fuse")
21:35 psch laben: i don't think trying to match EOF makes sense
21:36 psch laben: regexen operate on strings, not on files
21:36 laben psch: ok, but if i slurp more than one file in a string...
21:37 psch (also, tenaments instead of tennants, which i think isn't actually a word...)
21:37 timotimo https://github.com/zkat/maybe-hugs/tree/master/perl6 - tee hee
21:37 psch laben: if you do that you're in control of what ends up in your string, which means you can insert a separator
21:37 psch laben: that's what i'd do at least :)
21:38 psch laben: probably doesn't help with one-lining/golfing it, though, i readily admit that
21:39 dha tenant is a word.
21:39 timotimo i'd really rather slurp into multiple slots of an array
21:39 timotimo that way i wouldn't have to split by self-invented separator
21:41 laben mh, trying to make an one liner with perl6 -ne seems too difficult, time to see if i can make a module to do that
21:41 vendethiel timotimo: fun module :)
21:41 timotimo could also have invented a (>^_^)> infix operator
21:42 timotimo ooh! brrt blogged
21:43 psch m: say 0x1e1024
21:43 camelia rakudo-moar f185e0: OUTPUT«1970212␤»
21:44 llfourn joined #perl6
21:45 smls dha: You could just have multiple consecutive =head2's, no? If it's just for the table of contents.
21:45 TEttinger joined #perl6
21:46 psch dha: yeah, but it wasn't the one i wanted to have there.  nobody got hurt, as far as i know...
21:47 dha Yeah, but in the case of the get* set* functions, you've got over 20 entries in the table of contents that have no... content.
21:48 smls then group them under one header :P
21:48 dha Hm. I may have to revise the way the document is laid out. :-/
21:49 Sgeo m: sub badfunc(--> Str) { 1+1; }; badfunc();
21:49 camelia rakudo-moar f185e0: OUTPUT«Type check failed for return value; expected 'Str' but got 'Int'␤  in sub badfunc at /tmp/GlCcNuS5FR:1␤  in block <unit> at /tmp/GlCcNuS5FR:1␤␤»
21:49 Sgeo m: sub badfunc(--> Str) { 1+1; };
21:49 camelia rakudo-moar f185e0: ( no output )
21:49 Sgeo m: sub badfunc(Int--> Str) { 1+1; };badfunc("Hi"~"Bye");
21:49 camelia rakudo-moar f185e0: OUTPUT«Type check failed in binding <anon>; expected 'Int' but got 'Str'␤  in sub badfunc at /tmp/LGnSQquKSp:1␤  in block <unit> at /tmp/LGnSQquKSp:1␤␤»
21:50 timotimo our type inference at compile time isn't terribly great
21:50 Sgeo Hmm I think the error messages should be clearer on whose fault it is, ala the error messages here http://docs.racket-lang.org/guide/contract-func.html
21:50 Sgeo "blaming: top-level
21:50 Sgeo (assuming the contract is correct)"
21:51 Sgeo Other than that, I think Perl types are very similar to Racket contracts
21:51 Sgeo Except with saner syntax
21:51 timotimo that's kinda cool indeed
21:58 RabidGravy is the ability to be able to create trait introduction words likely to happen this year
21:59 timotimo trait introduction words, like "instead of 'is'"?
21:59 RabidGravy yeaf
22:00 laben good night|* #perl6
22:01 laben left #perl6
22:03 kaare_ joined #perl6
22:04 RabidGravy I'd just like 'with' but cramming it in the grammar seems a bit silly
22:06 smls Didn't TimToady just add `with` as a built-in block statement keyword?
22:07 smls Not sure if those technically conflict with trait keywords, but if not it would be confusing to users to reuse the same words.
22:07 spider-mario joined #perl6
22:08 RabidGravy they won't conflict in the grammar
22:09 dha Eek. p6doc can't find a file that's right in front of its face. That can't be good.
22:09 RabidGravy perl6 --doc helps for those
22:10 dha Yeah. I guess you can do that. But... ick.
22:15 vendethiel Sgeo: except that our types *might* get checked at compile-time
22:16 vendethiel racket contracts, not quite (well, until everyone uses the prover some uni has been working on, or until everyone moves to typed racket :P)
22:16 vendethiel Sgeo: I'm also unsure our roles are like racket's units... but that's an interesting question
22:18 Sgeo Blame is the most immediately useful Racket contract thing I can think of
22:20 vendethiel well, for one, it's not straightforward in racket to write stuff like "vector T --> vector T"
22:22 vendethiel (exists contracts aren't quite enough, IIRC)
22:44 psch oh blerg
22:44 psch sometimes i feel a few too many kinds of stupid
22:44 psch took me about 2 hours to realize that scientific notation for hex literals doesn't even make any sense...
22:51 RabidGravy hey I'm stupid all the time
22:52 dha I will vouch for you on this. :-)
22:52 RabidGravy cool
22:56 RabidGravy toodlepip anyway
22:58 dha ta
23:07 dha Ok. 5to6-perlfunc.pod now has a table of contents. 175 contents, but...
23:09 dalek doc: 36239c9 | (David H. Adler)++ | lib/Language/5to6-perlfunc.pod:
23:09 dalek doc: Added =head2 commands to 5to6-perlfunc.pod to allow htmlify.p6 to create
23:09 dalek doc: a table of contents for it
23:09 dalek doc: review: https://github.com/perl6/doc/commit/36239c918e
23:09 dalek doc: bb1f78d | (David H. Adler)++ | lib/Language/5to6-perl (2 files):
23:09 dalek doc: Merge branch 'master' of https://github.com/perl6/doc
23:09 dalek doc: review: https://github.com/perl6/doc/commit/bb1f78df7e
23:13 raiph joined #perl6
23:15 dha Ok, with that done. I'm going to go look for dinner.
23:20 cognominal joined #perl6
23:42 dayangkun joined #perl6
23:45 llfourn joined #perl6
23:53 jferrero joined #perl6
23:54 lizmat joined #perl6
23:56 psch hm, do we even have floating point non-dec-base literals designed..?
23:56 psch java has e.g. 0x4p2
23:56 psch m: say 0x4p2 # but that dies because method
23:56 camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PAbJFDrxhG␤Confused␤at /tmp/PAbJFDrxhG:1␤------> 3say 0x47⏏5p2 # but that dies because method␤»
23:56 psch m: say 0x4.2 # but *this* dies because method
23:56 camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/P4nN78kEpF␤Confused␤at /tmp/P4nN78kEpF:1␤------> 3say 0x4.7⏏2 # but *this* dies because method␤    expecting any of:␤        dotty method or postfix␤»

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

Perl 6 | Reference Documentation | Rakudo