»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
00:16 cognominal joined 00:26 skids left 00:32 aborazmeh joined, aborazmeh left, aborazmeh joined 00:45 tinyblak joined 00:59 llfourn joined 01:05 llfourn left
dalek kudo/glr: 91b2dd6 | skids++ | src/core/native_array.pm:
Add temporary short-circuits to "array" preventing some test hangs.
01:36
kudo/glr: 8450fbb | skids++ | src/core/Array.pm:
s/$!items/$!reified/ in typed array BIND-POS.
kudo/glr: 76b71ca | lizmat++ | src/core/ (2 files):
Merge pull request #495 from skids/glr

Add temporary short-circuits to "array" preventing some test hangs.
01:36 rangerprice joined
rangerprice Hi 01:37
01:40 dha joined 01:42 virtualsue joined 01:44 ilbot3 left 01:46 ilbot3 joined 01:47 skids joined
Zoffix hi 01:55
01:56 Peter_R left 01:58 Peter_R joined 01:59 eam left 02:00 eam joined
dha hi 02:03
dalek kudo/glr: 8a7b83f | lizmat++ | src/core/Cool.pm:
Undo special tests for index/rindex/indices

The test should really live in nqp::unbox_i, as mentioned in
  irclog.perlgeek.de/perl6/2015-08-15#i_11061969
02:07
02:09 bin_005_g_c left
lizmat dha o/ 02:10
Zoffix o/
rangerprice o/
dha lizmat- why are you awake? :-) 02:11
lizmat because it's 11am here, in Tokyo 02:12
dha Ah!
dha can't keep track of lizmat's location...
lizmat has a hard time as well
in 2 weeks, it'll be Switzerland
ShimmerFairy
.oO(Where in the World is lizmat Sandiego?)
lizmat and the week after that Spain
dha If This Is Tuesday, It Must Be Belgium.
ShimmerFairy++ 02:13
lizmat If It's Wednesday, This Must Be Rome :-)
dha lizmat++
lizmat dha++
ShimmerFairy lizmat++ dha++ :)
dha Most people do not get that reference. they jsut think I'm crazy. 02:14
Granted, I'm sort of used to that...
lizmat yeah... know the feeling :-) 02:15
dha Huh. Never realized that was written by Donovan.
lizmat was it ?
or does he claims he wrote it ?
:-)
dha Apparently, he did write it, but the version in the movie is by someone else. 02:18
02:31 noganex joined 02:34 noganex_ left 02:47 cognominal left 03:00 llfourn joined 03:06 llfourn left
ugexe this helps fix CURLI.install on glr if a better idea isn't needed github.com/ugexe/rakudo/commit/d17...907839a31f 03:10
that and %*CUSTOM_LIB<site> isn't getting created, so you get the no writable path error unless you manually create it 03:12
03:14 tinyblak left 03:27 AlexDaniel left 03:29 khw left
lizmat finally remembered the singer who made it famous in NL: Bojoura 03:50
www.youtube.com/watch?v=iB16qJmJGA8
03:50 BenGoldberg left
dalek ast/glr: 1c77dca | lizmat++ | S17-supply/lines.t:
Fix because <a b c> does not flatten inside []
04:01
dha Aparrently J. P. Rags did the version in the film, although Donovan is credited as "Singer in Youth Hostel" 04:02
04:04 aborazmeh left 04:08 llfourn joined
lizmat $ 6 '1...10' 04:12
Type check failed in binding; expected 'Positional' but got 'Seq'
jnthn: fixing that in SEQUENCE will probably make a lot of tests pass :-) 04:13
perhaps the underlying issue: $ 6 'say (10,).list.flat.WHAT' 04:17
(Seq)
afk for sightseeing&
dha have fun 04:21
04:38 aborazmeh joined, aborazmeh left, aborazmeh joined 04:45 aborazmeh left 04:46 dha left 05:02 aborazmeh joined, aborazmeh left, aborazmeh joined 05:03 rangerprice left 05:09 kaare_ joined 05:15 Alina-malina left 05:52 jack_rabbit joined 06:14 tinyblak joined 06:36 tinyblak_ joined 06:37 domidumont joined 06:39 tinyblak left 06:42 domidumont left, domidumont joined 06:52 rurban joined 07:00 dinesh_ joined
dinesh_ Hello, World !! 07:02
07:03 maddingu1 joined
nine m: my $World = 'Hello dinesh_!'; $World.say; 07:03
camelia rakudo-moar 383db0: OUTPUT«Hello dinesh_!␤»
07:04 pierrot_ joined
dalek ast/glr: a1990b5 | (Stefan Seifert)++ | S03-operators/assign.t:
Skip another test that hangs because of ,=
07:04
07:05 TimToady_ joined, aborazmeh_ joined, aborazmeh_ left, aborazmeh_ joined, ab5tract joined, bloonix_ joined 07:06 mls_ joined, krunen_ joined, f3ew_ joined, FROGGS_ joined, khisanth_ joined, tinyblak_ left, silug_ left, plicease left, aborazmeh left, bloonix left, pecastro left, TimToady left, krunen left, Guest90936 left, mls left, ilbot3 left, FROGGS left, pierrot left, Khisanth left, f3ew left, krakan left, slavik left, ab5tract_ left, maddingue left, bowtie joined, pecastro joined, krakan_ joined, aborazmeh_ is now known as aborazmeh 07:07 bowtie is now known as Guest63243, slavik joined
dinesh_ this might be a redundant question... but i am new to perl..my question is should i start with learning perl (old html book for perl 5) for learning perl 5 or with perl 6 with online docs that's available 07:07
?
07:07 ilbot3 joined
nine dinesh_: that's a tough one. It very much depends on what you are learning it for? 07:07
dinesh_ @nine .. i want to contribute to perl too as i do some production coding.. 07:09
07:09 diakopter left
JimmyZ learn both, and use whatever you want :P 07:11
07:14 silug_ joined
nine My answer would be: Perl 5 is currently the better career path. Perl 6 is more fun for me :) 07:15
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:17
dinesh_ thanks @nine and @JimmyZ ... 07:18
llfourn learning mojolicio.us/ is probably what i would recommend to someone wanting to learn and get things done at the same time 07:19
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:23 skids left 07:24 khisanth_ is now known as Khisanth 07:25 RabidGravy joined 07:37 aborazmeh left
dalek ast/glr: 9aa1eef | (Stefan Seifert)++ | S17-promise/allof.t:
Fix hang in S17-promise/allof.t

Need to flatten explicitely to avoid creating a self-referencing array.
07:37
07:44 llfourn left 07:48 Alina-malina joined, dinesh_ left 07:53 ChoHag joined
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:55
07:58 tinyblak joined 08:00 rindolf joined
[Tux] tux.nl/Files/20150816100056.png 08:01
panda not yet supported for glr? 08:03
08:03 tinyblak left
RabidGravy ChoHag, some variant of the latter, make it a Positional and implement AT-POS etc as per docs.perl6.org/language/subscripts#...bscripting 08:03
[Tux] note: my rakudobrew home is NOT ~/.perl6 08:04
08:05 domidumont left
[Tux] (or ~/.rakudobrew) 08:09
if I create the folder by hand, it still fails
[Tux] switches back to moar-nom
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? :)
ShimmerFairy :) 08:11
08:15 rhr joined 08:18 llfourn joined 08:20 rurban left
[Tux] Oh my. Entering utf-8 in git issues causes bad display in preview 08:21
but it shows correct when submitted 08:22
08:22 isBEKaml joined 08:24 darutoko joined 08:26 rurban joined 08:35 eam left, eam joined
nine ChoHag: I'd override [] 08:40
[Tux]: File::ShellCommand uses some meta ops that are NYI in glr 08:42
I tried before :)
_itz_ I've been trying to run ufo on glr on the basis its more likely to work than panda right now 08:43
of course it doesn't either
08:43 araujo left 08:44 laben joined
laben hello p6'ers 08:44
08:45 araujo joined 08:46 rindolf left, araujo left
_itz_ Method 'gimme' not found for invocant of class 'Array' 08:47
08:49 lizmat left, eam left 08:50 eam joined, araujo joined
nine One can get around missing panda by adding a lot of paths to PERL6LIB ;) 08:50
09:00 diana_olhovik joined 09:02 tinyblak joined
nine m: my @a; @a.push: [1, 2]; 09:14
camelia ( no output )
nine m: my @a; @a.push: [1, 2]; say @a;
camelia rakudo-moar 383db0: OUTPUT«1 2␤»
09:20 telex left 09:22 telex joined 09:25 rurban left
nine m: my @a; @a.push: [1, 2]; say @a.perl; 09:28
camelia rakudo-moar 383db0: OUTPUT«[[1, 2]]<>␤»
nine aha!
m: sub foo(\f) { say f.perl; }; foo([1]); 09:30
camelia rakudo-moar 383db0: OUTPUT«[1]␤»
nine m: my @v = [] xx 2; @v.perl.say; 09:31
camelia rakudo-moar 383db0: OUTPUT«[[], []]<>␤»
laben m: my @v = [1,2] , [3,4]; @v.perl.say; 09:33
camelia rakudo-moar 383db0: OUTPUT«[[1, 2], [3, 4]]<>␤»
laben what result should i get with glr?
the same or flattened? 09:34
JimmyZ the same
nine glr in general does less flattening 09:35
laben m: my @v=[1,2];@v.push: [3,4]; say @v.perl;
camelia rakudo-moar 383db0: OUTPUT«[[1, 2], [3, 4]]<>␤»
laben ok WORKSFORME 09:36
dalek ast/glr: 6eae697 | (Stefan Seifert)++ | S17-supply/unique.t:
Fix some copy&pasted test names to reflect what's actually being tested
09:36 RabidGravy left
dalek kudo/glr: 6fa6bef | (Stefan Seifert)++ | src/core/Supply.pm:
Fix hangs in Supply.unique

Need to itemize the Array argument to push. Otherwise it will be slurped in.
09:37
nine Only 4 hanging test files left! :) 09:41
09:42 diana_olhovik left 09:46 FROGGS__ joined 09:49 FROGGS_ left
nine And one is because List.rotor is NYI 09:49
09:54 plicease joined 09:58 diana_olhovik_ joined
_itz_ nine++ 10:05
10:05 TEttinger left 10:06 pmurias joined
dalek p/js: 2635c3b | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
When compiling the pass regex op insert commas correctly
10:06
p/js: 9470abb | (Pawel Murias)++ | / (3 files):
Implement and test nqp::getlexdyn.
10:13 isBEKaml left
nine m: say 3.list; 10:16
camelia rakudo-moar 383db0: OUTPUT«3␤»
nine m: say 3.list.perl;
camelia rakudo-moar 383db0: OUTPUT«(3,)␤»
nine m: my @c := 3.list; my @d := (@c xx 3).list; say +@d[0]; 10:18
camelia rakudo-moar 383db0: OUTPUT«3␤»
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:19
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:20
For someone who works on fixing GLR TODOs, I have surprisingly little understanding of Perl 6' listy features :/ 10:21
m: my @c := 3.list; my @d := (@c xx 3).list; say @d.perl;
camelia rakudo-moar 383db0: OUTPUT«(3, 3, 3)␤»
nine m: my @c := 3.list; my @d := (@c xx 6).list; say @d.perl;
camelia rakudo-moar 383db0: OUTPUT«(3, 3, 3, 3, 3, 3)␤»
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,))␤»
ShimmerFairy well, they're itemized now, but otherwise mostly the same :P
nine: does .list have a meaning of "any listy thing", or is it supposed to be basically .List in GLR? 10:23
nine Array inherits .list from List if that answers your question. 10:27
So I'd say the former.
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);
camelia rakudo-moar 383db0: OUTPUT«[3]<>␤»
10:29 [Tux] left
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␤»
nine Oh, in glr, I get $[3]. That's the difference 10:30
10:30 rindolf joined
dalek kudo/glr: de6156a | (Stefan Seifert)++ | src/core/List.pm:
Bring back List.rotor

Fixes hang in t/spec/S32-list/rotor.t
10:33
nine One down, three to go :) 10:34
10:40 xinming joined, [Tux] joined, rindolf left 10:41 xinming left, xinming joined 10:50 llfourn left 10:52 tinyblak left 10:54 shamu joined 11:01 domidumont joined, rurban joined
dalek pan style="color: #395be5">perl6-examples: f93f916 | paultcochrane++ | categories/parsers/ (2 files):
Add vim coda and fix whitespace issues in parsers category
11:07
pan style="color: #395be5">perl6-examples: 3d6051b | paultcochrane++ | categories/parsers/ (2 files):
Add v6 pragma to parsers examples
pan style="color: #395be5">perl6-examples: 9b98ee5 | paultcochrane++ | categories/parsers/ (2 files):
Add docs to parsers category examples
pan style="color: #395be5">perl6-examples: 88e6653 | paultcochrane++ | lib/Pod/Htmlify.pm6:
Find and process example .pm files
11:09 smls joined 11:11 brrt joined 11:13 tinyblak joined 11:14 llfourn joined, espadrine joined
nine woah! "g" > 0; hangs in glr! 11:28
Which is the reason for the hang in t/spec/integration/advent2012-day13.t 11:29
11:30 RabidGravy joined 11:31 maddingu1 is now known as maddingue 11:43 Possum left 11:46 ecocode joined 12:01 ggoebel2 joined 12:03 ggoebel left 12:17 BenGoldberg joined, TimToady_ is now known as TimToady, TimToady left, TimToady joined, jdos2 joined
TimToady [6~[6~[6~[6~[6~[6~/e 12:17
12:20 tinyblak left, lizmat joined
RabidGravy I don't think I have the font for that :-\ 12:26
12:27
ShimmerFairy Those are just ANSI escape codes. For... something.
TimToady page down, as it happens 12:31
12:35 brrt left
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:35
12:37 tinyblak joined 12:40 rindolf joined
RabidGravy I just couldn't see the little numbers in the square which xchat put in place of the characters 12:41
12:41 domidumont left
RabidGravy is it deliberate that Routine.wrap doesn't honour the "is rw" on the wrapper Routine? 12:42
m: my $a = "10"; my $s = sub () is rw { $a; } $s.wrap(sub () is rw { say "wrapped"; nextsame } ); say $s(); $s() = "foo"; say $s();
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…»
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();
camelia rakudo-moar 383db0: OUTPUT«wrapped␤10␤wrapped␤Cannot assign to a readonly variable or a value␤ in block <unit> at /tmp/OLMySVnHHQ:1␤␤»
RabidGravy rather
feels like a bugette to me
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
m: role R { multi method M($a) { !!! } }; class C does R { multi method M($name) { say "HELLO $name" } }; C.M("SAILOR")
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␤␤»
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"?
ShimmerFairy laben: yes, but it doesn't allow me to require specific multis :)
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
laben if you specify proto foo (Int $a, Int $b) arent they forced to have the same signature? 12:50
i thought proto specified the vaguest possible signature multi can then implement 12:51
like proto ($a, $b?) allows for multi ($a) and multi ($a, $b)
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:52
RabidGravy that feels like a bug to me too 12:54
laben RabidGravy: which one?
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)
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 :)
(by docs I mean specs, specifically) 12:57
lizmat m: my @a; if @a.grep({$_}) -> @b { say @b.elems } 13:03
camelia ( no output )
lizmat $ 6 'my @a; if @a.grep({$_}) -> @b { say @b.elems }'
0
^^^ subtle change in GLR
13:04 diana_olhovik_ left
lizmat jnthn TimToady: ^^^ is that to be expected? it feels like a bug to me 13:05
13:05 MilkmanDan left
ShimmerFairy m: my @a; say @a.grep({$_}).perl; say ?@a.grep({$_}) 13:06
camelia rakudo-moar 383db0: OUTPUT«()␤False␤»
ShimmerFairy Could it be that boolification hasn't been corrected yet? 13:07
lizmat $ 6 'my @a; say @a.grep({$_}).perl; say ?@a.grep({$_})'
Seq.new
True
I guess it's the instantiated Seq that's True
ShimmerFairy Yeah. I wonder how you can tell if it would generate anything.
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
lizmat yeah, that fixes it
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
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 :)
lizmat and it doesn't know it's empty at the moment the Seq.new is done
dalek kudo/glr: ac9d315 | lizmat++ | src/core/signals.pm:
Make signal() work again
13:12
ShimmerFairy Another thought: if grep returned a (Seq) for no matches, then you could probably switch that 'if' to a 'with'
lizmat yeah, but the point was that I wanted it to wind up in @b :-)
*and* not fire the if if it was empty :-) 13:13
13:13 rmgk is now known as Guest29002, rmgk_ joined, Guest29002 left, rmgk_ is now known as rmgk
ShimmerFairy with can store things in variables though, right? :) 13:13
lizmat duh :-) 13:15
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
it has already returned by then
nine Shortest glr hang yet, in just 5 characters: "a" <0
m: "a" <0
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:…»
nine m: "a" < 0
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…»
nine m: say "a" < 0
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:…»
lizmat yeah, I was trying with signal(SIGINT).tap(&die) to get a stacktrace, but alas
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 :)
laben ShimmerFairy: you mean you get an "ambiguous call" error? 13:19
ShimmerFairy yes
laben lemme try that, i only tried wrong ones on purpose
lizmat nine: I assume you mean Exception.pm ? 13:20
laben ShimmerFairy: you're right, it does say that. how do we disambiguate then? 13:21
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
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.
laben yeah, that would also probably auto fix the non compile time error thing
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:23
laben the synop you mention is S14, right? 13:24
ShimmerFairy I don't think I mentioned a specific one 13:25
I did say I was writing a new version of S32::Str(ingy), though :)
laben ok but the roles one is that one, or are there other mentions?
ShimmerFairy S14, S03, S10, S12, S32::Exception, S11, and S06 all contain the word "stub" in them :) 13:26
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:27
13:27 tinyblak left
laben i think this section is quite clear that it should work like you mean, design.perl6.org/S14.html#Compile-t...omposition 13:28
quote "A class's explicit method definition hides any role definition of the same name"
also "Alternately, if the role's methods are declared multi, they can be disambiguated based on their long name." 13:29
13:29 tinyblak joined
laben i think maybe the multi stub thing is just NYI 13:29
RabidGravy ignore my previous question about wrap, it is actually the difference between nextsame & callsame that confused me 13:38
psch nqp-m: my $x := "0x02"; nqp::say(~+$x) # #124559 13:41
camelia nqp-moarvm: OUTPUT«2␤»
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124559
psch nqp-j: my $x := "0x02"; nqp::say(~+$x) # #124559
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124559
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␤»
psch hum, does nqp-j even actually work here?
also, hi #perl6 o/ 13:42
RabidGravy :)
psch $ nqp-j -e'my $x := "0x02"; nqp::say(~+$x)'
0
^^^ that was the desired output :)
instead of SIGABRT
13:44 skids joined
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:47
nine lizmat: of course Exception.pm, yes :) 13:48
psch laben: the mmd code is in Perl6/Metamodel/BOOTSTRAP.nqp:2280
(about there, somewhere... :) )
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
psch: yeah i think we should fix stubs at composition time nad let the rest as it is now
s/nad/and/
it is done for normal stubs, but not for multi ones 13:50
IMO it would adhere to the specs and be quite the useful and intuitive behaviour
psch laben: i suspect figuring out how to tell if a given multi has "throw X::StubCode" as code could be fun :) 13:57
laben psch: is that the exception thrown by .yada? 13:58
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
oh, even nqp
ShimmerFairy psch: interestingly, multi methods in roles don't show up in Role.^methods O_o 14:00
laben oh wow, i did not know there were mutliple ways to define a yada with different results 14:01
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
m: role F { method f { }; multi method g { } }; say F.^methods, F.new.^methods # punning helps
camelia rakudo-moar 383db0: OUTPUT«ff g␤»
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 14:06 aborazmeh joined, aborazmeh left, aborazmeh joined
ShimmerFairy psch: ParametricRoleHOW does Perl6::Metamodel::MultiMethodContainer, but ParametricRoleGroupHOW doesn't. 14:07
m: role R { }; say R.HOW.WHAT
camelia rakudo-moar 383db0: OUTPUT«(Perl6::Metamodel::ParametricRoleGroupHOW)␤»
psch that does look like it could have something to do with it 14:09
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
14:10 zakharyas joined 14:11 aborazmeh left, domidumont joined
ShimmerFairy psch: I have an idea, but I'd be very surprised if I get it right the first time :P 14:12
psch ShimmerFairy++ 14:14
not like my ideas work out the first time usually :)
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:19
laben are there no tests for this kind of behaviour? 14:21
14:26 BenGoldberg left
ShimmerFairy laben: I'd imagine not, since the spec mentions nothing explicit about multi method stubs :) 14:27
14:27 RabidGravy left 14:28 llfourn left
laben ShimmerFairy: well then, you have the honour of spec'ing and testing this stuff XD 14:28
14:28 Zoffix left 14:29 [TuxCM] joined
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
(which as I understand the comments, the applier tries to avoid doing any of ☺)
14:29 llfourn joined
dalek kudo/glr: 9c5d5da | lizmat++ | src/core/Iterator.pm:
Add naive implementation of Iterator.count-only

The idea being that if we have a situation like "foo".IO.lines.elems, we can call "count-only" on the iterator, which would not bother pushing anything to the target, but do a much faster low level count. *AND* would allow any consumer class to optimize that case even further (like now with the :count adverb on IO::Handle.lines).
14:33
psch ShimmerFairy: my metamodel-fu is rather limited as well, i can't really give any advice
14:34 jdos2 left
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:34
lizmat .tell jnthn could you look at the sanity of github.com/rakudo/rakudo/commit/9c5d5da13f ? :-) 14:35
yoleaux lizmat: I'll pass your message to jnthn.
14:37 BenGoldberg joined 14:39 khw joined 14:40 rurban left
psch #124599 is turning out rather interesting :/ 14:42
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124599
psch i can't find an appropriate spot in moar to cargo-cult anything
the problem comes down to nqp using Double.parseDouble for << ~+"0x02" >>, but that doesn't know about bases 14:43
Long.parseLong does, but that's not what we're using there
ShimmerFairy Isn't Double for floating-point anyway? 14:44
psch i'm hesitant to go smart_numify -> coerce_s2n -> coerce_n2i
err
s/n2i/i2s/
ShimmerFairy: yeah, double precision
m: (+"0x02").WHAT.say 14:45
camelia rakudo-moar 383db0: OUTPUT«(Int)␤»
psch j: (+"0x02").WHAT.say
ShimmerFairy nqp-m: say(~+"0x02.8")
camelia rakudo-jvm 383db0: OUTPUT«(Int)␤»
nqp-moarvm: OUTPUT«2.5␤»
14:45 cognominal joined
psch but nqp-j has some wonkies in ~+"0x02" handling 14:45
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:46
psch ShimmerFairy: yeah, the first suggestion should work out; Double can't handle non-10 bases at all it 14:47
...which is kind of annoying, because java allows hex float literals :l 14:49
oh, valueOf, not parseDouble 14:50
psch makes a note to read docs more thoroughly
ah, but that only gets me hex, no oct or bin 14:51
nqp-m: say(~+"0o10") 14:52
camelia nqp-moarvm: OUTPUT«0␤»
psch well, in that case... :P
nqp-m: say(~+"0b10")
camelia nqp-moarvm: OUTPUT«0␤»
nine I think it's actually List.join that may cause the infinite loops 15:00
15:04 huf left
lizmat $ 6 '<a b c>.list.join("").say' 15:06
abc
nine: seems fine to me ?
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:09
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")
+ #"Did you mean '{ @s.join("', '") }'?";
lizmat wishes we had a glr: on camelia
do you mean it dies there (with a stacktrace) or hangs ? 15:12
nine hangs
with hang meaning that it eats CPU and memory until you kill it
mst nine: well, it *is* called nom ... 15:13
lizmat mst: :-)
nine :) 15:14
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.
ugexe module fetch/build/test/install seems to be 15% faster on glr atm for what takes 65s on nom 15:17
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.
dalek kudo/glr: 18e485a | (Stefan Seifert)++ | src/core/Exception.pm:
Fix hang when creating X::Multi::NoMatch exception message

Looks like another self-referencing array created by @a = 'foo', @a;
15:29
15:29 diana_olhovik joined
nine Or maybe List.join is innocent after all. 15:29
lizmat nine++ :-) 15:31
ugexe perl6 -e 'say %CUSTOM_LIB<site>' 15:33
(Mu)
i cant find where such directories get created :(
nine Wow, looks like this fixed all remaining hangs :)
make spectest is safe now
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
very well done, everyone!
nine And now I have to be off to show a newbie how to fly :) 15:35
timotimo cool
what kind of vehicle?
lizmat hopes a plane of sorts 15:38
dalek kudo/nom: f185e08 | lizmat++ | src/core/SupplyOperations.pm:
Get rid of class names

So we don't have to specify them twice
15:45
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:52
laben shouldnt it be the same as long as B is still in a INCluded path? 15:55
15:55 eam left, tinyblak left
lizmat ugexe: afaik, the path of any pre-compiled dependencies is hard-code into the pre-comp 15:56
*hard-coded
whether that is an absolute path or not, I don't know
ugexe i see. thanks! 15:57
dalek rl6-roast-data: 597b128 | coke++ | bin/git.p5:
Revert "stop fetching pugs."

This reverts commit 3c97153f10cfbd8e8c141f5fa5b5ef12e4eeff9d.
16:05
rl6-roast-data: 29fcc95 | coke++ | bin/cull:
Revert "don't add pugs to the daily list of runs"

This reverts commit 3b54531b6b6f93c94efdff97019a007cf0de9350.
rl6-roast-data: f6b1285 | coke++ | bin/ (2 files):
Revert "Stop running Pugs every day."

This reverts commit 6c41218378810731692a772f06950cffa6652f70.
Conflicts: bin/doit
lizmat $ 6 'my @a; @a.push: [0,1,2]; say @a.perl' 16:19
[0, 1, 2]
^^^ 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
camelia rakudo-moar 383db0: OUTPUT«[[0, 1, 2]]<>␤»
lizmat laben: that's pre GLR, my code is on the GLR 16:24
laben is there a way to tell camelia to run rakudo-glr? 16:25
lizmat not yet, In wish there was 16:28
someone like moritz or FROGGS could set this up quite quickly, I would hope :-) 16:29
dalek kudo/glr: 360ac8e | lizmat++ | src/core/asyncops.pm:
Make EARLIEST somewhat more functional

  @a.push: [1,2,3] is flattening the values, fixed by manually itemizing.
Which brings us to the next bug, with @todo.pick(*) apparently not being allowed to run more than once. Weird.
16:37
lizmat and with that, I call it a day...
so good night #perl6 from Tokyo!
[Coke] m: 48 X/ 3,4 # dies on glr with "Method gimme not found..." 16:43
camelia ( no output )
laben [Coke]: iirc metaops are NYI or WIP in glr 16:48
16:52 RabidGravy joined
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:07
17:11 brrt joined
ChoHag Can you have a scalar which is restricted to only one of two completely unrelated things? 17:13
my Foo|Bar $thing;
flussence nope, you need to use a subset for that currently 17:15
RabidGravy well you can do "my $a where Foo|Bar;" 17:17
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)␤»
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␤»
psch m: class A {}; class B {}; subset C where A|B; my C $x = Foo.new; say $a; $a = 1 # flussence++
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++␤»
psch m: class A {}; class B {}; subset C where A|B; my C $x = Foo.new; say $x; $x = 1 # two is enough
camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Pwnjb0ggEG␤Undeclared name:␤ Foo used at line 1␤␤»
psch why oh why
i'm losing focus :P
RabidGravy the ^ code does work in my REPL
psch m: class A {}; class B {}; subset C where A|B; my C $x .=new; say $x; $x = 1 # two is enough
camelia rakudo-moar f185e0: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
psch oh, the .=new is bogus anyway 17:20
i'm really not quite there right now it seems
m: class A {}; class B {}; subset C where A|B; my C $x = A.new; say $x; $x = 1 # two is enough
camelia rakudo-moar f185e0: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
psch yeah, i give up
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
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␤␤»
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;
camelia rakudo-moar f185e0: OUTPUT«Type check failed in assignment to '$a'; expected '<anon>' but got 'Int'␤ in block <unit> at /tmp/rdYBmgqlQq:1␤␤»
RabidGravy does work 17:22
psch m: class A {}; say 1 ~~ A
camelia rakudo-moar f185e0: OUTPUT«False␤»
psch RabidGravy++
j: class Bar {}; class Foo { }; my $a where Foo|Bar; $a = Foo.new; say $a; $a = 1;
camelia rakudo-jvm f185e0: OUTPUT«===SORRY!===␤Can not invoke object '&infix:<|>'␤»
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)␤»
RabidGravy yeah it's something boguesa with the "say"
17:26 baest_ joined 17:28 baest left 17:32 cognominal left 17:43 [TuxCM] left, dha joined 17:45 ecocode left 17:46 Sgeo left
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␤»
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');
camelia rakudo-moar f185e0: OUTPUT«CLASS␤»
17:50 jack_rabbit left
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
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␤␤»
psch but that's because i expect the role method to be fully shadowed 17:51
...which might not be as designed :)
laben psch: the class method it's equally strict as the role method in your case, in mine it's Int vs Any
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
laben it checks only names
and since roles are composed after class defs
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␤»
laben if class defines a method with that name, the role one is superseded
psch laben: that probably shows clearest what you mean, iiuc
17:53 jack_rabbit joined
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
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?
laben psch: im gonna read a bit more of the specs to see if there's somethign to clarify
psch laben++ 17:55
i'm still fiddling with those hex (and oct and bin...) strings :)
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) 17:56
psch laben: actually, i think composition time might be prohibitively difficult to do useful enough 18:04
laben: .^add_method is around after all
hm, but methods carry their own dispatcher around, don't they 18:05
i guess in the end we'd need someone who actually *knows* the dispatch code... :)
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:06
psch: that is the hard part, adding methods or multis is easy 18:07
18:07 huf joined
psch laben: oh, okay. right, you mentioned "would be nice", not "is buggy" 18:08
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:10
18:13 jack_rabbit left
psch doesn't feel particularly core-dev-y 18:13
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.
laben whew, i guess i can see where my non-english nativeness comes out
sjn \o
laben needed to much time to write that statement clearly
psch commit bit not withstanding...
laben s/to/too
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
sjn is trying to figure how to elegantly generate a color cube values 18:18
-a
18:19 spider-mario joined
nine timotimo: it was this one: segelflieger-linz.at/static/1/7/8/2..._Kopie.JPG 18:20
lizmat: ^^^
dha nine - you left me a message asking about the p5->p6 docs recently, yes?
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 github.com/dha/perl5-to-perl6-docs
nine thanks :)
dha Although, as I get ready to put them in the docs, the names of the files may change.
probably s/may/will/; :-) 18:22
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:23
dha Well, if they're NYI, you can't really use them, can you? :-) 18:24
nine NYI on glr
skids Yeah, it is hard sometimes when writing tests for one feature to go through the extra effort not you use other features.
*to
18:25 rindolf left, zakharyas left
pmurias nine: how does Inline::Perl5 work with precompilation? 18:25
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」␤»
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.
skids (In glr-implementing that ATM).
*I'm
like can :nth + :x be applied to a grammar somehow... 18:29
pmurias and precompilation is still done manually?
nine 271/1036 test files failing on glr
pmurias: yes, it's still done by panda
pmurias :( 18:30
18:30 FROGGS__ is now known as FROGGS
FROGGS o/ 18:30
psch o/ FROGGS
18:30 ChoHag left
nine 272/1047 test files failing on glr when Inline::Perl5 is available :) 18:35
18:36 yqt joined 18:37 llfourn left
FROGGS likes to remove stuff from roast like this one: my @s = { $^a <=> $^b }.sort: @a; 18:38
FROGGS just goes on and does it 18:39
18:39 llfourn joined
dalek ast: cf34ae9 | FROGGS++ | S32-list/sort.t:
remove tests for Callable.sort(), which is insane
18:43
ast: f827beb | FROGGS++ | S32-list/grep.t:
remove tests for Callable.grep(), which is insane
18:47
18:47 llfourn left
dalek ast: b007c41 | FROGGS++ | S32-list/ (2 files):
adjust plan
18:48
18:51 [Tux] left, BenGoldberg left, [Tux] joined
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␤␤»
laben m: say Int.HOW;
camelia rakudo-moar f185e0: OUTPUT«Perl6::Metamodel::ClassHOW.new␤»
laben m: say Int.HOW.WHAT;
camelia rakudo-moar f185e0: OUTPUT«(Perl6::Metamodel::ClassHOW)␤»
laben how can i inspect .HOW?
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␤␤»
laben m: dd Int.HOW.WHAT.^attributes
camelia rakudo-moar f185e0: OUTPUT«Method 'perl' not found for invocant of class 'NQPAttribute'␤ in block <unit> at /tmp/TFr2drQli0:1␤␤»
laben m: dd Int.HOW.WHAT.^methods
camelia rakudo-moar f185e0: OUTPUT«Method 'perl' not found for invocant of class 'NQPRoutine'␤ in block <unit> at /tmp/DLJlu84Avi:1␤␤»
dalek ast: c82bbd5 | FROGGS++ | S05-metasyntax/charset.t:
add test for RT #120511, <?[\n]>
18:57
synbot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=120511
18:59 [Tux] left
dalek kudo/glr: 3bb6333 | ugexe++ | src/core/CompUnitRepo/Local/Installation.pm:
Distribution.provides initialization

Works around a rw parameter related 'Cannot assign to an immutable value' and allows `CompUnitRepo::Local::Installation.install` to finish.
18:59
kudo/glr: 552f8ab | FROGGS++ | src/core/CompUnitRepo/Local/Installation.pm:
Merge pull request #497 from ugexe/patch-1

Distribution.provides initialization
18:59 [Tux] joined 19:02 BenGoldberg joined 19:03 vendethiel joined
vendethiel waves from home 19:04
I don't know how you people keep traveling like this :-). one day in the train and I'm totally exhausted...
dha I'm exhausted and I haven't gone anywhere but downtown. 19:05
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:06
Thoughts? 19:07
FROGGS +1
vendethiel +1 :) 19:10
(as someone whose first perl5 program was pretty much last week...)
dha Congratulations! :-) 19:13
19:13 domidumont left 19:19 jack_rabbit joined
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
vendethiel pmurias: I used the book woolfy++ and lizmat++ gave me :-) 19:20
dha Which one? 19:21
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:22
dha Ah. 19:23
vendethiel dha: you don't like that book?
dha No! Good book!
That was just a confirming "ah". :-)
vendethiel :) it was a looong road. But a well worth it one! 19:24
and it gave me new insights as to why some things work this way in perl6. What was "fixed", or something
dha Actually, although I have it, I'm not sure I've read the 4th edition. :-)
Just so many times you can read that thing... :-) 19:26
19:27 jack_rabbit left
vendethiel Right! I probably wouldn't go through it many times as well. 1000+ pages is a lot to read... 19:27
dha Yep. :-) 19:29
19:33 telex left 19:34 telex joined 19:41 dha_ joined 19:42 dha left
skids my @a = (1,2,3).grep: { 42.say; True.last }; @a.say; # any trick to finagle this before it is implemeted? 19:43
19:50 dha_ is now known as dha
vendethiel skids: True.last? 19:51
dalek p/js: c264dcc | (Pawel Murias)++ | src/QRegex/Cursor.nqp:
Revert "Port over a hack, pass more tests on the js backend."

This reverts commit f15ab3c077002d80b8a126801d10f135ca03f711.
19:55
p/js: 6aedbc4 | (Pawel Murias)++ | src/vm/js/nqp-runtime/runtime.js:
Call the .Str method when we don't know how to stringify something
p/js: 85faf51 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Partial implementation of rxtype subrule
19:59 FROGGS left
dha Ok, with a +2 to go on, and no dissent, I'm going to go with this naming scheme. 19:59
20:03 brrt left
RabidGravy dha, for the sake of dewarnockificaztion that seems cool to me 20:06
dha Thanks.
Now, the question is, do I fork and do a pull request, or do I just commit directly to the main tree?
RabidGravy straight in I'd say, people can make their own changes :) 20:08
pmurias it's always possible to revert
dha Ok, then.
nine @ 20:09
dha: congratulations :)
dha Thanks. :-) 20:10
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!
laben MMD code is ginormous, i dont even know if i should check out analyze_dispatch or find_best_dispatchee :/ 20:14
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
the thing I wanted was "current-line" or something ($. in perl5 IIRC, and NR in awk)
(really, it's about writing one-liners, "perl6 -Msloppy" or something ;-).) 20:17
laben did you check github.com/dnmfarrell/Perl6-One-Liners ? 20:18
vendethiel at the very beginning, I think. 20:19
20:19 zakharyas left
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
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:22
pmurias what the heck is ++$? 20:23
laben $ perl6 -ne 'if ++$ == 5 { say $_ }' example.txt
pmurias: dunno, but it works
vendethiel pmurias: implicit state, anonymous variable 20:24
equivalent to "++(state $)"
laben: again -- not easy to make it work with ff
well, I'd have to name it :(-
laben vendethiel: with ff you mean flipflops? 20:25
vendethiel laben: yes
dha Well, here goes nothing...
dalek c: dead7d2 | (David H. Adler)++ | lib/Language/5to6-perl (4 files):
Added 5to6-perlfunc.pod, 5to6-perlop.pod, 5to6-perlsyn.pod, and
vendethiel dha++
20:25 darutoko left
dha Thanks. 20:25
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.
BenGoldberg m: ++$ == 6 and .say for lines
camelia rakudo-moar f185e0: OUTPUT«Ag taisteal dom amach trí chnoic Ghleann Domhain ’s an Mucais ar mo chúl␤»
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
RabidGravy oh I see
vendethiel yes, awk's "," is ... "surprising" to say the least
BenGoldberg m: my $test = 5; say ($test ~~ 5|10) 20:28
camelia rakudo-moar f185e0: OUTPUT«True␤»
RabidGravy oh I see
BenGoldberg Instead of an 'if', maybe you need to use 'given'/'when' ?
laben m: my $a = 7; say ($a ~~ 5..10)
camelia rakudo-moar f185e0: OUTPUT«True␤»
RabidGravy perl6 -ne 'say $_ if ++$ ~~ (10 .. 15)' README.m
laben here it is
BenGoldberg m: given( 5 ) { when(5|10) { .say } }
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 /…»
vendethiel BenGoldberg: `given $++ { .. stuff here }`?
BenGoldberg m: given ( 5 ) { when (5|10) { .say } }
camelia rakudo-moar f185e0: OUTPUT«5␤»
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
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␤»
laben m: ++$ ~~ 10..15 and .say for lines
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…»
laben should be good enough
vendethiel: is that ok for your use? 20:30
vendethiel laben: no, because I can't print the line number now
dalek c: 0cec370 | (Steve Mynott)++ | lib/Language/5to6-perl (2 files):
fix minor typos
20:31
laben m: if ++$ ~~ 10..15 { say $, $_ }
camelia ( no output )
vendethiel I guess "given ++$ { ... }" can work, though
laben m: if ++$ ~~ 10..15 { say ($), $_ } 20:32
camelia ( no output )
vendethiel (given ++$ {when 10..15 { .say }})
BenGoldberg m: for ( lines.kv ) -> $i, $line { next unless $i ~~ 5|10; say $i, $line }
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␤»
BenGoldberg How about that? 20:33
vendethiel BenGoldberg: interesting that you put the parentheses *outside* the for's call :)
BenGoldberg: it's a bit "long" for one-liners. but yes, it works.
laben m: if ++$n ~~ 10..15 { say $n , $_ } #### this should do
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␤»
BenGoldberg The parens are optional there.
laben ok not on camelia but on shell
BenGoldberg m: for lines.kv -> $i, $line { say $i, $line if $i ~~ 5|10 }
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␤»
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?
laben vendethiel: can you try that one "if ++$n ~~ 10..15 { say $n , $_ }"?
vendethiel laben: needs something to be put in lax-mode, no? 20:35
laben vendethiel: should work out by default
vendethiel needs to recompile a new perl6
laben vendethiel: WORKSFORME, tried just now
vendethiel laben: great, thanks :-). 20:36
laben vendethiel: i recommend rakudobrew
vendethiel laben: I prefer doing it by hand, but thanks
RabidGravy maybe someone should do an a2p6 and shake this stuff out ;-)
vendethiel laben: now, how do you get the equivalent to FNR? current file's line number?
I looked at the ArgFiles class, but it doesn't have any such thing :(. 20:37
dha RabidGravy - Well volunteered! 20:39
laben vendethiel: can check out $*ARGFILES 20:40
vendethiel laben: don't worry... I did ;-)
laben: ArgFiles is the class implementing that.
20:40 bin_005 joined
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
dha \o/
vendethiel laben: well, I'd think we might get some -Msloppy or something, kinda like "6;"
that could be a nice slang, I guess? 20:42
vendethiel 's not sure it needs to be a slang at all
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
vendethiel laben: I wrote my first "awk" script last week, I have no clue what i'm doing :) 20:44
laben vendethiel: if you can somehow find if the current file has changed, you could reset $ 20:45
geekosaur *perk*
vendethiel laben: yeah. but I think that's just going to be too much anyway.
laben vendethiel: how to do that in a one liner is a challenge
geekosaur also I thought at one point there was something documented about how to emulate the magic perl5 $. behavior
vendethiel I was just asking random questions about one-liners :P
I'm not asking for perl5's "if 5 {}" 20:46
laben let's see what others one liners we can port
vendethiel laben: awk can be used to write great *scripts* :P github.com/vendethiel/inibeauty/bl...beauty.awk 20:47
or github.com/vendethiel/psmemparse/b...parse.gawk :P
vendethiel notices he forgot to commit the perl6 version
20:49 llfourn left
vendethiel oh, I also think I found a bug related to... multi-dispatch with &-capture? not sure. lemme get a reprod here... 20:49
(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
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␤»
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!␤»
vendethiel alright, it seems this "bug" was fixed on master. I'll update my rakudo and double check :-).
20:59 diana_olhovik left 21:04 bin_005_v joined, bin_005 left
dalek kudo-star-daily: 05ced75 | coke++ | log/MoarVM- (4 files):
today (automated commit)
21:09
21:10 cognominal left 21:12 Sgeo left, Sgeo joined
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]]<>␤»
dha Hrm. 5to6-perlfunc seems to be slightly troublesome. Otherwise, I think things went fairly well. 21:16
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 :)
timotimo DrForr: what? where? :)
dha Ooh. My first blog comment. 21:22
DrForr Re: dha above.
dha Now if only I can figure out how to get the perlfunc file to index correctly... Hrm...
DrForr Yeah, thought I'd spread the joy, especially seeing as I'll own another blog site soonish :)
timotimo: Getting lightning out here too. 21:25
May have to open my door after turning out the lights.
dha Another blog site? 21:26
DrForr blogs.perl.org :) 21:27
dha oh, right.
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:30
21:33 AlexDaniel joined
psch ooh lightning storm 21:33
the tennants i lived in got struck by lightning 3 nights back
blew the FI
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 :)
(i probably should have gone with "fuse") 21:35
laben: i don't think trying to match EOF makes sense 21:36
laben: regexen operate on strings, not on files
laben psch: ok, but if i slurp more than one file in a string...
psch (also, tenaments instead of tennants, which i think isn't actually a word...) 21:37
timotimo github.com/zkat/maybe-hugs/tree/master/perl6 - tee hee
psch laben: if you do that you're in control of what ends up in your string, which means you can insert a separator
laben: that's what i'd do at least :)
laben: probably doesn't help with one-lining/golfing it, though, i readily admit that 21:38
dha tenant is a word. 21:39
timotimo i'd really rather slurp into multiple slots of an array
that way i wouldn't have to split by self-invented separator
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 :)
timotimo could also have invented a (>^_^)> infix operator
ooh! brrt blogged 21:42
psch m: say 0x1e1024 21:43
camelia rakudo-moar f185e0: OUTPUT«1970212␤»
21:44 llfourn joined
smls dha: You could just have multiple consecutive =head2's, no? If it's just for the table of contents. 21:45
21:45 TEttinger joined
psch dha: yeah, but it wasn't the one i wanted to have there. nobody got hurt, as far as i know... 21:46
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:47
smls then group them under one header :P 21:48
dha Hm. I may have to revise the way the document is laid out. :-/
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␤␤»
Sgeo m: sub badfunc(--> Str) { 1+1; };
camelia ( no output )
21:49 llfourn left
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␤␤»
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 docs.racket-lang.org/guide/contract-func.html
"blaming: top-level
(assuming the contract is correct)"
Other than that, I think Perl types are very similar to Racket contracts 21:51
Except with saner syntax
timotimo that's kinda cool indeed
RabidGravy is the ability to be able to create trait introduction words likely to happen this year 21:58
timotimo trait introduction words, like "instead of 'is'"? 21:59
RabidGravy yeaf
laben good night|* #perl6 22:00
22:01 laben left 22:03 kaare_ left, kaare_ joined
RabidGravy I'd just like 'with' but cramming it in the grammar seems a bit silly 22:04
smls Didn't TimToady just add `with` as a built-in block statement keyword? 22:06
22:07 spider-mario left
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
22:07 spider-mario joined
RabidGravy they won't conflict in the grammar 22:08
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:09 kaare_ left 22:10 AlexDaniel left
dha Yeah. I guess you can do that. But... ick. 22:10
vendethiel Sgeo: except that our types *might* get checked at compile-time 22:15
22:16 smls left
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
Sgeo: I'm also unsure our roles are like racket's units... but that's an interesting question
Sgeo Blame is the most immediately useful Racket contract thing I can think of 22:18
22:19 bin_005_v left
vendethiel well, for one, it's not straightforward in racket to write stuff like "vector T --> vector T" 22:20
(exists contracts aren't quite enough, IIRC) 22:22
22:27 virtualsue left 22:29 grondilu left 22:30 bjz left 22:34 lizmat left
psch oh blerg 22:44
sometimes i feel a few too many kinds of stupid
took me about 2 hours to realize that scientific notation for hex literals doesn't even make any sense...
RabidGravy hey I'm stupid all the time 22:51
dha I will vouch for you on this. :-) 22:52
22:52 espadrine left
RabidGravy cool 22:52
toodlepip anyway 22:56
dha ta 22:58
22:59 yqt left 23:01 RabidGravy left
dha Ok. 5to6-perlfunc.pod now has a table of contents. 175 contents, but... 23:07
dalek c: 36239c9 | (David H. Adler)++ | lib/Language/5to6-perlfunc.pod:
Added =head2 commands to 5to6-perlfunc.pod to allow htmlify.p6 to create
23:09
c: bb1f78d | (David H. Adler)++ | lib/Language/5to6-perl (2 files):
Merge branch 'master' of github.com/perl6/doc
23:13 raiph left, raiph joined
dha Ok, with that done. I'm going to go look for dinner. 23:15
23:15 dha left 23:17 spider-mario left 23:20 cognominal joined 23:28 pmurias left 23:42 dayangkun joined 23:45 llfourn joined 23:50 llfourn left 23:53 jferrero joined 23:54 lizmat joined
psch hm, do we even have floating point non-dec-base literals designed..? 23:56
java has e.g. 0x4p2
m: say 0x4p2 # but that dies because method
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␤»
psch m: say 0x4.2 # but *this* dies because method
camelia rakudo-moar f185e0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/P4nN78kEpF␤Confused␤at /tmp/P4nN78kEpF:1␤------> 3say 0x4.7⏏052 # but *this* dies because method␤ expecting any of:␤ dotty method or postfix␤»