Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-11-23

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:07 pierre_ joined #perl6
00:11 viki samcv++ sweet!
00:16 skids joined #perl6
00:30 labster joined #perl6
00:36 pierre_ joined #perl6
00:41 xiaomiao joined #perl6
00:52 pierre_ joined #perl6
00:55 woodruffw joined #perl6
00:55 woodruffw joined #perl6
00:58 kurahaupo__ joined #perl6
01:00 kurahaupo_ joined #perl6
01:01 Ulti http://rakudo.org/how-to-get-rakudo/ <-- like the buttons! who is to ++ ?
01:01 kyclark_ joined #perl6
01:02 rpburkholder joined #perl6
01:02 ChoHag joined #perl6
01:06 aborazmeh joined #perl6
01:06 aborazmeh joined #perl6
01:08 viki kalkin-: pro tip: do PRs from a separate branch, not nom. That way you don't get headaches about trying to get proper HEAD `nom` if your PR off nom gets rejected or delayed (and you wish to do another PR at the same time).
01:08 woodruffw joined #perl6
01:10 viki Also, you may already be doing it, but all changes need to pass `make spectest`. If you have time (or fancy hardware) you can run a lengthier and more comprehensive `make stresstest`--takes 146 seconds to run on my 24-core box. Set TEST_JOBS env var to 1.2x your cores to make those test commands run several jobs at the same time
01:10 * viki feels the need to do contribute.perl6.org thing more urgently :(
01:10 viki Gonna be my Christmas project.
01:14 mspo xmas will be one year
01:17 pyrimidine joined #perl6
01:26 pyrimidine joined #perl6
01:26 ZzZombo "$invocant.+method calls all methods called method from $invocant, and returns a List of the results. Dies if no such method was found." -- why would you want such a thing?
01:28 ZzZombo m: my @a = <a b c>;@a».say;
01:28 camelia rakudo-moar 717a84: OUTPUT«a␤b␤c␤»
01:28 ZzZombo m: my @a = <a b c> XX 10;@a».say;
01:28 camelia rakudo-moar 717a84: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at <tmp> line 1␤␤»
01:29 ZzZombo m: my @a = (a b c) XX 10;@a».say;
01:29 camelia rakudo-moar 717a84: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    a used at line 1␤    b used at line 1␤    c used at line 1␤␤»
01:29 ZzZombo m: my @a = ('a', 'b', 'c') XX 10;@a».say;
01:29 camelia rakudo-moar 717a84: OUTPUT«This Seq has already been iterated, and its values consumed␤(you might solve this by adding .cache on usages of the Seq, or␤by assigning the Seq into an array)␤  in block <unit> at <tmp> line 1␤␤»
01:29 viki .oO( XX is a thing :o )
01:30 garu hi everyone! so... is it possible to access a variable from within its trait_mod? I mean, if I do multi trait_mod:<is>(Attribute \a, :$awesome!) { ... } and then "has Real $!foo is awesome", can I reach $!foo from inside the (...)?
01:30 viki ZzZombo: Have you seen our historical design.perl6.org documents? The answer might be in there. After 15 years of designs and redesigns, I doubt there are many features people added just for the hell of it :)
01:30 BenGoldberg joined #perl6
01:31 ZzZombo No I havn't
01:32 viki garu: I haven't had any luck with signature parameters... as with attributes.. um check out http://modules.perl6.org/dist/AttrX::Lazy or http://modules.perl6.org/dist/Attribute::Lazy maybe they have an idea?
01:32 garu viki: thanks! I'll take a look!
01:32 viki ZzZombo: and to re-iterate, they're *historical* you may find something they describe that was never implemented or implemented differently
01:34 viki s: &infix:<XX>
01:34 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/bl​ob/6ee524c/src/core/metaops.pm#L23
01:34 viki So XX is just two XX? heh
01:35 viki ZzZombo: so with the XX, you have two cross meta ops (they use comma by default) and I guess after the first one is done the second one tries to iterate over the same Seq. You may have meant the lowercase xx
01:35 viki m: my @a = (a b c) xx 10; dd @a
01:35 camelia rakudo-moar 6ee524: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    a used at line 1␤    b used at line 1␤    c used at line 1␤␤»
01:36 viki m: my @a = <a b c> xx 10; dd @a
01:36 camelia rakudo-moar 6ee524: OUTPUT«Array @a = [("a", "b", "c"), ("a", "b", "c"), ("a", "b", "c"), ("a", "b", "c"), ("a", "b", "c"), ("a", "b", "c"), ("a", "b", "c"), ("a", "b", "c"), ("a", "b", "c"), ("a", "b", "c")]␤»
01:36 ZzZombo why does /language/operators suddenly switch over to seemingly describe precendence of operators instead of themselves? I got lost because of misleading titles in the ToC.
01:36 pierre_ joined #perl6
01:37 ZzZombo wondering where the hell is the rest of them.
01:37 viki ZzZombo: also, @a».say; is incorrect. The » is an auto-threaded construct, so those says would be out of order (the only reason it works correctly now is 'cause the actual use of several threads is not implemented)
01:37 ZzZombo it's from the docs
01:37 viki :o
01:37 ZzZombo I was wondering that
01:37 viki That should be fixed ASAP
01:38 viki It's a bad enough of an anti-pattern that we'll indoubtedly break people's code when we'll make that hyper actuall autothread :(
01:38 pierre_ joined #perl6
01:39 viki Hahaha
01:40 viki gfldex: you may find it amusing. git blame points you as the author of @a».say; in the docs "gfldex authored on Dec 10, 2015"
01:40 ZzZombo m: say ?!!!!!!!!!!!! my $x
01:40 camelia rakudo-moar 6ee524: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3say ?!!!7⏏5!!!!!!!!! my $x␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier…»
01:40 ZzZombo m: say ?! my $x
01:40 camelia rakudo-moar 6ee524: OUTPUT«True␤»
01:40 ZzZombo pitchforks out
01:42 dalek doc: 51eb039 | (Zoffix Znet)++ | doc/Language/operators.pod6:
01:42 synopsebot6 Link: http://doc.perl6.org/language/operators
01:42 dalek doc: Note @a».say; as being an error
01:42 dalek doc: review: https://github.com/perl6/doc/commit/51eb039c8b
01:43 ZzZombo m: say (?! False)~~'d'
01:43 camelia rakudo-moar 6ee524: OUTPUT«False␤»
01:44 ZzZombo huh
01:44 giraffe joined #perl6
01:44 viki Why huh?
01:45 viki You're checking whether (?! False) eq 'd'
01:45 viki smartmatch isn't symmetrical
01:45 ZzZombo ow
01:45 ZzZombo m: say (?! False)~'d'
01:45 camelia rakudo-moar 6ee524: OUTPUT«Trued␤»
01:45 ZzZombo damn
01:46 viki m: say (?! False)~'dat'
01:46 camelia rakudo-moar 6ee524: OUTPUT«Truedat␤»
01:50 seatek m: my $b; say $b;
01:50 camelia rakudo-moar 6ee524: OUTPUT«(Any)␤»
01:50 seatek m: my $b; say "$b";
01:50 camelia rakudo-moar 6ee524: OUTPUT«Use of uninitialized value $b of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤␤»
01:51 viki say calls .gist, while interpolation calls .Str
01:51 seatek my interactive perl6 says Control flow commands not allowed in toplevel
01:51 viki hehe
01:51 viki that's last/next/redo thing
01:51 seatek :)
01:51 seatek ah :)
01:51 ZzZombo say (False.:<?>.:<!>)~'dat'
01:51 ZzZombo m: say (False.:<?>.:<!>)~'dat'
01:51 camelia rakudo-moar 6ee524: OUTPUT«Truedat␤»
01:51 viki m: last
01:51 camelia rakudo-moar 6ee524: OUTPUT«===SORRY!===␤last without loop construct␤»
01:53 ZzZombo m: say (False.:<?^>)~'dat'
01:53 camelia rakudo-moar 6ee524: OUTPUT«Truedat␤»
02:03 kurahaupo__ joined #perl6
02:12 vendethiel- joined #perl6
02:18 FROGGS joined #perl6
02:19 seatek m: my $attr; my $key = 'value'; say "$key - {$attr«$key»}" if $attr«$key».defined;
02:19 camelia rakudo-moar 6ee524: OUTPUT«Use of uninitialized value $v of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤value - ␤»
02:20 viki :(
02:20 seatek my $attr; my $key = 'value'; say "$key - {$attr«$key»}" if ($attr«$key»:exists and $attr«$key».defined);
02:21 seatek m: my $attr; my $key = 'value'; say "$key - {$attr«$key»}" if ($attr«$key»:exists and $attr«$key».defined);
02:21 camelia rakudo-moar 6ee524: OUTPUT«Use of uninitialized value $v of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤value - ␤»
02:22 seatek am i confused for good reason? :)
02:22 seatek or should i try finding other ways ;)
02:22 viki Well, the correct way to write it is {$key}
02:23 viki But "$v" in that error is likely coming from somewhere in core
02:23 seatek m: my $attr; my $key = 'value'; say "$key - {$attr{$key}}" if $attr{$key}.defined;
02:23 camelia rakudo-moar 6ee524: ( no output )
02:23 viki Well... not "correct" way, but the common way
02:23 seatek yeah that's weird
02:23 viki m: my $attr; my $key = 'value'; $attr«$key».defined;
02:23 camelia rakudo-moar 6ee524: ( no output )
02:23 viki m: my $attr; my $key = 'value'; say "$key - $attr«$key»" if $attr«$key».defined;
02:23 camelia rakudo-moar 6ee524: OUTPUT«Use of uninitialized value $attr of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤value - «value»␤»
02:23 viki m: my $attr; my $key = 'value'; say $attr«$key» if $attr«$key».defined;
02:23 camelia rakudo-moar 6ee524: OUTPUT«((Any))␤»
02:24 viki 0.o
02:24 seatek that's what threw me!
02:24 viki waaaat
02:24 seatek :)
02:24 viki m: my $attr; my $key = 'value'; say $attr«$key»
02:24 camelia rakudo-moar 6ee524: OUTPUT«((Any))␤»
02:24 viki m: my $attr; my $key = 'value'; say «$key»
02:24 camelia rakudo-moar 6ee524: OUTPUT«(value)␤»
02:24 viki m: my $attr = Hash.new; my $key = 'value'; say «$key»
02:24 camelia rakudo-moar 6ee524: OUTPUT«(value)␤»
02:24 viki m: my $attr = Hash.new; my $key = 'value'; say $attr«$key»
02:24 camelia rakudo-moar 6ee524: OUTPUT«((Any))␤»
02:25 viki m: my $attr = %(:42value); my $key = 'value'; say $attr«$key»
02:25 camelia rakudo-moar 6ee524: OUTPUT«(42)␤»
02:25 viki Ah
02:25 viki seatek: you're asking for a slice, so it returns some sort of listy thing, which IS defined
02:25 viki But the $v thing is still LTA
02:25 * viki goes to sleep
02:25 seatek ok that would explain the weird dd output i was getting
02:26 seatek thanks viki++ !
02:28 kalkin-_ joined #perl6
02:35 telex joined #perl6
02:42 ZzZombo so round() can't round to arbitrary values before the comma, like 1234.round(4) to get 1000.
02:46 seatek m: say (1234 / 1000).round * 1000
02:46 camelia rakudo-moar 6ee524: OUTPUT«1000␤»
02:46 seatek :)
02:46 seatek dunno though :)
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:50 cdg joined #perl6
02:50 ZzZombo NOOOOOOOOOOO
02:50 ZzZombo ==> Fetching Inline::Perl5
02:50 ZzZombo ==> Building Inline::Perl5
02:50 ZzZombo Perl v5.18.0 required--this is only v5.14.2, stopped at -e line 1.
02:50 ZzZombo !!!
02:52 timotimo m: say 0.123456789.round(0.0001)
02:53 camelia rakudo-moar 6ee524: OUTPUT«0.1235␤»
02:53 timotimo m: say 0.123456789.round(0.01)
02:53 camelia rakudo-moar 6ee524: OUTPUT«0.12␤»
02:53 timotimo m: say 0.123456789.round(0.1)
02:53 camelia rakudo-moar 6ee524: OUTPUT«0.1␤»
02:53 timotimo m: say 0.123456789.round(1)
02:53 camelia rakudo-moar 6ee524: OUTPUT«0␤»
02:53 timotimo m: say 123456789.round($_) for ^10
02:53 camelia rakudo-moar 6ee524: OUTPUT«Attempt to divide 123456789 by zero using div␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
02:53 timotimo m: say 123456789.round($_) for (^10 + 1)
02:53 camelia rakudo-moar 6ee524: OUTPUT«123456789␤123456790␤123456789​␤123456788␤123456790␤123456792␤12345​6788␤123456792␤123456789␤123456790␤»
02:53 timotimo m: say 123456789.round($_) for (^100 .grep(*.is-prime))[^20]
02:53 camelia rakudo-moar 6ee524: OUTPUT«123456790␤123456789␤123456790␤12345​6788␤123456784␤123456788␤123456788␤1234567​94␤123456778␤123456799␤123456787␤123456790​␤123456781␤123456784␤123456780␤123456769␤1​23456792␤123456802␤123456813␤123456788␤»
02:54 timotimo m: say 0.123456789.round(0.5)
02:54 camelia rakudo-moar 6ee524: OUTPUT«0␤»
02:54 timotimo m: say 0.123456789.round(0.05)
02:54 camelia rakudo-moar 6ee524: OUTPUT«0.1␤»
02:54 timotimo m: say 0.123456789.round(0.01)
02:54 camelia rakudo-moar 6ee524: OUTPUT«0.12␤»
02:55 garu sigh... Attribute::Lazy gave me the idea of applying a role to the attribute and using compose() to reach the package, but I still can't find that packages' attributes :(
02:55 garu I'm trying to create the "awesome" trait but it can only be applied to MyClass attributes
02:58 timotimo i expect the attributes will get .compose called on them in order ... maybe they aren't available yet when your attribute gets composed
02:59 garu m: my role Awesome { method compose (Mu $pkg) { callsame; for $pkg.^attributes(:local) -> $attr { say $attr.type } } }; class MyClass {}; multi trait_mod:<is>(Attribute:D $a,:$awesome) { $a does Awesome }; class X { has $!foo is awesome }
02:59 camelia rakudo-moar 6ee524: OUTPUT«(Mu)␤»
02:59 garu m: my role Awesome { method compose (Mu $pkg) { callsame; for $pkg.^attributes(:local) -> $attr { say $attr.type } } }; class MyClass {}; multi trait_mod:<is>(Attribute:D $a,:$awesome) { $a does Awesome }; class X { has MyClass $!foo is awesome }
02:59 camelia rakudo-moar 6ee524: OUTPUT«(MyClass)␤»
02:59 FROGGS_ joined #perl6
03:00 garu hmmm... it's working here O_O
03:01 garu timotimo: could it be I have an older version of moar/rakudo? I mean, is this the actual expected behaviour? Or is it subject to change?
03:03 * garu tries updating rakudobrew
03:03 timotimo er, dunno?
03:03 garu :P
03:05 * timotimo goes to bed
03:05 garu timotimo: being the compose for that particular attribute, I was hoping it would be accessible by then
03:05 garu timotimo: oh, sorry! good night!
03:05 timotimo good luck!
03:05 garu thanks
03:06 timotimo um, you aren't trying to get the attribute that "is awesome" by going through the $pkg, are you?
03:06 garu yeah, I am
03:07 garu though I would LOVE if there was any other way
03:07 garu at this point, just knowing the attribute's class would be great
03:07 timotimo why don't you just use self?
03:07 garu I... I... what?
03:08 garu self is only getting me the Attribute object
03:08 timotimo yeah
03:08 timotimo that's not what you want?
03:08 garu I can test that object for a type?
03:09 garu I'm pretty sure I tried and it wasn't working O_O
03:09 garu maybe I'm missing something
03:09 timotimo m: my role Awesome { method compose (Mu $pkg) { callsame; say self.^methods; say self.^attributes; } } }; class MyClass {}; multi trait_mod:<is>(Attribute:D $a,:$awesome) { $a does Awesome }; class X { has MyClass $!foo is awesome }
03:09 camelia rakudo-moar 6ee524: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3elf.^methods; say self.^attributes; } } 7⏏5}; class MyClass {}; multi trait_mod:<is␤»
03:09 timotimo m: my role Awesome { method compose (Mu $pkg) { callsame; say self.^methods; say self.^attributes; } }; class MyClass {}; multi trait_mod:<is>(Attribute:D $a,:$awesome) { $a does Awesome }; class X { has MyClass $!foo is awesome }
03:09 camelia rakudo-moar 6ee524: OUTPUT«(compose <anon> <anon> <anon> <anon> <anon> compose <anon> container Str <anon> <anon> <anon> <anon> <anon> <anon> set_value <anon> <anon> <anon> <anon> WHY set_why <anon> <anon> gist package readonly get_value <anon> inlined <anon> apply_handles <anon>)…»
03:09 timotimo m: my role Awesome { method compose (Mu $pkg) { callsame; say self.^methods.grep(* ne '<anon>'); say self.^attributes; } }; class MyClass {}; multi trait_mod:<is>(Attribute:D $a,:$awesome) { $a does Awesome }; class X { has MyClass $!foo is awesome }
03:09 camelia rakudo-moar 6ee524: OUTPUT«Method object coerced to string (please use .gist or .perl to do that)␤  in whatevercode  at <tmp> line 1␤Method object coerced to string (please use .gist or .perl to do that)␤  in whatevercode  at <tmp> line 1␤Method object coerced to string (ple…»
03:09 timotimo m: my role Awesome { method compose (Mu $pkg) { callsame; say self.^methods.grep(* ne '<anon>').map(*.name); say self.^attributes; } }; class MyClass {}; multi trait_mod:<is>(Attribute:D $a,:$awesome) { $a does Awesome }; class X { has MyClass $!foo is awesome }
03:09 camelia rakudo-moar 6ee524: OUTPUT«Method object coerced to string (please use .gist or .perl to do that)␤  in whatevercode  at <tmp> line 1␤Method object coerced to string (please use .gist or .perl to do that)␤  in whatevercode  at <tmp> line 1␤Method object coerced to string (ple…»
03:10 timotimo m: my role Awesome { method compose (Mu $pkg) { callsame; say self.^methods.grep(*.name ne '<anon>').map(*.name); say self.^attributes; } }; class MyClass {}; multi trait_mod:<is>(Attribute:D $a,:$awesome) { $a does Awesome }; class X { has MyClass $!foo is awesome }
03:10 camelia rakudo-moar 6ee524: OUTPUT«(compose compose container Str set_value WHY set_why gist package readonly get_value inlined apply_handles)␤5===SORRY!5=== Error while compiling <tmp>␤No such method 'gist' for invocant of type 'BOOTSTRAPATTR'␤at <tmp>:1␤»
03:10 timotimo m: my role Awesome { method compose (Mu $pkg) { callsame; say self.^methods.grep(*.name ne '<anon>').map(*.name); say self.^attributes>>.name; } }; class MyClass {}; multi trait_mod:<is>(Attribute:D $a,:$awesome) { $a does Awesome }; class X { has MyClass $!foo is awesome }
03:10 camelia rakudo-moar 6ee524: OUTPUT«(compose compose container Str set_value WHY set_why gist package readonly get_value inlined apply_handles)␤($!name $!rw $!ro $!required $!has_accessor $!type $!container_descriptor $!auto_viv_container $!build_closure $!package $!inlined $!box_target $!…»
03:12 timotimo m: my role Awesome { method compose (Mu $pkg) { callsame; say self.type } }; class MyClass {}; multi trait_mod:<is>(Attribute:D $a,:$awesome) { $a does Awesome }; class X { has MyClass $!foo is awesome }
03:12 camelia rakudo-moar 6ee524: OUTPUT«(MyClass)␤»
03:12 timotimo ^- in short
03:13 garu O_O
03:13 * garu hugs timotimo
03:13 garu THANK YOU
03:13 timotimo you're quite welcome
03:13 timotimo i'm glad you asked
03:13 garu I've been using self.name all this time, and I had self.type right there for me
03:14 timotimo ZzZombo: did you see my examples with .round?
03:14 timotimo ZzZombo: https://docs.perl6.org/routine/round - as you can see, it's even in the docs
03:14 * timotimo disappears
03:17 * seatek waves
03:21 cdg_ joined #perl6
03:24 xtreak joined #perl6
03:27 canopus joined #perl6
03:31 noganex_ joined #perl6
03:32 kurahaupo_ joined #perl6
03:40 flaviusb joined #perl6
03:44 kyclark_ joined #perl6
04:34 pierre_ joined #perl6
04:51 araujo joined #perl6
05:13 Cabanossi joined #perl6
05:14 pierre_ joined #perl6
05:25 finanalyst joined #perl6
05:36 Lucas_One joined #perl6
05:38 grondilu joined #perl6
05:41 labster joined #perl6
05:47 skids joined #perl6
05:49 ZzZombo joined #perl6
05:49 ZzZombo joined #perl6
06:06 adu joined #perl6
06:16 itcharlie left #perl6
06:18 ufobat joined #perl6
06:19 domidumont joined #perl6
06:26 domidumont joined #perl6
06:28 beatdown joined #perl6
06:31 pierre_ joined #perl6
06:39 brillenfux joined #perl6
06:39 kentnl joined #perl6
06:44 bjz joined #perl6
06:51 ssm joined #perl6
06:51 RabidGravy joined #perl6
06:57 bjz joined #perl6
07:00 domidumont joined #perl6
07:05 darutoko joined #perl6
07:11 neuraload joined #perl6
07:16 bjz joined #perl6
07:19 moritz good morning
07:20 moritz in https://docs.perl6.org/language/setbagmix.html why are some operators quoted?
07:20 moritz only sub infix:<<"∈">>($a, $b --> Bool)
07:20 moritz why not just only sub infix:<<∈>>($a, $b --> Bool ß
07:21 moritz s/ß/?/
07:31 firstdayonthejob joined #perl6
07:37 pierre_ joined #perl6
07:48 CIAvash joined #perl6
07:59 gfldex moritz: looks wrong to me
08:01 xtreak joined #perl6
08:02 gfldex moritz: its used to be hex quotes see: https://github.com/perl6/doc/commit/09​9bf5c479fdbdae8643ec4927e696cc6018922e
08:04 wamba joined #perl6
08:10 brrt joined #perl6
08:14 CIAvash joined #perl6
08:21 neuraload left #perl6
08:29 domidumont joined #perl6
08:31 zakharyas joined #perl6
08:33 Ven_ joined #perl6
08:49 g4 joined #perl6
08:49 g4 joined #perl6
08:52 telex joined #perl6
09:03 jonas1 joined #perl6
09:12 masak gud murning, #purl6
09:12 user9 joined #perl6
09:22 xtt joined #perl6
09:23 Ven_ joined #perl6
09:23 ZzZombo how the hell does Inline::Perl5 find your current Perl 5 installation????
09:23 dakkar joined #perl6
09:23 psch nine++ probably knows
09:24 ZzZombo I have went through the trouble of getting the required version of Perl installed alongside with my already used, but it still picks the old version up.
09:27 xtreak joined #perl6
09:28 DrForr https://github.com/niner/Inline-​Perl5/blob/master/configure.pl6 says that it's just invoking 'perl -e...' from the shell, so likely the "alongside" bit is what causes a problem.
09:30 psch ZzZombo: ooc, did you check if your system perl already brings -fPIC?
09:31 ZzZombo ugh, scratch that. Somehow now it works, and is in process of running tests.
09:31 ZzZombo Result: PASS
09:31 ZzZombo hooray
09:32 ZzZombo p5helper.c:1:0: warning: -fPIC ignored for target (all code is position independent)
09:32 ZzZombo is it that?
09:33 psch ZzZombo: i was thinking along the lines of "perl -V | grep fPIC" and "perl -V | grep useshrplib"
09:35 ZzZombo I don't have grep, this is Windows after all.
09:38 psch so how about "perl -V > perlflags.txt && notepad perlflags.txt" and then Ctrl+F "fPIC"? :P
09:39 cibs joined #perl6
09:41 ZzZombo no results.
09:42 psch okay, cool :)
09:42 psch anyway, i was just curious if you had checked it before installing/building a different Perl 5
09:42 ZzZombo does it matter?
09:42 DrForr Aren't there instructions to enable fPIC in the README? (not that they're Windows friendly)
09:44 gregf_ joined #perl6
09:47 psch the Inline::Perl5 README only says "you need to build it with $flag, if you have perlbrew do this: ..."
09:48 Ven_ o/
09:48 Ven_ huh
09:49 Ven_ joined #perl6
09:53 nine ZzZombo: so does it work now?
09:54 ZzZombo IDK, I've not written a P6 program. I only ever checked syntax of a module I've written.
09:59 ZzZombo Worx.
10:00 ZzZombo Yay
10:02 wamba joined #perl6
10:03 ocbtec joined #perl6
10:07 nine :)
10:13 rindolf joined #perl6
10:25 Actualeyes joined #perl6
10:26 pierre_ joined #perl6
10:30 broquaint joined #perl6
10:35 avuserow joined #perl6
10:45 TimToady joined #perl6
10:56 nowan joined #perl6
11:02 xtt joined #perl6
11:22 rindolf joined #perl6
11:28 xtreak joined #perl6
11:31 Ven_ joined #perl6
11:47 Actualeyes joined #perl6
11:55 brillenfux joined #perl6
12:06 rindolf joined #perl6
12:10 Dunearhp joined #perl6
12:12 tbrowder hi #perl6
12:12 cibs joined #perl6
12:13 wamba joined #perl6
12:15 tbrowder i have a question about module installation: given a p6 cgi program which uses a module, does it need an explicit "use lib" statement, or will the modules being used be found via the absolute  perl6 path required in the cgi program?
12:18 moritz if you've installed the modules properly, you don't need 'use lib'
12:20 CIAvash joined #perl6
12:32 tbrowder moritz: ah, there's the rub!  as I've mentioned recently, post rakudo installation, panda seems to install moudles in $HOME/.perl6 by default, so how should one install a new module from the ecosystem?  does one have to explicitly name the desired repo path?
12:34 moritz tbrowder: uhm, try zef?
12:34 moritz tbrowder: installing in $HOME/.perl6 looks kinda wrong to me
12:35 moritz I'd expect it to install to site
12:35 moritz of course, it requires you to have write access to the site path
12:35 tbrowder that was the problem: i used panda to install zef, then panda installed it in $HOME/.perl6 which was not on my path, thus i couldn't execute zef--as we old timers say, "a Catch 22 situation!"
12:36 xtt joined #perl6
12:36 tojo joined #perl6
12:37 moritz can't zef bootstrap itself?
12:37 tbrowder i do have write access to the rakudo installation, which i do to simulate a site-wide intallation
12:37 timotimo its installation is just "./bin/zef install ." iirc
12:38 timotimo sorry, with -Ilib
12:39 tbrowder zef can bootstrap itself, but i haven't done that.  can't we get zef built-in as part of rakudo?  seems it would solve some problems
12:39 timotimo no, we will not put a module installer into rakudo
12:41 tojo hello, i'm trying this example http://perl6maven.com/tutorial/perl6​-iterating-over-more-than-one-array but not getting same results?
12:41 tojo a 1 b 2
12:41 tojo Too few positionals passed; expected 2 arguments but got 1
12:41 moritz panda and zef are the third generation of module installiers
12:41 tbrowder well then, how to make it easier for noobs to install a workable solution?  i guess i will create a script to do the whole thing, but i think that is not something to expect a new user to do.
12:41 moritz tbrowder: the easier solution is to use a distribution
12:41 timotimo tojo: you'll need either a flat after for, or parenthesis around $letter, $number
12:42 moritz tbrowder: we currently don't have a distribution (like rakudo star) that includes zef
12:42 moritz somebody with motivation and time should change that
12:42 tbrowder okay, which one?  i've tried the star distro which is the one where i get the problem with .perl6?
12:42 timotimo tojo: this behavior changed during the Great List Refactor, which was half a year before the christmas release. this article is from 2012, which long predates this change.
12:42 tojo timotimo: oh! thanks that resolved it! :)
12:43 timotimo it's problematic that we link to that tutorial from perl6.org/resources even though it has such outdated bits
12:43 tbrowder i'm willing to help with doing that with star
12:43 timotimo might want to talk to szabgab about setting up automated tests for all the example code, like we have in docs.perl6.org
12:43 tbrowder where do i look for the fiddly bits?
12:46 vendethiel joined #perl6
12:48 timotimo tojo: turns out perl6maven has an automated/continuous-integration thing and it says "build failing" :|
12:57 * timotimo cleaned up travis build status of perl6maven.com with two pull requests
12:57 moritz timotimo: then remove the link
12:57 moritz that was always the philisophy of perl6.org
12:59 timotimo well, when those pull requests get merged in, it'll be clean
12:59 timotimo so all files will produce the output they claim they should
12:59 timotimo i'm not saying that that's always correct, of course. i.e. using too-sloppy output that conceals inner structure or something
13:00 gregf_ joined #perl6
13:02 skids joined #perl6
13:07 ZzZombo hm
13:07 ZzZombo can I have FALLBACK in a package?
13:07 ZzZombo not in a class?
13:09 timotimo no, but you can have a sub EXPORT
13:14 * viki observes a lot of "returns ..." stuff in docs isn't entirely accurate since many methods can return Junctions as well
13:14 viki m: say eager ((1|2) .. (3|4)).sum
13:14 camelia rakudo-moar b597b7: OUTPUT«any(any((6), (10)), any((5), (9)))␤»
13:14 viki m: say eager ((1|2) .. (3|4)).reverse
13:14 camelia rakudo-moar b597b7: OUTPUT«any(any((3 2 1), (4 3 2 1)), any((3 2), (4 3 2)))␤»
13:14 viki prolly not worth fixing...
13:17 viki .tell kalkin-_ FWIW, nine++ improved upon your PR (also, I recommend you join #perl6-dev): https://github.com/rakudo/rakudo/commit/​b597b7cd814ec19e57f8e34ace36be9811d72ba8
13:17 yoleaux viki: I'll pass your message to kalkin-_.
13:27 viki How can I check two Junctions are equivalent?
13:27 viki m: say so 1|2 eqv 1|2
13:27 camelia rakudo-moar b597b7: OUTPUT«True␤»
13:27 viki m: say so 1|2 eqv 2|5
13:27 camelia rakudo-moar b597b7: OUTPUT«True␤»
13:28 brrt hmmm
13:28 brrt it is a good question
13:28 brrt m: say all(1|2) eqv 2|5
13:28 camelia rakudo-moar b597b7: OUTPUT«all(any(any(False, False), any(True, False)))␤»
13:28 brrt m: say so all(1|2 eqv 2|5);
13:28 camelia rakudo-moar b597b7: OUTPUT«True␤»
13:29 brrt m: say so all(1|2) eqv 2|5;
13:29 camelia rakudo-moar b597b7: OUTPUT«True␤»
13:29 brrt junctions are confusing
13:29 viki :)
13:29 brrt m: say so all(1|2) eqv all(2|5);
13:29 camelia rakudo-moar b597b7: OUTPUT«True␤»
13:29 brrt oh, i get it
13:30 brrt ... i'm not sure you can...
13:31 viki :(
13:31 viki I haveta
13:31 brrt m: my $a = 1|2;. say $a.^methods;
13:31 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix . instead␤at <tmp>:1␤------> 3my $a = 1|2;.7⏏5 say $a.^methods;␤»
13:31 brrt m: my $a = 1|2; say $a.^methods;
13:31 camelia rakudo-moar b597b7: OUTPUT«(defined CALL-ME sink AUTOTHREAD new Bool ACCEPTS Str gist perl)␤»
13:31 brrt it's kind of opaque
13:32 viki Well, I gotta test the two Junctions are the same :/
13:33 viki I got it
13:33 khw joined #perl6
13:33 viki m: use nqp; sub st (Mu $j) { my $st = nqp::getattr(nqp::decont($j), Junction, '$!storage'); my $elems = $st.elems; my @a = do $st[$_] for ^$elems; @a }; say st(2|3) eqv st(2|3)
13:33 camelia rakudo-moar b597b7: OUTPUT«True␤»
13:33 viki m: use nqp; sub st (Mu $j) { my $st = nqp::getattr(nqp::decont($j), Junction, '$!storage'); my $elems = $st.elems; my @a = do $st[$_] for ^$elems; @a }; say st(2|3) eqv st(3|4)
13:33 camelia rakudo-moar b597b7: OUTPUT«False␤»
13:33 viki \o/
13:34 * viki onlooks at horrified faces
13:34 aborazmeh joined #perl6
13:34 aborazmeh joined #perl6
13:38 ZzZombo <timotimo> no, but you can have a sub EXPORT
13:38 ZzZombo how does that help me?
13:39 viki ZzZombo: what exactly would FALLBACK with a package do?
13:39 ZzZombo same thing as it does in P5?
13:40 viki ZzZombo: which is what?
13:40 ZzZombo if we take it as replacement for AUTOLOAD
13:41 viki ZzZombo: sub EXPORT can dynamically figure out what to export: https://github.com/zoffixznet/perl6-SPEC-​Func/blob/master/lib/SPEC/Func.pm6#L7-L11
13:41 viki I don't know Perl 5, so I dunno what AUTOLOAD does in Perl 5 packages...
13:42 ZzZombo AUTOLOAD can create/pretend to create subroutines on the fly. If an attempt to call an undefined one is made.
13:42 gfldex that would upset the optimiser
13:43 ZzZombo eh
13:43 viki ZzZombo: I don't recall us having anything like that
13:43 ZzZombo so are you saying I can't translate my module into P6 w/ minimal changes?
13:43 viki ZzZombo: yup.
13:44 DrForr Look at Perl::ToPerl6, but be aware it still needs hand tweaking.
13:44 ZzZombo that's bad.
13:44 viki ZzZombo: well, you'd have similar issues when translating it to any other language, so :)
13:45 gfldex ZzZombo: the idea is the you improve your modules while porting them to Perl 6 :->
13:45 ZzZombo "Perl::ToPerl6", where is that located?
13:45 viki ZzZombo: and I'm not omniscient.. there may be some sort of a hack. I just never seen it
13:45 DrForr Start with Inline::Perl5 and change your driver script, not the modules you've used.
13:45 ZzZombo https://modules.perl6.org/ knows nothing.
13:45 DrForr ZzZombo: CPAN.
13:46 ZzZombo ah, CPAN
13:46 DrForr There's no Perl 6 equivalent of Perl5 PPI.
13:46 DrForr yet.
13:46 telex joined #perl6
13:47 DrForr (I say specifically Perl5 PPI, as I'm almost done with Perl6 PPI.)
13:47 ZzZombo was the problem "only Perl can parse Perl" solved in P6?
13:48 psch the problem was "only perl can parse Perl," no? :)
13:48 DrForr Well, Perl 6 can parse Perl 6, but in a simpler way than Perl 5 parses Perl 5.
13:48 psch as in, only the reference implementation invoked by the binary perl can parse the language Perl
13:51 ZzZombo m: 1<2 ?? say True !! say False
13:51 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Whitespace required before < operator␤at <tmp>:1␤------> 1<2 ?? say True !! say False7⏏5<EOL>␤    expecting any of:␤        postfix␤»
13:51 viki Eh, crap. My Junction comparing trick doesn't quite work for nested junctions :/
13:51 ZzZombo m: 1 < 2 ?? say True !! say False
13:51 camelia rakudo-moar b597b7: OUTPUT«True␤»
13:51 * viki laughs
13:52 viki 2 seconds to fix the bug... almost an hour to try to write the test for the fix
13:52 tbrowder okay, i see the syar
13:52 tbrowder okay, i see the star repo...
13:53 ZzZombo m: say 1 < 2 ?? say True,'1' !! say False,'0'
13:53 camelia rakudo-moar b597b7: OUTPUT«True1␤True␤»
13:53 ZzZombo m: say 1 < 2 ?? say True;'1' !! say False;'0'
13:53 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused: Bogus code found before the !! of conditional operator␤at <tmp>:1␤------> 3say 1 < 2 ?? say True7⏏5;'1' !! say False;'0'␤    expecting any of:␤        postfix␤»
13:53 Ven_ joined #perl6
13:54 ZzZombo m: say 1 < 2 ?? say True;my $x='1' !! say False;my $x='0'
13:54 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused: Bogus code found before the !! of conditional operator␤at <tmp>:1␤------> 3say 1 < 2 ?? say True7⏏5;my $x='1' !! say False;my $x='0'␤    expecting any of:␤        postfix␤»
13:55 ZzZombo m: say 1 < 2 ?? {say True;my $x='1'} !! {say False;my $x='0'}
13:55 camelia rakudo-moar b597b7: OUTPUT«-> ;; $_? is raw { #`(Block|70206136) ... }␤»
13:55 psch m: .() with 1 < 2 ?? {say True;my $x='1'} !! {say False;my $x='0'}
13:55 camelia rakudo-moar b597b7: OUTPUT«True␤»
13:55 ZzZombo m: say 1 < 2 ?? do {say True;my $x='1'} !! do {say False;my $x='0'}
13:55 camelia rakudo-moar b597b7: OUTPUT«True␤1␤»
13:56 viki m: say 1 < 2 ?? (say True;my $x='1') !! (say False;my $x='0')
13:56 camelia rakudo-moar b597b7: OUTPUT«Potential difficulties:␤    Redeclaration of symbol '$x'␤    at <tmp>:1␤    ------> 3(say True;my $x='1') !! (say False;my $x7⏏5='0')␤True␤(True 1)␤»
13:57 ZzZombo m: say 1 < 2 ?? do {say True;'1'} !! do {say False;'0'}
13:57 camelia rakudo-moar b597b7: OUTPUT«True␤1␤»
13:58 viki m: https://gist.github.com/zoffixznet​/27fc3c595c87614f86ab60127f015037
13:58 camelia rakudo-moar b597b7: OUTPUT«"IterationBuffer"␤"IterationBuffe​r"␤"IterationBuffer"␤"BOOTArray"␤Cannot find method 'elems': no method cache and no .^find_method␤  in sub junction-guts at <tmp> line 10␤  in sub is-deeply-junction at <tmp> line 18␤  in block <unit> at <tmp>…»
13:59 viki Hopw come I'm getting this error when I store the junction in $sum, yet everything works fine if I use it directly (like the first argument to is-deeply-junction)?
14:00 viki found a way that works actually...
14:01 viki m: https://gist.github.com/zoffixznet​/d336de239f98d438ef8ad3578fd75023
14:01 camelia rakudo-moar b597b7: OUTPUT«ok 1 - tis same␤»
14:01 gregf_ joined #perl6
14:01 * viki chalks the answer up as "magic" and moves on.
14:01 perlawhirl joined #perl6
14:01 moritz viki: sounds plausible :-)
14:02 perlawhirl Ahoy hoy
14:02 yoleaux 15 Nov 2016 09:11Z <lizmat> perlawhirl: .reverse on shaped arrays is also borked :-(
14:02 dudz hi perlawhirl
14:03 perlawhirl I've knocked up a Net::Netmask module
14:03 perlawhirl https://github.com/0racle/p6-wig
14:03 perlawhirl can ecosystem lords pull my request
14:03 perlawhirl oops
14:03 perlawhirl wrong link
14:03 perlawhirl https://github.com/0racle/p6-Net-Netmask
14:04 perlawhirl it's more-or-less an API clone of the p5 module
14:04 perlawhirl with less methods
14:04 dalek ecosystem: f38b748 | 0racle++ | META.list:
14:04 dalek ecosystem: Add Net::Netmask
14:04 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/f38b748147
14:04 dalek ecosystem: 7c0ab89 | (Zoffix Znet)++ | META.list:
14:04 dalek ecosystem: Merge pull request #268 from 0racle/patch-1
14:04 dalek ecosystem:
14:04 dalek ecosystem: Add Net::Netmask
14:04 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/7c0ab89e40
14:04 perlawhirl ta, zoff
14:04 moritz perlawhirl: I've invited you to the perl6 team, so in future you can push directly
14:05 viki perlawhirl: as a person stated on your PR, you have an error in your META file
14:05 perlawhirl moritz: is this some sort of ploy to guild me into writing more modules ? :D
14:05 moritz perlawhirl: of course not
14:05 * moritz whistels innocently
14:06 viki s/"wig" : "lib/Net/Netmask.pm"/"Net::Netmask" : "lib/Net/Netmask.pm"/
14:06 xinming joined #perl6
14:06 viki buggable: eco
14:06 perlawhirl viki: copy/paste errors... gimme a sec
14:06 buggable viki, Out of 745 Ecosystem dists, 138 have warnings and 1 have errors. See https://modules.perl6.org/update.log for details
14:07 perlawhirl ok, fixed... i think
14:08 viki yeah, looks fine
14:09 dudz night .o/
14:10 viki \o\
14:11 perlawhirl moritz: life and work are hectic right now, hopefully things calm in the new year and i can adjust my orbit around perl 6... less comet, more satellite
14:11 moritz perlawhirl: no, honestly, there are no obligations attached
14:12 perlawhirl i know... i want to, tho... perl6 is too much fun
14:13 wamba joined #perl6
14:13 ZzZombo m: <people of earth> ==> map({ .tc }) ==> my @caps ==> grep /<[PE]>/ ==> sort() ==> @result;
14:13 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix => instead␤at <tmp>:1␤------> 3earth> ==> map({ .tc }) ==> my @caps ==>7⏏5 grep /<[PE]>/ ==> sort() ==> @result;␤»
14:14 ZzZombo m: say <people of earth> ==> map({ .tc }) ==> my @caps;@caps ==> grep /<[PE]>/ ==> sort() ==> @result.perl;
14:14 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@result' is not declared␤at <tmp>:1␤------> 3;@caps ==> grep /<[PE]>/ ==> sort() ==> 7⏏5@result.perl;␤»
14:14 ZzZombo m: say(<people of earth> ==> map({ .tc }) ==> my @caps;@caps ==> grep /<[PE]>/ ==> sort() ==> my @result).perl;
14:14 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3say(<people of earth>7⏏5 ==> map({ .tc }) ==> my @caps;@caps ==>␤    expecting any of:␤        infix␤…»
14:15 CIAvash joined #perl6
14:15 viki FWIW camelia also takes /msg (and there's also #zofbot)
14:15 ZzZombo m: <people of earth> ==> map({ .tc }) ==> my @caps;@caps ==> grep /<[PE]>/ ==> sort() ==> my @result;say @result.perl;
14:15 camelia rakudo-moar b597b7: OUTPUT«["Earth", "People"]␤»
14:15 ZzZombo m: <people of earth> ==> map({ .tc }) ==> my @caps ==> grep /<[PE]>/ ==> sort() ==> my @result;say @result.perl;
14:15 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix => instead␤at <tmp>:1␤------> 3earth> ==> map({ .tc }) ==> my @caps ==>7⏏5 grep /<[PE]>/ ==> sort() ==> my @result␤»
14:15 gfldex m: (<people of earth> ==> map({ .tc }) ==> my @caps;@caps ==> grep /<[PE]>/ ==> sort()).perl.say
14:15 camelia rakudo-moar b597b7: OUTPUT«(("People", "Of", "Earth"), ("Earth", "People"))␤»
14:19 dalek doc: a47aced | ZzZombo++ | doc/Language/operators.pod6:
14:19 synopsebot6 Link: http://doc.perl6.org/language/operators
14:19 dalek doc: Consistency
14:19 dalek doc: review: https://github.com/perl6/doc/commit/a47acedc6b
14:20 gfldex how often does camelia look for a new Rakudo version?
14:22 viki often enough that HEAD is available few minutes after pushing
14:22 viki m:
14:22 viki m: 42
14:22 camelia rakudo-moar b597b7: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
14:22 ZzZombo m: my @result = <== sort() <== grep({ /<[PE]>/ }) <== my @caps <== map({ .tc }) <== <people of earth>;say @result.perl;
14:22 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in quote words; couldn't find final '>'␤        ␤at <tmp>:1␤------> 3 <== <people of earth>;say @result.perl;7⏏5<EOL>␤    expecting any of:␤        quote words␤  …»
14:23 viki She's currently on penultimate commit, with the last one pushed 19 minutes ago
14:23 cdg joined #perl6
14:24 ZzZombo huh, is the example broken?
14:24 ZzZombo or what did I do wrong?
14:25 dalek doc: 500aad8 | gfldex++ | doc/Language/setbagmix.pod6:
14:25 synopsebot6 Link: http://doc.perl6.org/language/setbagmix
14:25 dalek doc: remove leftover quotes
14:25 dalek doc: review: https://github.com/perl6/doc/commit/500aad8a89
14:25 CIAvash m: my @result <== sort() <== grep({ /<[PE]>/ }) <== my @caps <== map({ .tc }) <== <people of earth>;say @result.perl;
14:25 camelia rakudo-moar b597b7: OUTPUT«["Earth", "People"]␤»
14:25 viki m: use NativeCall; sub system (Str) is native {}; system Q/crontab -l | grep -Ev '^#'/
14:25 camelia rakudo-moar b597b7: OUTPUT«'/var/spool/cron/tabs' is not a directory, bailing out.␤»
14:25 dalek doc: 93f868e | ZzZombo++ | doc/Language/operators.pod6:
14:25 dalek doc: Same
14:25 dalek doc: review: https://github.com/perl6/doc/commit/93f868ee29
14:25 synopsebot6 Link: http://doc.perl6.org/language/operators
14:28 ZzZombo m: my @result <== sort <== grep({ /<[PE]>/ }) <== my @caps <== map({ .tc }) <== <people of earth>;say @result.perl;
14:28 camelia rakudo-moar b597b7: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in quote words; couldn't find final '>'␤        ␤at <tmp>:1␤------> 3 <== <people of earth>;say @result.perl;7⏏5<EOL>␤    expecting any of:␤        argument list␤…»
14:28 ZzZombo m: my @result <== sort() <== grep({ /<[PE]>/ }) <== my @caps <== map({ .tc }) <== <people of earth>;say @result.perl;
14:28 camelia rakudo-moar b597b7: OUTPUT«["Earth", "People"]␤»
14:28 ZzZombo hm
14:30 imcsk8 joined #perl6
14:30 kyclark_ joined #perl6
14:32 viki m: 42
14:32 camelia rakudo-moar 8d04be: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
14:33 * ZzZombo slaps viki around a bit with a large trout
14:33 viki There, now she's on HEAD. I'm guessing a cron job runs every half hour
14:33 viki ZzZombo: how large? mst-large?
14:33 viki :)
14:33 ZzZombo let me check
14:34 ZzZombo damn it was the last of its kind
14:35 wamba joined #perl6
14:35 ZzZombo m: class A { multi method m(Int $i){ say 'Int' } multi method m(int $i){ say 'int' } }
14:35 camelia rakudo-moar 8d04be: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3 A { multi method m(Int $i){ say 'Int' }7⏏5 multi method m(int $i){ say 'int' } }␤    expecting any of:␤        infix…»
14:35 ZzZombo m: class A { multi method m(Int $i){ say 'Int' }; multi method m(int $i){ say 'int' } }
14:35 camelia rakudo-moar 8d04be: ( no output )
14:36 ZzZombo WTF
14:36 ZzZombo this is legal?
14:36 viki ?
14:36 psch m: say Int =:= int
14:36 camelia rakudo-moar 8d04be: OUTPUT«False␤»
14:36 ZzZombo wait
14:36 viki Why wouldn't it be?
14:36 DrForr Int isn't the same as int.
14:36 ZzZombo int vs Int
14:36 ZzZombo what is int?
14:36 viki ZzZombo: native int
14:36 ZzZombo k, I see now.
14:36 psch with sneaky autoboxing though
14:36 viki The docs may be lacking on those
14:37 psch m: my int $x = 0; say $x.WHAT
14:37 camelia rakudo-moar 8d04be: OUTPUT«(Int)␤»
14:37 ZzZombo wut
14:37 ZzZombo Int?
14:37 psch m: my int $x = 0; say $x.HOW.^name
14:37 camelia rakudo-moar 8d04be: OUTPUT«Perl6::Metamodel::ClassHOW␤»
14:37 psch m: my int $x = 0; say $x.VAR.^name
14:37 camelia rakudo-moar 8d04be: OUTPUT«IntLexRef␤»
14:37 psch m: my int $x = 0; say $x.VAR.HOW^name
14:37 camelia rakudo-moar 8d04be: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    name used at line 1␤␤»
14:37 psch m: my int $x = 0; say $x.VAR.HOW.^name
14:37 camelia rakudo-moar 8d04be: OUTPUT«Perl6::Metamodel::NativeRefHOW␤»
14:37 psch soo yeah
14:37 jnthn .WHAT is asking "what type of object is this"
14:37 jnthn But a native int is not an object
14:38 jnthn So it boxes it into one, thus Int
14:38 viki ZzZombo: there's also int8, int16, int32, int64, and same variation for uint, and num
14:38 viki and there's also str
14:38 psch m: my num8 $x
14:38 camelia rakudo-moar 8d04be: OUTPUT«5===SORRY!5===␤Type 'num8' is not declared. Did you mean any of these?␤    Num␤    num␤␤at <tmp>:1␤------> 3my num87⏏5 $x␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 num8 $x␤␤»
14:38 psch i think we only have 32 and 64 there
14:38 viki and... I think I saw `array` too
14:38 ZzZombo right, I was confused because I vs i
14:38 jnthn All things with lowercased type names are native
14:39 jnthn Small letter = smaller in memory. :)
14:41 ZzZombo what's up with the example in https://docs.perl6.org/langua​ge/typesystem#trait_is_nodal?
14:42 ZzZombo I don't see what does it have to do with the topic at hand.
14:42 psch .elems doesn't descent into the elems of the array
14:42 psch if it would it would print "1, 1, 1, 1, 1"
14:42 ZzZombo it should be noted then somewhere.
14:43 psch m: sub elems { $^a.elems }; say [[1,2,3],[4,5]]>>.&elems
14:43 camelia rakudo-moar 8d04be: OUTPUT«[[1 1 1] [1 1]]␤»
14:43 psch m: sub elems is nodal { $^a.elems }; say [[1,2,3],[4,5]]>>.&elems
14:43 camelia rakudo-moar 8d04be: OUTPUT«[[1 1 1] [1 1]]␤»
14:43 psch huh
14:45 CIAvash ZzZombo: You added unnecessary "=" in https://github.com/perl6/doc/commit/93f868ee29
14:46 viki m: use MONKEY-TYPING; augment class Array { method elems2 () is nodal { self.elems } }; say [[1,2,3],[4,5]]».elems2
14:46 camelia rakudo-moar 8d04be: OUTPUT«No such method 'elems2' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
14:46 viki only works in core? :/
14:46 ZzZombo my bad, CIAvash
14:47 dalek doc: 88b18d7 | ZzZombo++ | doc/Language/operators.pod6:
14:47 synopsebot6 Link: http://doc.perl6.org/language/operators
14:47 dalek doc: Excessive '='
14:47 dalek doc: review: https://github.com/perl6/doc/commit/88b18d7452
14:49 ZzZombo https://docs.perl6.org/langu​age/typesystem#trait_handles
14:50 ZzZombo I don't get it at all.
14:50 ZzZombo Can somebody rephrase it concisely?
14:52 timotimo ZzZombo: you have an attribute which will have method calls delegated to it when they are called on your object
14:52 timotimo i.e. that attribute handles methods for your object
14:52 skids joined #perl6
14:53 ZzZombo how exactly does it achieve that? The examples set their values to an object. How does that work?
14:55 eisen74 joined #perl6
14:55 cdg_ joined #perl6
14:56 arnsholt m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!foo handles 'foo' = Foo.new }; Bar.foo
14:56 camelia rakudo-moar 8d04be: OUTPUT«Cannot look up attributes in a Bar type object␤  in block <unit> at <tmp> line 1␤␤»
14:56 arnsholt m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!foo handles 'foo' = Foo.new }; Bar.new.foo
14:56 camelia rakudo-moar 8d04be: OUTPUT«foo() is in Foo␤»
14:57 psch m: class A { has Int $.x handles <Numeric> }; say A.new(:1x) + 3
14:57 camelia rakudo-moar 8d04be: OUTPUT«4␤»
14:57 viki 0.o
14:57 arnsholt The declaration in Bar has two parts: "has $!foo handles 'foo'" and "= Foo.new"
14:57 viki Ah
14:58 timotimo yeah, that's a little bit weird to look at
14:58 arnsholt The first part declares Bar has having an attribute $!foo, and that calls to the method foo() on Foo objects are to be handled by calling that method on $!foo
14:58 arnsholt The second part just sets a default value for $!foo
15:00 ZzZombo uuh oh
15:00 ZzZombo that's still too weird for me to understand
15:00 ZzZombo an attribute says it handles calls to method in an unrelated objects
15:01 arnsholt m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!foo = Foo.new; method foo() { $!foo.foo() ) }; Bar.new.foo
15:01 camelia rakudo-moar 8d04be: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3o = Foo.new; method foo() { $!foo.foo() 7⏏5) }; Bar.new.foo␤    expecting any of:␤        statement end␤        statement modifier␤        statement modifi…»
15:01 arnsholt m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!foo = Foo.new; method foo() { $!foo.foo() } }; Bar.new.foo
15:01 camelia rakudo-moar 8d04be: OUTPUT«foo() is in Foo␤»
15:01 psch nah, an Attribute can be traited *inside the surrounding class* to tell that class "hey, let me deal with these methods"
15:01 timotimo "unrelated" objects?
15:01 arnsholt That's exactly the same thing
15:01 arnsholt It's just that the handles trait is more concise about it
15:02 Sasa joined #perl6
15:02 timotimo when your object Pythagoras has an attribute "Student $.poor-sod handles 'write-excellent-theorems'", then calling $mister-pythagoras.write-excellent-theorem will behave as if you had called $mister-pythagoras.poor-so​d.write-excellent-theorem instead
15:03 ZzZombo m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!beer handles 'foo' = Foo.new }; Bar.new.beer
15:03 camelia rakudo-moar 8d04be: OUTPUT«No such method 'beer' for invocant of type 'Bar'␤  in block <unit> at <tmp> line 1␤␤»
15:03 timotimo so nobody will know that it was actually the poor sod who wrote the best of pythagoras' theorems instead of mister pythagoras himself!
15:03 ZzZombo m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!beer handles 'foo' = Foo.new }; Bar.new.foo
15:03 camelia rakudo-moar 8d04be: OUTPUT«foo() is in Foo␤»
15:03 ZzZombo huh
15:05 psch m: class A {}; class B { has $.a handles 'foo' = A.new }; B.foo
15:05 camelia rakudo-moar 8d04be: OUTPUT«Cannot look up attributes in a B type object␤  in block <unit> at <tmp> line 1␤␤»
15:05 psch m: class A {}; class B { has $.a handles 'foo' = A.new }; B.new.foo
15:05 camelia rakudo-moar 8d04be: OUTPUT«No such method 'foo' for invocant of type 'A'␤  in block <unit> at <tmp> line 1␤␤»
15:06 ZzZombo so, as I understand it, it's like a proxy that forward calls to one method in an object to another method, in the same or different object?
15:06 psch s/proxy/delegate/
15:07 psch handles installs a delegate method in the class that contains the attribute that 'handles' which delegates the invocation to the attribute
15:07 psch as arnsholt++ showed above, you can have the same in long
15:09 ZzZombo m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!beer handles 'foo' }; Bar.new.foo
15:09 camelia rakudo-moar 8d04be: OUTPUT«No such method 'foo' for invocant of type 'Any'␤  in block <unit> at <tmp> line 1␤␤»
15:09 timotimo you need to put a Foo into $!beer
15:09 ZzZombo m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!beer handles 'foo'=self.new }; Bar.new.foo
15:09 psch oh geez
15:09 timotimo that's very problematic
15:09 camelia rakudo-moar 8d04be: OUTPUT«MoarVM panic: Memory allocation failed; could not allocate 131072 bytes␤»
15:09 timotimo you're now creating a new Bar every time a Bar gets created
15:09 ZzZombo IKR
15:10 ZzZombo but I had to do it
15:10 timotimo *shrug*
15:10 ZzZombo out of sheer curiosity
15:11 ZzZombo so, the most unclear bit for me was the assigment of the default value. It specifies where the target method is searched, doesn't it?
15:11 timotimo the default value behaves exactly like it would without "handles"
15:12 ZzZombo well, we are almost at square one then
15:12 timotimo an attribute that has a "handles" will behave just like a regular attribute. plus, the class that has this attribute will call methods on it when methods are called on itself
15:14 psch 'has $.x handles <foo>' means the same as 'has $.x; method foo(\c) { $.x.foo(|c) }'
15:15 ZzZombo alright, I think I get it now.
15:16 ZzZombo thanks.
15:17 ZzZombo m: enum Names ( name1 => 1, name2 => 2 ); say name1, ' ', name2; say name1.value, ' ', name2.value;
15:17 camelia rakudo-moar 8d04be: OUTPUT«name1 name2␤1 2␤»
15:18 viki say calls .gist
15:19 ZzZombo I'd prefer a stricter visibility of enum members, so they wouldn't leak outside. You would have to fully qualify them like Enum::Value.
15:20 moritz people hate to have to write Bool::True instead of True
15:20 psch m: say Bool.HOW.^name
15:20 camelia rakudo-moar 8d04be: OUTPUT«Perl6::Metamodel::EnumHOW␤»
15:23 ZzZombo m: enum A ( one => 1, two => 2 ); enum B ( one => 1, two => 2 );
15:23 camelia rakudo-moar 8d04be: OUTPUT«Potential difficulties:␤    Redeclaration of symbol 'one and two'␤    at <tmp>:1␤    ------> 3wo => 2 ); enum B ( one => 1, two => 2 )7⏏5;␤»
15:24 ZzZombo that's... bad
15:24 viki Why?
15:24 psch m: my $x; my $x
15:24 camelia rakudo-moar 8d04be: OUTPUT«Potential difficulties:␤    Redeclaration of symbol '$x'␤    at <tmp>:1␤    ------> 3my $x; my $x7⏏5<EOL>␤»
15:25 viki Forcing to use the full name kinda makes enums unwieldy, don't you think?
15:25 ZzZombo hm
15:25 ZzZombo no
15:25 ZzZombo IDK, really
15:25 viki $p ~~ Kept|Broken  vs $p ~~ PromiseStatus::Kept|PromiseStatus::Broken
15:25 viki yuk
15:26 ZzZombo what does that mean?
15:26 psch m: say Kept.perl
15:26 camelia rakudo-moar 8d04be: OUTPUT«PromiseStatus::Kept␤»
15:26 psch m: say True.perl
15:26 camelia rakudo-moar 8d04be: OUTPUT«Bool::True␤»
15:26 viki ZzZombo: it's a check for whether a Promise was Kept or Broken (but can be a simple bool)
15:26 viki huggable: Promise
15:26 huggable viki, Status/result of an asynchronous computation: https://docs.perl6.org/type/Promise
15:27 viki as in if $p { ... }
15:27 viki m: say PromiseStatus.enums
15:27 camelia rakudo-moar 8d04be: OUTPUT«Map.new((:Broken(2)​,:Kept(1),:Planned(0)))␤»
15:27 ZzZombo so you say because True/False is a Bool enum, all enums must be like that?
15:27 viki huh?
15:28 viki I was answering the "what is that" question.
15:28 ZzZombo ah, I already got over it.
15:28 canopus joined #perl6
15:28 viki :/
15:28 viki m: my $p = start sleep 2; say so $p
15:28 camelia rakudo-moar 8d04be: OUTPUT«False␤»
15:29 viki m: my $p = start sleep 2; await $p; say so $p
15:29 camelia rakudo-moar 8d04be: OUTPUT«True␤»
15:29 viki m: my $p = start sleep 2; await $p; say so $p ~~ Kept|Broken
15:29 camelia rakudo-moar 8d04be: OUTPUT«Cannot resolve caller Numeric(Promise: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at <tmp> line 1␤␤»
15:29 viki /o\
15:29 jnthn Needs to be $p.status
15:29 ZzZombo let me come from another end: is it possible to have strongly typed enums, like in C++11?
15:30 jnthn m: my $p = start sleep 2; await $p; say so $p.status ~~ Kept|Broken
15:30 viki Ah, right :) jnthn++
15:30 camelia rakudo-moar 8d04be: OUTPUT«True␤»
15:30 jnthn Not having to type that out is why it boolifies :-)
15:32 viki ZzZombo: don't think so.
15:32 viki The values are always Ints
15:33 ZzZombo so to take your Promise example, if I define a ConnectionState enum (Unconnected,Connecting,Alive,Broken,Closed), I will inadvertedly break all code that expects that Broken to come from PromiseStatus.
15:33 viki And they're not "inside" the namespace. A better way to think of it is of the enum name being the name of the class and the enums themselves being instances of that class
15:33 viki ZzZombo: right
15:34 viki ZzZombo: one way of achieving that would be to have classes inside a class
15:34 viki m: class ConnectionState { class Broken {} }; say ConnectionState::Broken.new
15:34 camelia rakudo-moar 6bb882: OUTPUT«ConnectionState::Broken.new␤»
15:34 viki and make those inner classes equate to some values. But there's no automatic mechanism for that I'm aware of
15:34 ZzZombo uh
15:35 viki Well, there's prolly something MOP can do
15:35 viki Oh and you can probably make your own Metaclass to make your strongly typed enums!
15:35 * viki doesn't know anything about MOP yet :(
15:35 ZzZombo am I allowed to fiddle with metaclasses myself tho? Don't think so.
15:36 viki You can make your own!
15:37 viki I saw a post for that on https://perl6advent.wordpress.com/ or on https://6guts.wordpress.com/
15:38 timotimo don't we have not-Int-enums?
15:38 viki Do we?
15:38 viki m: enum foo => 2/2
15:38 camelia rakudo-moar 6bb882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    enum used at line 1␤␤»
15:38 viki m: enum foo foo => 2/2
15:38 camelia rakudo-moar 6bb882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    enum used at line 1␤    foo used at line 1␤␤»
15:38 viki bah, well it'll complain about it not being an Int
15:39 viki m: enum Foo (foo => "wtf"); say foo.value
15:39 camelia rakudo-moar 6bb882: OUTPUT«wtf␤»
15:39 viki I may be misremembering then :\
15:40 ZzZombo m: enum Foo (foo => Array)
15:40 camelia rakudo-moar 6bb882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Using a type object as a value for an enum not yet implemented. Sorry. ␤at <tmp>:1␤------> 3enum Foo (foo => Array)7⏏5<EOL>␤»
15:41 ZzZombo m: enum Foo (foo => Array.new)
15:41 gfldex we got Int or Str enums, anything else is NYI
15:41 camelia rakudo-moar 6bb882: ( no output )
15:41 ZzZombo ^
15:41 viki Rat also works
15:41 viki m: enum Foo (foo => 0.5); say foo.value
15:41 camelia rakudo-moar 6bb882: OUTPUT«0.5␤»
15:41 ZzZombo defined objects
15:41 viki m: enum Foo (foo => class {}.new, "meow", "moo"); say Foo.enums
15:42 camelia rakudo-moar 6bb882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot auto-generate a proto method for 'Int' in the setting␤at <tmp>:1␤»
15:43 ZzZombo "in the setting"
15:43 timotimo that's a cool golf
15:43 timotimo m: enum Foo (bar => class {}.new)
15:43 camelia rakudo-moar 6bb882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot auto-generate a proto method for 'Int' in the setting␤at <tmp>:1␤»
15:43 timotimo m: enum Foo (bar => class {})
15:43 camelia rakudo-moar 6bb882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot auto-generate a proto method for 'Int' in the setting␤at <tmp>:1␤»
15:44 viki What's cool about it? What is it trying to do?
15:44 viki ZzZombo: "setting" is what we call the core code.
15:44 viki Well, part of it.
15:45 timotimo it's trying to give us a bad error message
15:45 viki oh
15:45 viki m: try 'enum Foo (bar => class {}.new)'.EVAL; $!.name
15:45 camelia rakudo-moar 6bb882: OUTPUT«No such method 'name' for invocant of type 'X::Comp::AdHoc'␤  in block <unit> at <tmp> line 1␤␤»
15:45 acrussell_ joined #perl6
15:45 viki s: X::Comp::AdHoc.new, 'message', \()
15:45 SourceBaby viki, Sauce is at https://github.com/rakudo/rakudo/blo​b/6bb8823/src/core/Exception.pm#L124
15:46 ZzZombo subsets can be arbitrary, they aren't restricted only to numerics nor only to literal subranges?
15:47 viki ZzZombo: right anything you want
15:47 viki m: class Foo { has $.bar }; subset Meows of Foo where *.bar > 5; say Foo.new(:2bar) ~~ Meows; say Foo.new(:20bar) ~~ Meows
15:47 camelia rakudo-moar 6bb882: OUTPUT«False␤True␤»
15:50 viki m: subset Meows where rand > .5; say ^20 .map: { $_ ~~ Meows }
15:50 camelia rakudo-moar 6bb882: OUTPUT«(True False True False False True True True False True False False False False True False False True False True)␤»
15:52 viki star: use LWP::Simple; subset Perl6Website of Cool where LWP::Simple.get($_).contains('Perl 6'); say 'http://perl6.party' ~~ Perl6Website
15:52 camelia star-m 2016.10: OUTPUT«True␤»
15:53 viki That's delightfully perverted...
15:53 Ven_ joined #perl6
16:07 samcv who does the perl6weekly, says liztormato posted it? my name got misspelled https://p6weekly.wordpress.com/2016/11​/21/2016-47-perl-6-%E5%85%A5%E9%97%A8/
16:07 samcv McVey not McVie
16:07 samcv if anybody or her can change that
16:07 viki samcv: lizmat++ does
16:08 samcv oh ok. lizmat == liztormato?
16:08 viki timotimo++ can fix it too
16:08 viki samcv: yes
16:08 samcv ah ok
16:09 timotimo one sec
16:10 timotimo look again, should be fixed
16:10 samcv timotimo++ thanks :)
16:18 viki weird, newest tickets from Zefram aren't showing up on Perl6.Fail :/
16:25 moritz Fail!
16:43 kyclark_ joined #perl6
16:48 rindolf joined #perl6
16:53 viki m: say $UINT64_UPPER
16:53 camelia rakudo-moar 6bb882: OUTPUT«18446744073709551616␤»
16:53 viki 0.o
16:54 timotimo oh, something we should be hiding?
16:54 viki prolly
16:54 viki (it's used in src/core/Rat.pm; no idea where it's defined)
16:54 psch probably Rakudo::Internals
16:55 timotimo you mean "probably should be"?
16:55 psch well, it definitely should move there if it isn't there
16:55 timotimo right
16:55 timotimo we do have uint64.Range for that
16:55 timotimo m: say uint64.Range
16:55 camelia rakudo-moar 6bb882: OUTPUT«0..18446744073709551615␤»
16:55 timotimo m: say int64.Range
16:55 camelia rakudo-moar 6bb882: OUTPUT«-9223372036854775808..9223372036854775807␤»
16:55 psch and as 'our' too, i suppose
16:56 psch ...no, wait, imports are lexical
16:56 psch i hope we don't have any imports leaking into mainline MY:: :o
17:04 cgfbee joined #perl6
17:06 Raimondii joined #perl6
17:11 kyclark_ joined #perl6
17:12 CIAvash joined #perl6
17:13 wamba joined #perl6
17:24 labster joined #perl6
17:31 domidumont joined #perl6
17:35 Bazzaar joined #perl6
17:36 dogbert17 joined #perl6
17:39 hankache joined #perl6
17:51 viki m: say 25330/37000
17:51 camelia rakudo-moar c027e6: OUTPUT«0.684595␤»
17:51 timotimo are you improving something?
17:52 viki Nah, progress of LP6 kickstarter: https://www.kickstarter.com/proj​ects/1422827986/learning-perl-6
17:52 timotimo oh
17:54 moritz kickstarter is missing some fancy graphics with backing over time
17:54 timotimo yeah, there's external websites for that
17:54 timotimo well, sites that filled that niche
17:56 moritz meh, kickerstarter doesn't support paypal :(
17:57 viki or paypal doesn't support kickstarter? :)
17:57 viki ('cause of "we'll place a hold and charge ya only when the project successfully funds" thing)
17:59 timotimo yeah, kickstarter won't let you paypal in
17:59 timotimo many campaigns will accept paypal donations out-of-band once the funding goal has been reached
18:00 viki hm... I don't see a hold on my cc, so I guess it's even more different: we'll charge ya sometime in far future, type of thing.
18:01 timotimo yeah, they'll only charge at the end of the thing
18:08 timotimo should we run a mastodon instance on p6c? probably just for a month until any potential hype has died down :D
18:09 arnsholt What's mastodon?
18:09 diakopter you're a mastadon
18:10 diakopter er. mastodon
18:11 timotimo basically federated FOSS twitter
18:11 arnsholt Ah, right
18:12 timotimo also, 500 characters per message instead of 140
18:21 acrussell_ joined #perl6
18:31 FROGGS joined #perl6
18:33 FROGGS o/
18:38 viki \o\
18:42 jast joined #perl6
18:44 hankache \o/
18:46 cognominal joined #perl6
18:58 jnthn m: https://gist.github.com/jnthn/d​5ff84151b52b188a4b681664791cf83
18:58 camelia rakudo-moar e4d78c: OUTPUT«ok 1 - Never get done message twice from a supply␤ok 2 - No react guts crash in case that once spat out two done messages either␤»
18:58 jnthn m: https://gist.github.com/jnthn/d​5ff84151b52b188a4b681664791cf83
18:58 camelia rakudo-moar e4d78c: OUTPUT«ok 1 - Never get done message twice from a supply␤ok 2 - No react guts crash in case that once spat out two done messages either␤»
18:58 jnthn m: https://gist.github.com/jnthn/d​5ff84151b52b188a4b681664791cf83
18:58 camelia rakudo-moar e4d78c: OUTPUT«Unhandled exception in code scheduled on thread 4␤Access denied to keep/break this Promise; already vowed␤  in block  at <tmp> line 12␤  in any  at /home/camelia/rakudo-m-inst-2/share​/perl6/runtime/CORE.setting.moarvm line 1␤  in sub THROW-NIL at /…»
18:59 eisen74 joined #perl6
19:02 labster joined #perl6
19:03 rindolf joined #perl6
19:04 acrussell_ joined #perl6
19:13 kalkin- viki: about branching. ok will keep in mind
19:13 kalkin- viki: #perl6-dev ok
19:13 viki m: say "There are {(|(|(2..10), 1|11, 10, 10, 10) xx 4).combinations(2..*).grep({.sum == 21}).elems} ways to win in Black Jack"
19:13 camelia rakudo-moar f928a2: OUTPUT«(timeout)»
19:13 viki :(
19:15 viki m: say "There are {(|(|(2..10), 1|11, 10, 10, 10) xx 4).combinations(2).grep({.sum == 21}).elems} ways to win in Black Jack with just 2 cards"
19:15 camelia rakudo-moar f928a2: OUTPUT«There are 64 ways to win in Black Jack with just 2 cards␤»
19:15 viki :D
19:21 rindolf joined #perl6
19:27 timotimo time to see and find some fantastic beasts
19:37 lizmat timotimo++  # fixing misspelling
19:43 timotimo mhm
19:45 diakopter viki: that's cool
19:46 mspo https://en.wikipedia.org/wik​i/IMP_(programming_language)
19:46 mspo feels super related to this channel :)
19:49 viki "IMP was the language used on NSA's homegrown time-sharing system known as Folklore."
19:49 viki We could start a rumour Perl 6 is used by NSA :D
19:50 mspo how do you know it's not?
19:50 DrForr What rumor?
19:50 DrForr m: constant FOO = Q'v';
19:50 camelia rakudo-moar f928a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Q'v used at line 1␤␤»
19:52 DrForr m: constant FOO = Q{v};
19:52 camelia rakudo-moar f928a2: ( no output )
19:52 moritz oh, it's because ' is allowed in identifiers
19:52 moritz how unfortunate
19:53 DrForr Yeah, it struck me as odd while I was fixing version numbers. I figured it was an interaction, it just violated least surprise principle to me.
19:53 viki Why? :) there're thousands other characters you can use instead
19:54 viki m: constant FOO = 「v」; say FOO
19:54 camelia rakudo-moar f928a2: OUTPUT«v␤»
19:55 Morlo joined #perl6
19:55 moritz viki: because Q is the most general quote mechanism
19:55 moritz m: say Q:s'this should interpolate: $*OUT'
19:55 camelia rakudo-moar f928a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Alphanumeric character is not allowed as a delimiter␤at <tmp>:1␤------> 3say Q:s'this7⏏5 should interpolate: $*OUT'␤»
19:55 viki The error kinda suck tho
19:56 viki m: say Q'foo'
19:56 camelia rakudo-moar f928a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say Q'foo7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤       …»
19:56 moritz m: say Q:s 'this should interpolate: $*OUT'
19:56 andrzejku joined #perl6
19:56 camelia rakudo-moar f928a2: OUTPUT«this should interpolate: <STDOUT>␤»
19:56 viki m: say Q"foo"
19:56 camelia rakudo-moar f928a2: OUTPUT«foo␤»
19:56 Morlo hi "p6doc -f push" gives "No documentation found for a routine named 'push'" on Windows 10
19:56 moritz m: say Q 'this should interpolate: $*OUT'
19:56 camelia rakudo-moar f928a2: OUTPUT«this should interpolate: $*OUT␤»
19:56 viki Morlo: it's not meant to. Such functionality is not implemented yet.
19:56 moritz Morlo: I highly recommend using https://doc.perl6.org/ instead
19:56 Morlo panda install p6doc runs but tests fail
19:56 Morlo ok
19:57 DrForr Q'' worked for everything else including { }, it just seemed odd that it would fail on this corner case.
19:57 moritz m: sub proto f(|) { try {*} }; multi f($x) { say $x }; f 42
19:57 camelia rakudo-moar f928a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub proto7⏏5 f(|) { try {*} }; multi f($x) { say $x ␤    expecting any of:␤        new name to be defined␤»
19:57 viki It shouldn't be too hard to make it work tho, I think. Considering all the search data on docs.perl6.org is pre-generated
19:57 moritz m: proto f(|) { try {*} }; multi f($x) { say $x }; f 42
19:57 camelia rakudo-moar f928a2: ( no output )
19:57 moritz is this a bug?
19:57 moritz m: proto f(|) { try { {*} } }; multi f($x) { say $x }; f 42
19:57 camelia rakudo-moar f928a2: OUTPUT«42␤»
19:58 moritz I'd hope that LTM prefers to parse {*} as a single token over the block interpretation
19:59 DrForr I'm well aware that 'v' starts version numbers and an interaction there is probably why the quirk occurs, but it offends my artistic sensibilities that I have a bunch of other Q'' constants lined up and Q{v} has to sit in the corner with its dunce cap on upside-down.
20:00 viki m: say Q'meow meow'
20:00 camelia rakudo-moar f928a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say Q'meow meow7⏏5'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤ …»
20:00 Tonik joined #perl6
20:01 viki Just use 「」 instead of Q'' :)
20:01 viki Looks prettier too, talking of artistic sensibilities...
20:01 DrForr Hrm, so it's probably not version interacting.
20:01 DrForr Harder to type on an ASCII keyboard, and yes, I know, XCompose and all that.
20:02 viki Fine, use Q||
20:02 Morlo ... just that running "p6doc" gives bad example : "You can also look up specific method/routine definitions:           p6doc -f push"
20:02 Morlo should be something that exists perhaps
20:02 DrForr Don't worry, I've got many other fish to fry. Or make into sushi.
20:03 viki Morlo: oh yeah, my bad, seems like it does: https://github.com/perl6/doc​/blob/master/bin/p6doc#L107
20:05 viki Hm, tells me "blah blah, gotta run p6doc-index build if you wanna use this"
20:06 Morlo well "p6doc-index build" fixed the p6doc -f push now
20:06 viki then it told me it got multiple matches
20:06 viki and p6doc -f Type::Array.push worked
20:06 viki Morlo: how did you obtain your Perl 6?
20:06 Morlo i did that earlier too then it failed perhaps bcoz i did not have panda installed something.. but thanks everyone
20:07 viki :(
20:16 acrussell_ joined #perl6
20:17 bjz joined #perl6
20:24 stux|RC-only joined #perl6
20:34 Raimondi left #perl6
20:34 kurahaupo__ joined #perl6
20:43 TEttinger joined #perl6
20:55 canopus joined #perl6
20:56 perlawhirl joined #perl6
21:09 dalek Inline-Perl5: 7080307 | niner++ | p5helper.c:
21:09 dalek Inline-Perl5: Fix segfaults when an interpreter is used by multiple threads
21:09 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/708030748a
21:09 dalek Inline-Perl5: de92484 | niner++ | META.info:
21:09 dalek Inline-Perl5: Version 0.22
21:09 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/de92484e8c
21:09 firstdayonthejob joined #perl6
21:10 nine As much as I hate the stress of preparing a talk, it usually leads to great advances of the code...
21:14 DrForr Conferene driven development at its finest.
21:14 DrForr At least you're not doing a 2-hour workshop.
21:21 * moritz is doing a 2-day workshop :(
21:21 tailgate the fun kind?
21:21 moritz not at a conferece, but still way too much work preparing
21:22 moritz tailgate: we'll see :-)
21:23 stmuk_ p6doc hasn't suggested "-f push" for a long time
21:24 stmuk_ oh sorry it does :)
21:26 telex joined #perl6
21:36 dalek doc: 607db24 | (Steve Mynott)++ | bin/p6doc:
21:36 dalek doc: better -f examples
21:36 dalek doc: review: https://github.com/perl6/doc/commit/607db24b19
21:49 avalenn joined #perl6
21:52 stux|RC-only joined #perl6
21:55 espadrine joined #perl6
22:03 zakharyas joined #perl6
22:03 bjz joined #perl6
22:04 r3m joined #perl6
22:10 mtj_ joined #perl6
22:12 cibs joined #perl6
22:24 labster joined #perl6
22:34 mtj_ joined #perl6
22:37 stux|RC-only joined #perl6
22:39 trnh joined #perl6
22:39 trnh joined #perl6
22:50 stmuk_ old but some gems
22:51 stmuk_ https://www.humblebundle.c​om/books/unix-book-bundle
22:53 ZzZombo_ joined #perl6
22:58 timotimo interesting
22:59 PerlJam m: role R { submethod TWEAK { say "R.tweak"; } }; class C does R { submethod TWEAK { say "C.tweak" } };  C.new;
22:59 camelia rakudo-moar f928a2: OUTPUT«C.tweak␤»
23:00 PerlJam hmm
23:00 PerlJam m: role R { submethod BUILD { say "R.build"; } }; class C does R { submethod BUILD { say "C.build" } };  C.new
23:00 camelia rakudo-moar f928a2: OUTPUT«C.build␤»
23:01 timotimo it's true, submethods from roles will not "make it" in
23:01 timotimo as you're basically supplying an authoritative BUILD or TWEAK to use
23:02 timotimo you know, in case multiple roles put in conflicting methods/submethods of the same name
23:02 PerlJam Aye.  For some reason I was thinking that it would be different.
23:02 timotimo since roles get "flattened" into the class, there's no extra space they can go into to be separate
23:02 PerlJam I guess my brain was conflating inheritance and composition for a minute
23:03 timotimo perhaps
23:03 timotimo we've had annoyances about the inability to provide BUILD (before TWEAK existed) in roles that get miexd into something
23:05 PerlJam In the thing I'm playing with, I wanted a way to BUILD/TWEAK the data that the role provides in addition to BUILD/TWEAK the class it's composed into.  (for my purposes the distinction between BUILD/TWEAK doesn't matter much right now)
23:05 timotimo right
23:06 timotimo that is a common want
23:06 timotimo you can surely do something similar self.roles>>.TWEAK(self) i suppose
23:06 PerlJam yeah.
23:06 timotimo well, .TWEAK(self: |c)
23:06 PerlJam I didn't want to do it *manually* though :)
23:07 timotimo of course
23:08 PerlJam Does the COMPOSE phaser exist yet?  That could do what I want I think
23:11 timotimo probably not
23:11 sufrostico joined #perl6
23:11 timotimo i mean
23:11 timotimo probably doesn't do what you want
23:12 timotimo the mainline of a role is basically equivalent to what COMPOSE is supposed to do
23:14 perlawhirl joined #perl6
23:15 perlawhirl timotimo: how do modules get added to zef page? do you need to manually add?
23:15 viki What zef page?
23:15 viki Ah, modules.zef.pm
23:16 perlawhirl oops... msg'd wrong person
23:16 timotimo i wasn't aware it was different from modules.perl6.org
23:16 perlawhirl heh... you an tony both start with a 't'
23:16 perlawhirl yeah there is... i don't know if anyone uses it
23:16 perlawhirl but it looks nice :D
23:16 timotimo no i mean
23:16 perlawhirl .seen tony-o
23:16 yoleaux I saw tony-o 21 Nov 2016 22:54Z in #perl6: <tony-o> ::NA
23:16 timotimo i wasn't aware the process of getting a module there is different
23:17 perlawhirl i would assume he would just check the ecosystem for commits on the regular.
23:17 perlawhirl but i'm not sure
23:29 dudz perlawhirl: I'd like to be mentored please, Living in Sydney/Australia
23:35 BenGoldberg joined #perl6
23:36 perlawhirl dudz: like... in person? i'm afraid i don't have time for that. I actually live on the central coast. between my fulltime job, 2-hour commute each way, twin toddlers and a 4-month old, i'm spread pretty thin
23:40 BenGoldberg m: printf '%a', pi;
23:40 camelia rakudo-moar f928a2: OUTPUT«Directive a is not valid in sprintf format sequence %a␤  in any  at /home/camelia/rakudo-m-inst-2/share​/perl6/runtime/CORE.setting.moarvm line 1␤␤»
23:40 tailgate what does $*W mean in nqp?
23:41 MasterDuke it's the World
23:41 tailgate and evreything in it?
23:42 MasterDuke https://github.com/perl6/nqp/​blob/master/src/HLL/World.nqp
23:43 MasterDuke a bunch of other places in the code have $*W as an instance of World
23:48 MasterDuke and https://github.com/perl6/nqp/​blob/master/src/NQP/World.nqp
23:52 sufrostico joined #perl6
23:54 perlawhirl joined #perl6

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

Perl 6 | Reference Documentation | Rakudo