»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:03 cdg left 00:07 pierre_ joined
viki samcv++ sweet! 00:11
00:16 skids joined 00:28 pierre_ left 00:30 labster joined 00:35 xiaomiao left 00:36 pierre_ joined 00:40 pierre_ left 00:41 xiaomiao joined 00:47 pyrimidine left 00:49 labster left 00:52 pierre_ joined 00:55 woodruffw joined, woodruffw left, woodruffw joined 00:59 kurahaupo__ joined 01:00 kurahaupo_______ left, kurahaupo_ joined
Ulti rakudo.org/how-to-get-rakudo/ <-- like the buttons! who is to ++ ? 01:01
01:01 kyclark_ joined 01:02 rpburkholder joined, ChoHag joined 01:03 kurahaupo__ left 01:05 woodruffw left 01:06 aborazmeh joined, aborazmeh left, aborazmeh joined
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
01:08 woodruffw joined
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 :(
Gonna be my Christmas project.
mspo xmas will be one year 01:14
01:16 trnh left 01:17 pyrimidine joined 01:21 pyrimidine left 01:24 kyclark_ left 01:26 pyrimidine joined
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:26
01:27 pyrimidine left
ZzZombo m: my @a = <a b c>;@a».say; 01:28
camelia rakudo-moar 717a84: OUTPUT«a␤b␤c␤»
ZzZombo m: my @a = <a b c> XX 10;@a».say;
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:28 pierre_ left
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␤␤»
ZzZombo m: my @a = ('a', 'b', 'c') XX 10;@a».say;
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␤␤»
viki
.oO( XX is a thing :o )
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
ZzZombo No I havn't 01:31
viki garu: I haven't had any luck with signature parameters... as with attributes.. um check out modules.perl6.org/dist/AttrX::Lazy or modules.perl6.org/dist/Attribute::Lazy maybe they have an idea? 01:32
garu viki: thanks! I'll take a look!
viki ZzZombo: and to re-iterate, they're *historical* you may find something they describe that was never implemented or implemented differently
01:33 wamba1 left
viki s: &infix:<XX> 01:34
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/6ee5...ops.pm#L23
viki So XX is just two XX? heh
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
m: my @a = (a b c) xx 10; dd @a
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␤␤»
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")]␤»
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
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)
ZzZombo it's from the docs
viki :o
ZzZombo I was wondering that
viki That should be fixed ASAP
01:37 giraffe left
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
01:38 pierre_ left, pierre_ joined
viki Hahaha 01:39
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
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…»
ZzZombo m: say ?! my $x
camelia rakudo-moar 6ee524: OUTPUT«True␤»
ZzZombo pitchforks out
dalek c: 51eb039 | (Zoffix Znet)++ | doc/Language/operators.pod6:
Note @a».say; as being an error
01:42
synopsebot6 Link: doc.perl6.org/language/operators
ZzZombo m: say (?! False)~~'d' 01:43
camelia rakudo-moar 6ee524: OUTPUT«False␤»
ZzZombo huh 01:44
01:44 giraffe joined
viki Why huh? 01:45
You're checking whether (?! False) eq 'd'
smartmatch isn't symmetrical
ZzZombo ow
m: say (?! False)~'d'
camelia rakudo-moar 6ee524: OUTPUT«Trued␤»
ZzZombo damn
viki m: say (?! False)~'dat' 01:46
camelia rakudo-moar 6ee524: OUTPUT«Truedat␤»
01:47 kurahaupo_ left
seatek m: my $b; say $b; 01:50
camelia rakudo-moar 6ee524: OUTPUT«(Any)␤»
seatek m: my $b; say "$b";
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␤␤»
viki say calls .gist, while interpolation calls .Str 01:51
seatek my interactive perl6 says Control flow commands not allowed in toplevel
viki hehe
that's last/next/redo thing
seatek :)
ah :)
ZzZombo say (False.:<?>.:<!>)~'dat'
m: say (False.:<?>.:<!>)~'dat'
camelia rakudo-moar 6ee524: OUTPUT«Truedat␤»
viki m: last 01:52
camelia rakudo-moar 6ee524: OUTPUT«===SORRY!===␤last without loop construct␤»
ZzZombo m: say (False.:<?^>)~'dat' 01:53
camelia rakudo-moar 6ee524: OUTPUT«Truedat␤»
01:59 briandfoy left 02:03 kurahaupo__ joined 02:05 FROGGS left 02:12 vendethiel- joined 02:13 Vynce left 02:15 vendethiel left 02:18 FROGGS joined
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 - ␤»
viki :( 02:20
seatek my $attr; my $key = 'value'; say "$key - {$attr«$key»}" if ($attr«$key»:exists and $attr«$key».defined);
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 - ␤»
seatek am i confused for good reason? :) 02:22
or should i try finding other ways ;)
viki Well, the correct way to write it is {$key}
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;
camelia ( no output )
viki Well... not "correct" way, but the common way
seatek yeah that's weird
viki m: my $attr; my $key = 'value'; $attr«$key».defined;
camelia ( no output )
viki m: my $attr; my $key = 'value'; say "$key - $attr«$key»" if $attr«$key».defined;
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»␤»
viki m: my $attr; my $key = 'value'; say $attr«$key» if $attr«$key».defined; 02:24
camelia rakudo-moar 6ee524: OUTPUT«((Any))␤»
viki 0.o
seatek that's what threw me!
viki waaaat
seatek :)
viki m: my $attr; my $key = 'value'; say $attr«$key»
camelia rakudo-moar 6ee524: OUTPUT«((Any))␤»
viki m: my $attr; my $key = 'value'; say «$key»
camelia rakudo-moar 6ee524: OUTPUT«(value)␤»
viki m: my $attr = Hash.new; my $key = 'value'; say «$key»
camelia rakudo-moar 6ee524: OUTPUT«(value)␤»
viki m: my $attr = Hash.new; my $key = 'value'; say $attr«$key»
camelia rakudo-moar 6ee524: OUTPUT«((Any))␤»
viki m: my $attr = %(:42value); my $key = 'value'; say $attr«$key» 02:25
camelia rakudo-moar 6ee524: OUTPUT«(42)␤»
viki Ah
seatek: you're asking for a slice, so it returns some sort of listy thing, which IS defined
But the $v thing is still LTA
viki goes to sleep
seatek ok that would explain the weird dd output i was getting
thanks viki++ ! 02:26
02:28 kalkin- left, kalkin-_ joined 02:35 telex left, telex joined
ZzZombo so round() can't round to arbitrary values before the comma, like 1234.round(4) to get 1000. 02:42
seatek m: say (1234 / 1000).round * 1000 02:44
camelia rakudo-moar 6ee524: OUTPUT«1000␤»
seatek :)
dunno though :) 02:45
02:46 ilbot3 left
ZzZombo the point is, the round() function in P6 is unexpectedly limited, compared to all other languages I've ever used. 02:46
02:47 ilbot3 joined 02:50 cdg joined
ZzZombo NOOOOOOOOOOO 02:50
==> Fetching Inline::Perl5
==> Building Inline::Perl5
Perl v5.18.0 required--this is only v5.14.2, stopped at -e line 1.
!!!
timotimo m: say 0.123456789.round(0.0001) 02:53
camelia rakudo-moar 6ee524: OUTPUT«0.1235␤»
timotimo m: say 0.123456789.round(0.01)
camelia rakudo-moar 6ee524: OUTPUT«0.12␤»
timotimo m: say 0.123456789.round(0.1)
camelia rakudo-moar 6ee524: OUTPUT«0.1␤»
timotimo m: say 0.123456789.round(1)
camelia rakudo-moar 6ee524: OUTPUT«0␤»
timotimo m: say 123456789.round($_) for ^10
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␤␤»
timotimo m: say 123456789.round($_) for (^10 + 1)
camelia rakudo-moar 6ee524: OUTPUT«123456789␤123456790␤123456789␤123456788␤123456790␤123456792␤123456788␤123456792␤123456789␤123456790␤»
timotimo m: say 123456789.round($_) for (^100 .grep(*.is-prime))[^20]
camelia rakudo-moar 6ee524: OUTPUT«123456790␤123456789␤123456790␤123456788␤123456784␤123456788␤123456788␤123456794␤123456778␤123456799␤123456787␤123456790␤123456781␤123456784␤123456780␤123456769␤123456792␤123456802␤123456813␤123456788␤»
timotimo m: say 0.123456789.round(0.5) 02:54
camelia rakudo-moar 6ee524: OUTPUT«0␤»
timotimo m: say 0.123456789.round(0.05)
camelia rakudo-moar 6ee524: OUTPUT«0.1␤»
timotimo m: say 0.123456789.round(0.01)
camelia rakudo-moar 6ee524: OUTPUT«0.12␤»
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
I'm trying to create the "awesome" trait but it can only be applied to MyClass attributes
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:58
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)␤»
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 }
camelia rakudo-moar 6ee524: OUTPUT«(MyClass)␤»
02:59 FROGGS_ joined
garu hmmm... it's working here O_O 03:00
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:01
garu tries updating rakudobrew 03:03
timotimo er, dunno?
garu :P
03:03 FROGGS left
timotimo goes to bed 03:05
garu timotimo: being the compose for that particular attribute, I was hoping it would be accessible by then
timotimo: oh, sorry! good night!
timotimo good luck!
garu thanks
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
though I would LOVE if there was any other way 03:07
at this point, just knowing the attribute's class would be great
timotimo why don't you just use self?
garu I... I... what?
self is only getting me the Attribute object 03:08
timotimo yeah
that's not what you want?
garu I can test that object for a type?
I'm pretty sure I tried and it wasn't working O_O 03:09
maybe I'm missing something
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 }
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␤»
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 }
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>)…»
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 }
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…»
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 }
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…»
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␤»
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 }
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 $!…»
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)␤»
timotimo ^- in short
garu O_O 03:13
garu hugs timotimo
THANK YOU
timotimo you're quite welcome
i'm glad you asked
garu I've been using self.name all this time, and I had self.type right there for me
timotimo ZzZombo: did you see my examples with .round? 03:14
ZzZombo: docs.perl6.org/routine/round - as you can see, it's even in the docs
timotimo disappears
seatek waves 03:17
03:18 canopus left 03:21 cdg_ joined 03:23 cdg left 03:24 xtreak joined 03:27 canopus joined 03:31 noganex_ joined 03:32 kurahaupo_ joined, kurahaupo__ left 03:34 noganex left 03:38 kurahaupo_ is now known as kurahaupo_______ 03:40 flaviusb joined 03:44 kyclark_ joined 03:46 khw left 03:55 ZzZombo left 04:30 pierre_ left 04:31 woodruffw left 04:34 pierre_ joined 04:42 kyclark_ left 04:49 araujo left 04:51 araujo joined 05:07 pierre_ left 05:12 Cabanossi left 05:13 Cabanossi joined 05:14 pierre_ joined 05:18 pierre_ left 05:25 finanalyst joined 05:28 Lucas_One left 05:36 Lucas_One joined 05:38 grondilu joined 05:41 labster joined 05:45 skids left 05:47 BenGoldberg left, skids joined 05:48 skids left 05:49 ZzZombo joined, ZzZombo left, ZzZombo joined 06:01 FROGGS_ left 06:06 adu joined 06:16 itcharlie left 06:18 ufobat joined 06:19 domidumont joined 06:25 domidumont left, finanalyst left 06:26 domidumont joined 06:28 beatdown joined 06:30 rpburkholder left 06:31 pierre_ joined 06:32 broquaint left 06:34 cdg_ left 06:39 brillenfux joined, kentnl joined 06:42 domidumont left 06:44 bjz joined, kent\n left 06:51 ssm joined, RabidGravy joined 06:55 kentnl is now known as kent\n, bjz left 06:57 bjz joined 07:00 domidumont joined 07:03 bjz left 07:05 darutoko joined 07:11 neuraload joined, adu left 07:16 bjz joined
moritz good morning 07:19
in docs.perl6.org/language/setbagmix.html why are some operators quoted? 07:20
only sub infix:<<"∈">>($a, $b --> Bool)
why not just only sub infix:<<∈>>($a, $b --> Bool ß
s/ß/?/ 07:21
07:30 aborazmeh left 07:31 firstdayonthejob joined, pierre_ left 07:36 xtreak left 07:37 pierre_ joined 07:38 firstdayonthejob left 07:42 kurahaupo_______ left 07:46 user9 left 07:48 CIAvash joined, CIAvash left
gfldex moritz: looks wrong to me 07:59
08:01 xtreak joined
gfldex moritz: its used to be hex quotes see: github.com/perl6/doc/commit/099bf5...cc6018922e 08:02
08:04 wamba joined 08:10 brrt joined 08:14 CIAvash joined 08:21 neuraload left 08:27 domidumont left 08:29 domidumont joined 08:31 zakharyas joined 08:33 Ven_ joined 08:49 g4 joined, g4 left, g4 joined 08:51 telex left 08:52 telex joined 09:00 xtreak left 09:03 jonas1 joined
masak gud murning, #purl6 09:12
09:12 user9 joined 09:17 labster left 09:22 Ven_ left, xtt joined 09:23 Ven_ joined
ZzZombo how the hell does Inline::Perl5 find your current Perl 5 installation???? 09:23
09:23 wamba left, dakkar joined
psch nine++ probably knows 09:23
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:24
09:27 xtreak joined
DrForr github.com/niner/Inline-Perl5/blob...figure.pl6 says that it's just invoking 'perl -e...' from the shell, so likely the "alongside" bit is what causes a problem. 09:28
psch ZzZombo: ooc, did you check if your system perl already brings -fPIC? 09:30
ZzZombo ugh, scratch that. Somehow now it works, and is in process of running tests. 09:31
09:31 TEttinger left
ZzZombo Result: PASS 09:31
hooray
p5helper.c:1:0: warning: -fPIC ignored for target (all code is position independent) 09:32
is it that?
psch ZzZombo: i was thinking along the lines of "perl -V | grep fPIC" and "perl -V | grep useshrplib" 09:33
ZzZombo I don't have grep, this is Windows after all. 09:35
09:35 brillenfux left 09:36 xtt left 09:37 cibs left
psch so how about "perl -V > perlflags.txt && notepad perlflags.txt" and then Ctrl+F "fPIC"? :P 09:38
09:39 cibs joined
ZzZombo no results. 09:41
psch okay, cool :) 09:42
anyway, i was just curious if you had checked it before installing/building a different Perl 5
ZzZombo does it matter?
DrForr Aren't there instructions to enable fPIC in the README? (not that they're Windows friendly)
09:44 gregf_ joined
psch the Inline::Perl5 README only says "you need to build it with $flag, if you have perlbrew do this: ..." 09:47
Ven_ o/ 09:48
huh
09:48 Ven_ left 09:49 Ven_ joined
nine ZzZombo: so does it work now? 09:53
ZzZombo IDK, I've not written a P6 program. I only ever checked syntax of a module I've written. 09:54
Worx. 09:59
Yay 10:00
10:02 wamba joined 10:03 ocbtec joined
nine :) 10:07
10:07 Actualeyes left 10:13 rindolf joined 10:15 Ven_ left 10:16 avuserow left 10:24 pierre_ left 10:25 Actualeyes joined 10:26 pierre_ joined 10:30 broquaint joined 10:32 TimToady left 10:33 gregf_ left 10:35 avuserow joined 10:45 TimToady joined 10:47 nowan left 10:49 seatek left 10:56 nowan joined 11:01 pierre_ left 11:02 xtt joined 11:09 rindolf left 11:22 rindolf joined 11:25 xinming left 11:27 xtreak left 11:28 xtreak joined 11:31 Ven_ joined 11:32 xtt left 11:37 xtreak left 11:42 wamba left 11:46 Actualeyes left 11:47 Actualeyes joined 11:55 CIAvash left, brillenfux joined 12:03 rindolf left 12:06 rindolf joined 12:07 Dunearhp left 12:10 Dunearhp joined 12:11 cibs left
tbrowder hi #perl6 12:12
12:12 cibs joined 12:13 wamba joined
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:15
moritz if you've installed the modules properly, you don't need 'use lib' 12:18
12:20 CIAvash joined 12:21 CIAvash left
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:32
moritz tbrowder: uhm, try zef? 12:34
tbrowder: installing in $HOME/.perl6 looks kinda wrong to me
I'd expect it to install to site 12:35
of course, it requires you to have write access to the site path
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, tojo joined
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
timotimo its installation is just "./bin/zef install ." iirc
sorry, with -Ilib 12:38
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
tojo hello, i'm trying this example perl6maven.com/tutorial/perl6-itera...-one-array but not getting same results? 12:41
a 1 b 2
moritz panda and zef are the third generation of module installiers
tojo Too few positionals passed; expected 2 arguments but got 1
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.
moritz tbrowder: the easier solution is to use a distribution
timotimo tojo: you'll need either a flat after for, or parenthesis around $letter, $number
moritz tbrowder: we currently don't have a distribution (like rakudo star) that includes zef 12:42
somebody with motivation and time should change that
tbrowder okay, which one? i've tried the star distro which is the one where i get the problem with .perl6?
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.
tojo timotimo: oh! thanks that resolved it! :)
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
timotimo might want to talk to szabgab about setting up automated tests for all the example code, like we have in docs.perl6.org
tbrowder where do i look for the fiddly bits?
12:45 vendethiel- left 12:46 vendethiel joined
timotimo tojo: turns out perl6maven has an automated/continuous-integration thing and it says "build failing" :| 12:48
timotimo cleaned up travis build status of perl6maven.com with two pull requests 12:57
moritz timotimo: then remove the link
that was always the philisophy of perl6.org
timotimo well, when those pull requests get merged in, it'll be clean 12:59
so all files will produce the output they claim they should
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 13:02 skids joined
ZzZombo hm 13:07
can I have FALLBACK in a package?
not in a class?
timotimo no, but you can have a sub EXPORT 13:09
viki observes a lot of "returns ..." stuff in docs isn't entirely accurate since many methods can return Junctions as well 13:14
m: say eager ((1|2) .. (3|4)).sum
camelia rakudo-moar b597b7: OUTPUT«any(any((6), (10)), any((5), (9)))␤»
viki m: say eager ((1|2) .. (3|4)).reverse
camelia rakudo-moar b597b7: OUTPUT«any(any((3 2 1), (4 3 2 1)), any((3 2), (4 3 2)))␤»
viki prolly not worth fixing...
.tell kalkin-_ FWIW, nine++ improved upon your PR (also, I recommend you join #perl6-dev): github.com/rakudo/rakudo/commit/b5...9811d72ba8 13:17
yoleaux viki: I'll pass your message to kalkin-_.
13:19 skids left
viki How can I check two Junctions are equivalent? 13:27
m: say so 1|2 eqv 1|2
camelia rakudo-moar b597b7: OUTPUT«True␤»
viki m: say so 1|2 eqv 2|5
camelia rakudo-moar b597b7: OUTPUT«True␤»
brrt hmmm 13:28
it is a good question
m: say all(1|2) eqv 2|5
camelia rakudo-moar b597b7: OUTPUT«all(any(any(False, False), any(True, False)))␤»
brrt m: say so all(1|2 eqv 2|5);
camelia rakudo-moar b597b7: OUTPUT«True␤»
brrt m: say so all(1|2) eqv 2|5; 13:29
camelia rakudo-moar b597b7: OUTPUT«True␤»
brrt junctions are confusing
viki :)
brrt m: say so all(1|2) eqv all(2|5);
camelia rakudo-moar b597b7: OUTPUT«True␤»
brrt oh, i get it
... i'm not sure you can... 13:30
viki :( 13:31
I haveta
brrt m: my $a = 1|2;. say $a.^methods;
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;␤»
brrt m: my $a = 1|2; say $a.^methods;
camelia rakudo-moar b597b7: OUTPUT«(defined CALL-ME sink AUTOTHREAD new Bool ACCEPTS Str gist perl)␤»
brrt it's kind of opaque 13:32
viki Well, I gotta test the two Junctions are the same :/
I got it 13:33
13:33 khw joined
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␤»
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)
camelia rakudo-moar b597b7: OUTPUT«False␤»
viki \o/
viki onlooks at horrified faces 13:34
13:34 aborazmeh joined, aborazmeh left, aborazmeh joined 13:35 gregf_ left
ZzZombo <timotimo> no, but you can have a sub EXPORT 13:38
how does that help me?
viki ZzZombo: what exactly would FALLBACK with a package do? 13:39
ZzZombo same thing as it does in P5?
viki ZzZombo: which is what? 13:40
ZzZombo if we take it as replacement for AUTOLOAD
13:40 Ven_ left
viki ZzZombo: sub EXPORT can dynamically figure out what to export: github.com/zoffixznet/perl6-SPEC-F...pm6#L7-L11 13:41
I don't know Perl 5, so I dunno what AUTOLOAD does in Perl 5 packages...
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
ZzZombo eh 13:43
viki ZzZombo: I don't recall us having anything like that
ZzZombo so are you saying I can't translate my module into P6 w/ minimal changes?
viki ZzZombo: yup.
DrForr Look at Perl::ToPerl6, but be aware it still needs hand tweaking. 13:44
ZzZombo that's bad.
viki ZzZombo: well, you'd have similar issues when translating it to any other language, so :)
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?
viki ZzZombo: and I'm not omniscient.. there may be some sort of a hack. I just never seen it
DrForr Start with Inline::Perl5 and change your driver script, not the modules you've used.
ZzZombo modules.perl6.org/ knows nothing.
DrForr ZzZombo: CPAN.
ZzZombo ah, CPAN 13:46
13:46 telex left
DrForr There's no Perl 6 equivalent of Perl5 PPI. 13:46
yet.
13:46 telex joined
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?
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.
psch as in, only the reference implementation invoked by the binary perl can parse the language Perl
13:50 aborazmeh left
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␤------> 031<2 ?? say True !! say False7⏏5<EOL>␤ expecting any of:␤ postfix␤»
viki Eh, crap. My Junction comparing trick doesn't quite work for nested junctions :/
ZzZombo m: 1 < 2 ?? say True !! say False
camelia rakudo-moar b597b7: OUTPUT«True␤»
viki laughs
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
okay, i see the star repo... 13:53
ZzZombo m: say 1 < 2 ?? say True,'1' !! say False,'0'
camelia rakudo-moar b597b7: OUTPUT«True1␤True␤»
ZzZombo m: say 1 < 2 ?? say True;'1' !! say False;'0'
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
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␤»
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) ... }␤»
psch m: .() with 1 < 2 ?? {say True;my $x='1'} !! {say False;my $x='0'}
camelia rakudo-moar b597b7: OUTPUT«True␤»
ZzZombo m: say 1 < 2 ?? do {say True;my $x='1'} !! do {say False;my $x='0'}
camelia rakudo-moar b597b7: OUTPUT«True␤1␤»
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:56 wamba left
ZzZombo m: say 1 < 2 ?? do {say True;'1'} !! do {say False;'0'} 13:57
camelia rakudo-moar b597b7: OUTPUT«True␤1␤»
viki m: gist.github.com/zoffixznet/27fc3c5...127f015037 13:58
camelia rakudo-moar b597b7: OUTPUT«"IterationBuffer"␤"IterationBuffer"␤"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>…»
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)? 13:59
found a way that works actually... 14:00
m: gist.github.com/zoffixznet/d336de2...578fd75023 14:01
camelia rakudo-moar b597b7: OUTPUT«ok 1 - tis same␤»
14:01 gregf_ joined
viki chalks the answer up as "magic" and moves on. 14:01
14:01 perlawhirl joined
moritz viki: sounds plausible :-) 14:01
perlawhirl Ahoy hoy 14:02
yoleaux 15 Nov 2016 09:11Z <lizmat> perlawhirl: .reverse on shaped arrays is also borked :-(
dudz hi perlawhirl
perlawhirl I've knocked up a Net::Netmask module 14:03
github.com/0racle/p6-wig
can ecosystem lords pull my request
oops
wrong link
github.com/0racle/p6-Net-Netmask
it's more-or-less an API clone of the p5 module 14:04
with less methods
dalek osystem: f38b748 | 0racle++ | META.list:
Add Net::Netmask
osystem: 7c0ab89 | (Zoffix Znet)++ | META.list:
Merge pull request #268 from 0racle/patch-1

Add Net::Netmask
perlawhirl ta, zoff
moritz perlawhirl: I've invited you to the perl6 team, so in future you can push directly
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
moritz perlawhirl: of course not
moritz whistels innocently
viki s/"wig" : "lib/Net/Netmask.pm"/"Net::Netmask" : "lib/Net/Netmask.pm"/ 14:06
14:06 xinming joined
viki buggable: eco 14:06
perlawhirl viki: copy/paste errors... gimme a sec
buggable viki, Out of 745 Ecosystem dists, 138 have warnings and 1 have errors. See modules.perl6.org/update.log for details
14:06 bjz left
perlawhirl ok, fixed... i think 14:07
viki yeah, looks fine 14:08
14:09 andrzejku left
dudz night .o/ 14:09
viki \o\ 14:10
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
perlawhirl i know... i want to, tho... perl6 is too much fun 14:12
14:13 wamba joined
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;␤»
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;␤»
ZzZombo m: say(<people of earth> ==> map({ .tc }) ==> my @caps;@caps ==> grep /<[PE]>/ ==> sort() ==> my @result).perl;
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
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;
camelia rakudo-moar b597b7: OUTPUT«["Earth", "People"]␤»
ZzZombo m: <people of earth> ==> map({ .tc }) ==> my @caps ==> grep /<[PE]>/ ==> sort() ==> my @result;say @result.perl;
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␤»
gfldex m: (<people of earth> ==> map({ .tc }) ==> my @caps;@caps ==> grep /<[PE]>/ ==> sort()).perl.say
camelia rakudo-moar b597b7: OUTPUT«(("People", "Of", "Earth"), ("Earth", "People"))␤»
dalek c: a47aced | ZzZombo++ | doc/Language/operators.pod6:
Consistency
14:19
synopsebot6 Link: doc.perl6.org/language/operators
gfldex how often does camelia look for a new Rakudo version? 14:20
viki often enough that HEAD is available few minutes after pushing 14:22
m:
m: 42
camelia rakudo-moar b597b7: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
ZzZombo m: my @result = <== sort() <== grep({ /<[PE]>/ }) <== my @caps <== map({ .tc }) <== <people of earth>;say @result.perl;
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␤ …»
viki She's currently on penultimate commit, with the last one pushed 19 minutes ago 14:23
14:23 cdg joined
ZzZombo huh, is the example broken? 14:24
or what did I do wrong?
14:24 wamba left
dalek c: 500aad8 | gfldex++ | doc/Language/setbagmix.pod6:
remove leftover quotes
14:25
synopsebot6 Link: doc.perl6.org/language/setbagmix
CIAvash m: my @result <== sort() <== grep({ /<[PE]>/ }) <== my @caps <== map({ .tc }) <== <people of earth>;say @result.perl;
camelia rakudo-moar b597b7: OUTPUT«["Earth", "People"]␤»
viki m: use NativeCall; sub system (Str) is native {}; system Q/crontab -l | grep -Ev '^#'/
camelia rakudo-moar b597b7: OUTPUT«'/var/spool/cron/tabs' is not a directory, bailing out.␤»
dalek c: 93f868e | ZzZombo++ | doc/Language/operators.pod6:
Same
synopsebot6 Link: doc.perl6.org/language/operators
14:27 imcsk8 left
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␤…»
ZzZombo m: my @result <== sort() <== grep({ /<[PE]>/ }) <== my @caps <== map({ .tc }) <== <people of earth>;say @result.perl;
camelia rakudo-moar b597b7: OUTPUT«["Earth", "People"]␤»
ZzZombo hm
14:30 imcsk8 joined, kyclark_ joined
viki m: 42 14:32
camelia rakudo-moar 8d04be: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
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
ZzZombo: how large? mst-large?
:)
ZzZombo let me check
damn it was the last of its kind 14:34
14:35 wamba joined
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…»
ZzZombo m: class A { multi method m(Int $i){ say 'Int' }; multi method m(int $i){ say 'int' } }
camelia ( no output )
ZzZombo WTF 14:36
this is legal?
viki ?
psch m: say Int =:= int
camelia rakudo-moar 8d04be: OUTPUT«False␤»
ZzZombo wait
viki Why wouldn't it be?
DrForr Int isn't the same as int.
ZzZombo int vs Int
what is int?
viki ZzZombo: native int
ZzZombo k, I see now.
psch with sneaky autoboxing though
viki The docs may be lacking on those
psch m: my int $x = 0; say $x.WHAT 14:37
camelia rakudo-moar 8d04be: OUTPUT«(Int)␤»
ZzZombo wut
Int?
psch m: my int $x = 0; say $x.HOW.^name
camelia rakudo-moar 8d04be: OUTPUT«Perl6::Metamodel::ClassHOW␤»
psch m: my int $x = 0; say $x.VAR.^name
camelia rakudo-moar 8d04be: OUTPUT«IntLexRef␤»
psch m: my int $x = 0; say $x.VAR.HOW^name
camelia rakudo-moar 8d04be: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ name used at line 1␤␤»
psch m: my int $x = 0; say $x.VAR.HOW.^name
camelia rakudo-moar 8d04be: OUTPUT«Perl6::Metamodel::NativeRefHOW␤»
psch soo yeah
jnthn .WHAT is asking "what type of object is this"
But a native int is not an object
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
and there's also str
psch m: my num8 $x
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␤␤»
psch i think we only have 32 and 64 there
viki and... I think I saw `array` too
ZzZombo right, I was confused because I vs i
jnthn All things with lowercased type names are native
Small letter = smaller in memory. :) 14:39
14:39 wamba left
ZzZombo what's up with the example in docs.perl6.org/language/typesystem..._is_nodal? 14:41
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
if it would it would print "1, 1, 1, 1, 1"
ZzZombo it should be noted then somewhere.
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]]␤»
psch m: sub elems is nodal { $^a.elems }; say [[1,2,3],[4,5]]>>.&elems
camelia rakudo-moar 8d04be: OUTPUT«[[1 1 1] [1 1]]␤»
psch huh
CIAvash ZzZombo: You added unnecessary "=" in github.com/perl6/doc/commit/93f868ee29 14:45
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␤␤»
viki only works in core? :/
ZzZombo my bad, CIAvash
dalek c: 88b18d7 | ZzZombo++ | doc/Language/operators.pod6:
Excessive '='
14:47
synopsebot6 Link: doc.perl6.org/language/operators
ZzZombo docs.perl6.org/language/typesystem...it_handles 14:49
I don't get it at all. 14:50
Can somebody rephrase it concisely?
timotimo ZzZombo: you have an attribute which will have method calls delegated to it when they are called on your object 14:52
i.e. that attribute handles methods for your object
14:52 skids joined
ZzZombo how exactly does it achieve that? The examples set their values to an object. How does that work? 14:53
14:55 eisen74 joined, cdg_ joined
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 perlawhirl left
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␤»
psch m: class A { has Int $.x handles <Numeric> }; say A.new(:1x) + 3 14:57
camelia rakudo-moar 8d04be: OUTPUT«4␤»
14:57 cdg left
viki 0.o 14:57
arnsholt The declaration in Bar has two parts: "has $!foo handles 'foo'" and "= Foo.new"
viki Ah
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
The second part just sets a default value for $!foo
ZzZombo uuh oh 15:00
that's still too weird for me to understand
an attribute says it handles calls to method in an unrelated objects
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…»
arnsholt m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!foo = Foo.new; method foo() { $!foo.foo() } }; Bar.new.foo
camelia rakudo-moar 8d04be: OUTPUT«foo() is in Foo␤»
psch nah, an Attribute can be traited *inside the surrounding class* to tell that class "hey, let me deal with these methods"
timotimo "unrelated" objects?
arnsholt That's exactly the same thing
It's just that the handles trait is more concise about it
15:02 Sasa joined, Sasa left
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-sod.write-excellent-theorem instead 15:02
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␤␤»
timotimo so nobody will know that it was actually the poor sod who wrote the best of pythagoras' theorems instead of mister pythagoras himself!
ZzZombo m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!beer handles 'foo' = Foo.new }; Bar.new.foo
camelia rakudo-moar 8d04be: OUTPUT«foo() is in Foo␤»
ZzZombo huh
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␤␤»
psch m: class A {}; class B { has $.a handles 'foo' = A.new }; B.new.foo
camelia rakudo-moar 8d04be: OUTPUT«No such method 'foo' for invocant of type 'A'␤ in block <unit> at <tmp> line 1␤␤»
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/
handles installs a delegate method in the class that contains the attribute that 'handles' which delegates the invocation to the attribute 15:07
as arnsholt++ showed above, you can have the same in long
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␤␤»
timotimo you need to put a Foo into $!beer
ZzZombo m: class Foo { method foo() { say "foo() is in Foo" } }; class Bar { has $!beer handles 'foo'=self.new }; Bar.new.foo
psch oh geez
timotimo that's very problematic
camelia rakudo-moar 8d04be: OUTPUT«MoarVM panic: Memory allocation failed; could not allocate 131072 bytes␤»
timotimo you're now creating a new Bar every time a Bar gets created
ZzZombo IKR
but I had to do it 15:10
timotimo *shrug*
ZzZombo out of sheer curiosity
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:11 brillenfux left
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
psch 'has $.x handles <foo>' means the same as 'has $.x; method foo(\c) { $.x.foo(|c) }' 15:14
ZzZombo alright, I think I get it now. 15:15
thanks. 15:16
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␤»
viki say calls .gist 15:18
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:19
moritz people hate to have to write Bool::True instead of True 15:20
psch m: say Bool.HOW.^name
camelia rakudo-moar 8d04be: OUTPUT«Perl6::Metamodel::EnumHOW␤»
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:23 canopus left
ZzZombo that's... bad 15:24
viki Why?
psch m: my $x; my $x
camelia rakudo-moar 8d04be: OUTPUT«Potential difficulties:␤ Redeclaration of symbol '$x'␤ at <tmp>:1␤ ------> 3my $x; my $x7⏏5<EOL>␤»
15:24 dmaestro left
viki Forcing to use the full name kinda makes enums unwieldy, don't you think? 15:25
ZzZombo hm
no
IDK, really
viki $p ~~ Kept|Broken vs $p ~~ PromiseStatus::Kept|PromiseStatus::Broken
yuk
15:25 xtt left
ZzZombo what does that mean? 15:26
psch m: say Kept.perl
camelia rakudo-moar 8d04be: OUTPUT«PromiseStatus::Kept␤»
psch m: say True.perl
camelia rakudo-moar 8d04be: OUTPUT«Bool::True␤»
viki ZzZombo: it's a check for whether a Promise was Kept or Broken (but can be a simple bool)
huggable: Promise
huggable viki, Status/result of an asynchronous computation: docs.perl6.org/type/Promise
viki as in if $p { ... } 15:27
m: say PromiseStatus.enums
camelia rakudo-moar 8d04be: OUTPUT«Map.new((:Broken(2),:Kept(1),:Planned(0)))␤»
ZzZombo so you say because True/False is a Bool enum, all enums must be like that?
viki huh?
I was answering the "what is that" question. 15:28
ZzZombo ah, I already got over it.
15:28 canopus joined
viki :/ 15:28
m: my $p = start sleep 2; say so $p 15:29
camelia rakudo-moar 8d04be: OUTPUT«False␤»
viki m: my $p = start sleep 2; await $p; say so $p
camelia rakudo-moar 8d04be: OUTPUT«True␤»
viki m: my $p = start sleep 2; await $p; say so $p ~~ Kept|Broken
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␤␤»
viki /o\
jnthn Needs to be $p.status
ZzZombo let me come from another end: is it possible to have strongly typed enums, like in C++11?
jnthn m: my $p = start sleep 2; await $p; say so $p.status ~~ Kept|Broken 15:30
viki Ah, right :) jnthn++
camelia rakudo-moar 8d04be: OUTPUT«True␤»
jnthn Not having to type that out is why it boolifies :-)
viki ZzZombo: don't think so. 15:32
The values are always Ints
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
ZzZombo: right
ZzZombo: one way of achieving that would be to have classes inside a class 15:34
m: class ConnectionState { class Broken {} }; say ConnectionState::Broken.new
camelia rakudo-moar 6bb882: OUTPUT«ConnectionState::Broken.new␤»
viki and make those inner classes equate to some values. But there's no automatic mechanism for that I'm aware of
ZzZombo uh
viki Well, there's prolly something MOP can do 15:35
Oh and you can probably make your own Metaclass to make your strongly typed enums!
viki doesn't know anything about MOP yet :(
ZzZombo am I allowed to fiddle with metaclasses myself tho? Don't think so.
viki You can make your own! 15:36
I saw a post for that on perl6advent.wordpress.com/ or on 6guts.wordpress.com/ 15:37
timotimo don't we have not-Int-enums? 15:38
viki Do we?
m: enum foo => 2/2
camelia rakudo-moar 6bb882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ enum used at line 1␤␤»
15:38 brrt left
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␤␤»
viki bah, well it'll complain about it not being an Int
m: enum Foo (foo => "wtf"); say foo.value 15:39
camelia rakudo-moar 6bb882: OUTPUT«wtf␤»
viki I may be misremembering then :\
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>␤»
gfldex we got Int or Str enums, anything else is NYI 15:41
ZzZombo m: enum Foo (foo => Array.new)
camelia ( no output )
ZzZombo ^
viki Rat also works
m: enum Foo (foo => 0.5); say foo.value
camelia rakudo-moar 6bb882: OUTPUT«0.5␤»
ZzZombo defined objects
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␤»
ZzZombo "in the setting" 15:43
timotimo that's a cool golf
m: enum Foo (bar => class {}.new)
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␤»
timotimo m: enum Foo (bar => class {})
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␤»
viki What's cool about it? What is it trying to do? 15:44
ZzZombo: "setting" is what we call the core code.
Well, part of it.
timotimo it's trying to give us a bad error message 15:45
viki oh
m: try 'enum Foo (bar => class {}.new)'.EVAL; $!.name
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
viki s: X::Comp::AdHoc.new, 'message', \() 15:45
SourceBaby viki, Sauce is at github.com/rakudo/rakudo/blob/6bb8...on.pm#L124
ZzZombo subsets can be arbitrary, they aren't restricted only to numerics nor only to literal subranges? 15:46
viki ZzZombo: right anything you want 15:47
m: class Foo { has $.bar }; subset Meows of Foo where *.bar > 5; say Foo.new(:2bar) ~~ Meows; say Foo.new(:20bar) ~~ Meows
camelia rakudo-moar 6bb882: OUTPUT«False␤True␤»
15:48 Ven_ left 15:49 g4 left
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:51 jonas1 left
viki star: use LWP::Simple; subset Perl6Website of Cool where LWP::Simple.get($_).contains('Perl 6'); say 'perl6.party' ~~ Perl6Website 15:52
camelia star-m 2016.10: OUTPUT«True␤»
viki That's delightfully perverted... 15:53
15:54 Ven_ joined 16:04 Ven_ left
samcv who does the perl6weekly, says liztormato posted it? my name got misspelled p6weekly.wordpress.com/2016/11/21/...%E9%97%A8/ 16:07
McVey not McVie
if anybody or her can change that
viki samcv: lizmat++ does
samcv oh ok. lizmat == liztormato? 16:08
viki timotimo++ can fix it too
samcv: yes
samcv ah ok
timotimo one sec 16:09
look again, should be fixed 16:10
samcv timotimo++ thanks :)
viki weird, newest tickets from Zefram aren't showing up on Perl6.Fail :/ 16:19
moritz Fail! 16:25
16:31 gregf_ left 16:33 domidumont left 16:34 kyclark_ left 16:42 rindolf left 16:43 kyclark_ joined 16:44 CIAvash left 16:48 rindolf joined
viki m: say $UINT64_UPPER 16:53
camelia rakudo-moar 6bb882: OUTPUT«18446744073709551616␤»
viki 0.o
timotimo oh, something we should be hiding? 16:54
viki prolly
(it's used in src/core/Rat.pm; no idea where it's defined)
psch probably Rakudo::Internals
timotimo you mean "probably should be"? 16:55
psch well, it definitely should move there if it isn't there
timotimo right
we do have uint64.Range for that
m: say uint64.Range
camelia rakudo-moar 6bb882: OUTPUT«0..18446744073709551615␤»
timotimo m: say int64.Range
camelia rakudo-moar 6bb882: OUTPUT«-9223372036854775808..9223372036854775807␤»
psch and as 'our' too, i suppose
...no, wait, imports are lexical 16:56
i hope we don't have any imports leaking into mainline MY:: :o
17:03 cgfbee left, Raimondi left 17:04 cgfbee joined 17:06 Raimondii joined 17:10 kyclark_ left 17:11 Actualeyes left, kyclark_ joined 17:12 CIAvash joined 17:13 wamba joined 17:14 Raimondii is now known as Raimondi 17:24 labster joined 17:31 domidumont joined, dogbert17 left 17:33 labster left 17:35 Bazzaar joined 17:36 dogbert17 joined 17:37 cognominal left 17:39 hankache joined 17:42 Bazzaar left 17:45 dakkar left 17:49 mtj_ left
viki m: say 25330/37000 17:51
camelia rakudo-moar c027e6: OUTPUT«0.684595␤»
timotimo are you improving something?
viki Nah, progress of LP6 kickstarter: www.kickstarter.com/projects/14228...ing-perl-6 17:52
timotimo oh
17:54 zakharyas left
moritz kickstarter is missing some fancy graphics with backing over time 17:54
timotimo yeah, there's external websites for that
well, sites that filled that niche
moritz meh, kickerstarter doesn't support paypal :( 17:56
viki or paypal doesn't support kickstarter? :) 17:57
('cause of "we'll place a hold and charge ya only when the project successfully funds" thing)
timotimo yeah, kickstarter won't let you paypal in 17:59
many campaigns will accept paypal donations out-of-band once the funding goal has been reached
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:00
timotimo yeah, they'll only charge at the end of the thing 18:01
18:05 acrussell_ left 18:07 eisen74 left
timotimo should we run a mastodon instance on p6c? probably just for a month until any potential hype has died down :D 18:08
arnsholt What's mastodon? 18:09
diakopter you're a mastadon
er. mastodon 18:10
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 18:25 acrussell_ left 18:31 FROGGS joined
FROGGS o/ 18:33
viki \o\ 18:38
18:41 jast left 18:42 jast joined
hankache \o/ 18:44
18:46 cognominal joined
jnthn m: gist.github.com/jnthn/d5ff84151b52...664791cf83 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␤»
jnthn m: gist.github.com/jnthn/d5ff84151b52...664791cf83
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␤»
jnthn m: gist.github.com/jnthn/d5ff84151b52...664791cf83
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 19:00 rindolf left 19:02 labster joined 19:03 rindolf joined 19:04 acrussell_ joined 19:12 kalkin-_ is now known as kalkin-
kalkin- viki: about branching. ok will keep in mind 19:13
viki: #perl6-dev ok
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"
camelia rakudo-moar f928a2: OUTPUT«(timeout)»
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␤»
viki :D
19:16 domidumont left 19:19 rindolf left 19:21 rindolf joined 19:26 darutoko left
timotimo time to see and find some fantastic beasts 19:27
19:36 CIAvash left
lizmat timotimo++ # fixing misspelling 19:37
19:38 labster left
timotimo mhm 19:43
diakopter viki: that's cool 19:45
mspo en.wikipedia.org/wiki/IMP_(program..._language) 19:46
feels super related to this channel :)
viki "IMP was the language used on NSA's homegrown time-sharing system known as Folklore." 19:49
We could start a rumour Perl 6 is used by NSA :D 19:50
mspo how do you know it's not?
DrForr What rumor?
m: constant FOO = Q'v';
camelia rakudo-moar f928a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ Q'v used at line 1␤␤»
DrForr m: constant FOO = Q{v}; 19:52
camelia ( no output )
moritz oh, it's because ' is allowed in identifiers
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.
viki Why? :) there're thousands other characters you can use instead 19:54
m: constant FOO = 「v」; say FOO
camelia rakudo-moar f928a2: OUTPUT«v␤»
19:55 Morlo joined
moritz viki: because Q is the most general quote mechanism 19:55
m: say Q:s'this should interpolate: $*OUT'
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'␤»
viki The error kinda suck tho
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␤ …»
moritz m: say Q:s 'this should interpolate: $*OUT'
camelia rakudo-moar f928a2: OUTPUT«this should interpolate: <STDOUT>␤»
19:56 andrzejku joined
viki m: say Q"foo" 19:56
camelia rakudo-moar f928a2: OUTPUT«foo␤»
Morlo hi "p6doc -f push" gives "No documentation found for a routine named 'push'" on Windows 10
moritz m: say Q 'this should interpolate: $*OUT'
camelia rakudo-moar f928a2: OUTPUT«this should interpolate: $*OUT␤»
viki Morlo: it's not meant to. Such functionality is not implemented yet.
moritz Morlo: I highly recommend using doc.perl6.org/ instead
Morlo panda install p6doc runs but tests fail
ok
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
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␤»
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
moritz m: proto f(|) { try {*} }; multi f($x) { say $x }; f 42
camelia ( no output )
moritz is this a bug?
m: proto f(|) { try { {*} } }; multi f($x) { say $x }; f 42
camelia rakudo-moar f928a2: OUTPUT«42␤»
moritz I'd hope that LTM prefers to parse {*} as a single token over the block interpretation 19:58
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. 19:59
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
viki Just use 「」 instead of Q'' :) 20:01
Looks prettier too, talking of artistic sensibilities...
DrForr Hrm, so it's probably not version interacting.
Harder to type on an ASCII keyboard, and yes, I know, XCompose and all that.
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"
should be something that exists perhaps
DrForr Don't worry, I've got many other fish to fry. Or make into sushi.
viki Morlo: oh yeah, my bad, seems like it does: github.com/perl6/doc/blob/master/bin/p6doc#L107 20:03
Hm, tells me "blah blah, gotta run p6doc-index build if you wanna use this" 20:05
Morlo well "p6doc-index build" fixed the p6doc -f push now 20:06
viki then it told me it got multiple matches
and p6doc -f Type::Array.push worked
Morlo: how did you obtain your Perl 6?
Morlo i did that earlier too then it failed perhaps bcoz i did not have panda installed something.. but thanks everyone
20:07 Morlo left
viki :( 20:07
20:08 acrussell_ left 20:09 hankache left 20:16 acrussell_ joined 20:17 bjz joined 20:21 stux|RC-only left 20:24 stux|RC-only joined 20:33 zrr left 20:34 Raimondi left, kurahaupo__ joined 20:43 TEttinger joined 20:55 canopus left, canopus joined 20:56 perlawhirl joined 21:04 perlawhirl left
dalek line-Perl5: 7080307 | niner++ | p5helper.c:
Fix segfaults when an interpreter is used by multiple threads
21:09
line-Perl5: de92484 | niner++ | META.info:
Version 0.22
21:09 firstdayonthejob joined
nine As much as I hate the stress of preparing a talk, it usually leads to great advances of the code... 21:10
21:11 bjz left
DrForr Conferene driven development at its finest. 21:14
At least you're not doing a 2-hour workshop.
21:20 ufobat left
moritz is doing a 2-day workshop :( 21:21
tailgate the fun kind?
moritz not at a conferece, but still way too much work preparing
tailgate: we'll see :-) 21:22
stmuk_ p6doc hasn't suggested "-f push" for a long time 21:23
oh sorry it does :) 21:24
21:24 telex left 21:26 telex joined 21:30 andrzejku left 21:35 skids left
dalek c: 607db24 | (Steve Mynott)++ | bin/p6doc:
better -f examples
21:36
21:48 avalenn left 21:49 avalenn joined 21:51 stux|RC-only left 21:52 stux|RC-only joined 21:55 espadrine joined 21:59 acrussell_ left 22:00 Tonik left 22:03 zakharyas joined, bjz joined 22:04 r3m joined 22:09 eisen74 left 22:10 mtj_ joined, cibs left 22:12 cibs joined 22:13 bjz left 22:17 FROGGS left 22:24 labster joined 22:25 mtj_ left 22:34 mtj_ joined 22:35 sufrostico left 22:36 stux|RC-only left 22:37 stux|RC-only joined 22:39 trnh joined, trnh left, trnh joined 22:42 rindolf left 22:43 cdg_ left 22:45 RabidGravy left
stmuk_ old but some gems 22:50
www.humblebundle.com/books/unix-book-bundle 22:51
22:51 zakharyas left 22:53 ZzZombo_ joined 22:54 ZzZombo left
timotimo interesting 22:58
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
m: role R { submethod BUILD { say "R.build"; } }; class C does R { submethod BUILD { say "C.build" } }; C.new
camelia rakudo-moar f928a2: OUTPUT«C.build␤»
timotimo it's true, submethods from roles will not "make it" in 23:01
as you're basically supplying an authoritative BUILD or TWEAK to use
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.
timotimo since roles get "flattened" into the class, there's no extra space they can go into to be separate
PerlJam I guess my brain was conflating inheritance and composition for a minute
23:02 breinbaas left
timotimo perhaps 23:03
we've had annoyances about the inability to provide BUILD (before TWEAK existed) in roles that get miexd into something
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
that is a common want 23:06
you can surely do something similar self.roles>>.TWEAK(self) i suppose
PerlJam yeah.
timotimo well, .TWEAK(self: |c)
PerlJam I didn't want to do it *manually* though :)
timotimo of course 23:07
PerlJam Does the COMPOSE phaser exist yet? That could do what I want I think 23:08
23:09 kurahaupo__ left
timotimo probably not 23:11
23:11 sufrostico joined
timotimo i mean 23:11
probably doesn't do what you want
the mainline of a role is basically equivalent to what COMPOSE is supposed to do 23:12
23:14 perlawhirl joined
perlawhirl timotimo: how do modules get added to zef page? do you need to manually add? 23:15
viki What zef page?
Ah, modules.zef.pm
perlawhirl oops... msg'd wrong person 23:16
timotimo i wasn't aware it was different from modules.perl6.org
perlawhirl heh... you an tony both start with a 't'
yeah there is... i don't know if anyone uses it
but it looks nice :D
timotimo no i mean
perlawhirl .seen tony-o
yoleaux I saw tony-o 21 Nov 2016 22:54Z in #perl6: <tony-o> ::NA
timotimo i wasn't aware the process of getting a module there is different
perlawhirl i would assume he would just check the ecosystem for commits on the regular. 23:17
but i'm not sure
23:18 sufrostico left
dudz perlawhirl: I'd like to be mentored please, Living in Sydney/Australia 23:29
23:35 BenGoldberg joined
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:36
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␤␤»
tailgate what does $*W mean in nqp?
MasterDuke it's the World 23:41
tailgate and evreything in it?
MasterDuke github.com/perl6/nqp/blob/master/s.../World.nqp 23:42
a bunch of other places in the code have $*W as an instance of World 23:43
and github.com/perl6/nqp/blob/master/s.../World.nqp 23:48
23:50 firstdayonthejob left 23:52 sufrostico joined 23:54 perlawhirl left, perlawhirl joined