»ö« 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.
elaADnlxie m: class Foo { has $.a; has $.b }; my $x = ‘hello’ but Foo.new(:25a, :35b); say $x 00:07
camelia hello
elaADnlxie how do I check if Foo is mixed in?
~~ Foo doesn't work
00:07 wamba left
elaADnlxie and it kinda makes sense, because it ends up being some anonymous thingy 00:07
BenGoldberg m: class Foo { has $.a; has $.b }; my $x = ‘hello’ but Foo.new(:25a, :35b); say $x.WHAT
camelia (Str+{<anon|32065072>})
BenGoldberg m: role Foo { has $.a; has $.b }; my $x = ‘hello’ but Foo.new(:25a, :35b); say $x.WHAT 00:08
camelia (Str+{<anon|44463664>})
BenGoldberg m: role Foo { has $.a; has $.b }; my $x = ‘hello’ but Foo.new(:25a, :35b); say $x ~~ Foo
camelia False
elaADnlxie I guess I can do something like this 00:09
m: class Foo { has $.a; has $.b }; my $x = ‘hello’ but Foo.new(:25a, :35b); say so $x.?Foo
camelia True
elaADnlxie but I prefer this form
m: class Foo { has $.a; has $.b }; my $x = ‘hello’ but Foo.new(:25a, :35b); say so Foo($x)
camelia True
elaADnlxie oh, it works!
no, not really, it's going to throw
m: class Foo { has $.a; has $.b }; my $x = ‘hello’ but Foo.new(:25a, :35b); say so Foo(42)
camelia Cannot find method 'Foo' on object of type Int
in block <unit> at <tmp> line 1
elaADnlxie yup
m: class Foo { has $.a; has $.b }; my $x = ‘hello’ but Foo.new(:25a, :35b); say so try Foo(42) 00:10
camelia False
elaADnlxie m: class Foo { has $.a; has $.b }; my $x = ‘hello’ but Foo.new(:25a, :35b); say so try Foo($x)
camelia True
elaADnlxie fine.
00:13 ufobat left 00:14 llfourn joined 00:17 rindolf left 00:18 perlawhirl left 00:33 go|dfish left 00:35 go|dfish joined 00:38 cdg left 01:01 astj joined 01:03 astj left, vike left 01:04 astj joined 01:05 Actualeyes joined 01:13 aborazmeh joined, aborazmeh left, aborazmeh joined 01:18 espadrine left
ZzZombo MasterDuke, what code? I don't recall any, so whatever, ignore it. 01:20
01:21 lukaramu_ left
ZzZombo So, there are my gripes with how operators are done: 01:29
sub or not to sub: all of them are implemented as subs, and you can't provide a method handler for an operator w/o a new proto;
Subs Can't Into Self, or You Lose Access To Private Attributes and Methods. And yea, MOP is a thing, but you can't argue that's a dirty workaround;
new proto: you lose access to all previously defined operators under that name, so you can't, say, %h<a b c> anymore in your code if you redefine post <{ }>;
also, if you do stick to subs: subs defined in a class can't be seen by outside users of the module for whatever stupid reason; can't export more than one by placing them outside a class because they would share one name.
01:30 risou_awy is now known as risou
elaADnlxie ZzZombo: wait, what were you trying to do exactly? 01:39
ZzZombo Oh, yea, forgot one point: you can't pass new named arguments into AT-KEY because the default operator <{}> will complain about unknown parameters. 01:40
I wanted to handle AT-KEY differently with some switches passed into it. 01:41
MasterDuke ZzZombo: i think it was tbrowder who had a good blog post about exporting, let me see if i can find it 01:43
ZzZombo: blogs.perl.org/users/tom_browdef/20...erl-6.html 01:44
01:52 vike joined 01:56 kyan joined, BenGoldberg left
ZzZombo m: package A { multi x is export { say 'x' };multi x(2) is export { say 'x-2' } };say A::EXPORT::ALL::.keys,A::<&x>,A::<&x>(2) 01:57
camelia Cannot find method 'Any' on object of type Int
in block <unit> at <tmp> line 1
ZzZombo m: package A { multi x is export { say 'x' };multi x(2) is export { say 'x-2' } };say A::EXPORT::ALL::.keys,&A::x,&A::x(2) 01:58
camelia Cannot find method 'Any' on object of type Int
in block <unit> at <tmp> line 1
02:00 kyan left 02:10 kyan joined 02:25 k-man left 02:27 k-man joined 02:37 llfourn left
lucs Do I need a 「constant k = 42;」 for each constant I declare, or is there some shortcut like Perl 5's 「use constant x => 42, y => 66, ...」? 02:37
02:38 llfourn joined 02:46 ilbot3 left 02:47 ilbot3 joined, ChanServ sets mode: +v ilbot3
lucs Is 「goto LABEL; ⋯ LABEL: ⋯」 supposed to work? 02:50
Sheesh, is everyone watching the Oscars? :-) 02:51
MasterDuke lucs: i don't think goto is implemented. but other flow control is, e.g., `next LABEL` 02:54
lucs Oh, hmm... I'll try that. 02:55
Yeah, I kind of expected it to fail (it did) if the label came later than the 'next'. 02:56
02:59 xtreak joined 03:03 perlawhirl joined, aborazmeh left 03:22 noganex joined
elaADnlxie m: my (\x, \y, \z) = 5, 15, 32; say y + z 03:24
camelia 47
elaADnlxie what's the difference between constants and sigilles variables?
03:26 noganex_ left
lucs elaADnlxie: Did you fall down the stairs? 03:34
elaADnlxie at some point, perhaps
lucs It appears to have broken your nick.
elaADnlxie oh that… it will take some time to heal I guess 03:35
lucs :)
elaADnlxie lucs: I'm thinking, if you have so many constants, maybe you want a hash intsead? Or maybe an Enum? 03:36
lucs Oh, an enum sounds good (looking it up in the docs). 03:37
samcv elaADnlxie, sigilless does := whenever you do = and doesn't have a scalar container 03:39
elaADnlxie m: constant \x := 50; say x 03:40
camelia 50
elaADnlxie :S
03:56 risou is now known as risou_awy 04:00 statisfiable6 left
geekosaur that doesn't look like falling down stairs so much as transporter accident >.> 04:01
lucs :) 04:17
elaADnlxie m: my regex abc { ‘aaa’ }; my regex xyz { <abc> }; say ‘aaa’ ~~ /<xyz>/ 04:25
camelia 「aaa」
xyz => 「aaa」
abc => 「aaa」
elaADnlxie m: my regex abc { ‘aaa’ }; my regex xyz { <.abc> }; say ‘aaa’ ~~ /<xyz>/
camelia No such method 'abc' for invocant of type 'Cursor'
in regex xyz at <tmp> line 1
in block <unit> at <tmp> line 1
elaADnlxie shouldn't the dot simply mean that no capture is needed?
04:28 xtreak left 04:29 risou_awy is now known as risou 04:31 xtreak joined 04:38 vike left 04:46 risou is now known as risou_awy 04:49 jraglin joined 04:50 Cabanoss- joined, risou_awy is now known as risou
lucs How do I do this?: my ($first, 「don't care about this one」, $third) = func-that-returns-three-values; 04:51
geekosaur my ($first, $, $third) = ... 04:52
lucs Ah, thanks.
What keywords should I look up in the docs for an explanation of this? 04:53
(What's 「$」?)
04:54 Cabanossi left, Cabanoss- is now known as Cabanossi
geekosaur technically it's an anonymous state variable. here it does nothing except silently consume a parameter 04:55
(since it's only accessible by its position in the code, and here it can only be assigned to)
04:56 statisfiable6 joined, ChanServ sets mode: +v statisfiable6, statisfiable6 left 04:59 jraglin left
lucs geekosaur: Cool, found it in the Variables doc, thanks. 05:00
05:01 astj_ joined, astj left 05:03 itcharlie1 left 05:05 vike joined 05:09 jraglin joined, khw left
tony-o Any also works 05:10
m: sub x() { return 1, 2, 3; }; my ($x, Any, $y) = (x); "x=$x, y=$y".say; 05:11
camelia x=1, y=3
lucs Aha, noted, thanks. 05:13
tony-o m: my (Any) = sub { return 1; }; 05:19
camelia ( no output )
tony-o that's what all of my modules do 05:20
just exports an anonymous Any
05:21 wamba joined
lucs tony-o: Is this something I should try to understand? Just looks kinda weird to me :/ 05:26
In the meanwhile...: 05:27
What's the difference between these that makes the first one work, but the second one fail?
m: my ($x, $y) = | ( '12' ~~ / (\d) (\d) / ); print "$x - $y"
camelia 1 - 2
lucs m: sub foo { return | ( '12' ~~ / (\d) (\d) / ) }; my ($x, $y) = foo; print "$x - $y"
camelia Unexpected named argument '' passed
in sub foo at <tmp> line 1
in block <unit> at <tmp> line 1
tony-o lucs: it's just shorthand for what you asked above, it's an anonymous sub returning and assigning to an Any 05:29
well, assining the first of the return values
05:30 CIAvash joined
lucs Oh, I see, okay. 05:30
tony-o that looks like a bug, tho it works with an explicit array in the sub 05:32
m: sub foo { return |@( '12' ~~ / (\d) (\d) / ) }; my ($x, $y) = foo; print "$x - $y"; 05:33
camelia 1 - 2
lucs m: sub foo { return @( '12' ~~ / (\d) (\d) / ) }; my ($x, $y) = foo; print "$x - $y"
camelia 1 - 2
lucs Slip unnecessary it appears.
tony-o yea
only because you have an explicit array 05:34
m: sub foo { return ( '12' ~~ / (\d) (\d) / ) }; my ($x, $y) = foo; print "$x - $y";
camelia Use of uninitialized value $y 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
12 -
lucs Yep.
05:36 skids left
ZzZombo m: use MONKEY-TYPING;augment package GLOBAL { multi sub postcircumfix:<{ }>(Str:D \S: Whatever) { say 'D: '; S} };say 'Str!!!'{*} 05:36
camelia ===SORRY!===
Cannot declare pseudo-package GLOBAL
ZzZombo but I'm not declaring that!
tony-o lol 05:37
ZzZombo Also why does docs.perl6.org/syntax/augment come from variables? Better place would be syntax. 05:38
05:39 llfourn left 05:40 mcmillhj joined 05:41 faraco joined
faraco howdy 05:41
05:46 elaADnlxie left 06:08 bwisti left 06:14 eroux left 06:18 mcmillhj left 06:33 ggoebel left 06:34 llfourn joined 06:39 jraglin left, llfourn left 06:40 wamba left 06:43 xtreak left 06:47 xtreak joined 06:48 darutoko joined, ggoebel joined 06:51 cibs left 06:52 jraglin joined, RabidGravy joined 06:56 gdonald_ left, gdonald_ joined 06:57 nine_ is now known as nine 06:59 cibs joined 07:03 ZzZombo left, ufobat joined 07:07 jraglin left 07:09 jraglin joined 07:10 ZzZombo joined, ZzZombo left, ZzZombo joined 07:14 xtreak left, wamba joined 07:15 perlawhirl left 07:16 xtreak joined 07:33 llfourn joined 07:36 jraglin_ joined
moritz good morning 07:37
07:39 bjz joined, jraglin left
samcv morning 07:39
07:40 mcmillhj joined
moritz here in the underground train, we have good LTE reception; but as soon as it goes above ground, connectivity drops 07:41
weird stuff
samcv less phones attached prolly
jast I tend to have better connectivity in underground trains than at home
samcv and less distance
moritz samcv: sounds sensible 07:42
jast: I live 200m from the next mobile antenna mast thingy, so hard to beat connectivity at home :-)
07:45 mcmillhj left
jast the next one here is ~500-600m away but my phone likes picking base stations on the other side of the globe 07:45
07:46 mr-foobar left 07:47 mcmillhj joined 07:53 abraxxa joined
ufobat morning :) 07:54
07:55 mcmillhj left
moritz \o ufobat 07:55
ufobat :D 07:59
ZzZombo hmm, how can I predeclare a class?
I have two classes mutually depending on each other. 08:00
moritz yess
class A { ... }; class B { has A $.x }; class A is B { }
with literal ...
ZzZombo huh 08:01
I tried class {*}
and it didn't work
dat consistency!
moritz {*} means "re-dispatch"
... means "I haven't made up my mind yet"
m: sub f { ... }; f() 08:02
camelia Stub code executed
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
08:03 mcmillhj joined
ufobat moritz, i think in your example both classes must be within one file? 08:06
moritz ufobat: yes
TimToady m: need Test; say MY::.keys 08:08
camelia ($=pod $_ $/ !UNIT_MARKER $=finish EXPORT $! ::?PACKAGE GLOBALish Test $¢ $?PACKAGE)
TimToady you can declare a name with 'need', if that helps, and in theory it should not need it compiled yet
ZzZombo m: my multi postcircumfix:<{ }> x(\SELF:){dd SELF}
camelia ===SORRY!===
Cannot call method '!cursor_init' on a null object
ZzZombo m: my multi x(\SELF:){dd SELF}
camelia 5===SORRY!5=== Error while compiling <tmp>
Can only use the : invocant marker in the signature for a method
at <tmp>:1
------> 3my multi x(\SELF:7⏏5){dd SELF}
ZzZombo m: my multi x(\SELF){dd SELF}
camelia ( no output )
ZzZombo m: my multi postcircumfix:<{ }> x(\SELF){dd SELF}
camelia ===SORRY!===
Cannot call method '!cursor_init' on a null object
ZzZombo oh gosh 08:09
08:11 mcmillhj left
TimToady a postcircumfix needs two args 08:11
ZzZombo m: my multi postcircumfix:<{ }> x(\SELF,*@_){dd SELF,@_}
camelia ===SORRY!===
Cannot call method '!cursor_init' on a null object
TimToady but, yeah... 08:12
ZzZombo m: my multi postcircumfix:<{ }> x(\SELF,$a){dd SELF,$a}
camelia ===SORRY!===
Cannot call method '!cursor_init' on a null object
TimToady likely a bug
ZzZombo also why does 'operator' doesn't link to a page where we are told how to define them in the docs search? 08:13
instead we get a metric ton of defferent operators in the language. 08:14
TimToady we do both of those things to discourage people from defining their own operators :)
08:15 _sfiguser joined
_sfiguser hello all, somebody could give me some infos about the future of perl 5 with respect to perl 6 ? i mean... i know they are different languages such as C and C++, but is the focus mainly on perl 6 and perl5 is destined to die or what ? 08:15
08:15 kyan left
TimToady some people focuse on Perl 5, while others focus on Perl 6. That is all. 08:15
ZzZombo m: my postcircumfix:<{ }> x(\SELF,$a){dd SELF,$a} 08:16
camelia 5===SORRY!5===
Type 'postcircumfix:<{ }>' is not declared
at <tmp>:1
------> 3my postcircumfix:<{ }>7⏏5 x(\SELF,$a){dd SELF,$a}
Malformed my
at <tmp>:1
------> 3my postcircumfix:<{ 7⏏5}> x(\SELF,$a){dd SELF,$a}
ZzZombo what
ah 08:17
m: my sub postcircumfix:<{ }> x(\SELF,$a){dd SELF,$a}
camelia ===SORRY!===
Cannot call method '!cursor_init' on a null object
TimToady there is no plan to end-of-life Perl 5, just as there was never any plan to end-of-life Perl 4, or 3, or 2, or 1
08:18 xinming joined
moritz and Perl 5 has a very active (and growing) developer community 08:19
08:20 rindolf joined, xinming_ left
TimToady ZzZombo: you have a spurious x in that expression 08:21
ZzZombo how is that?
TimToady m: my multi postcircumfix:<{ }> (\SELF,$a){dd SELF,$a}
camelia ( no output )
ZzZombo yea, great, now it can't be referred to, can it? 08:22
m: multi postcircumfix:<{ }>(\SELF,$a){dd SELF,$a}
camelia ( no output )
TimToady postcircumfix:<{ }> is the name of the function; you can't individually name candidates
you distinguish candidates by type of arguments, not by names 08:23
m: my multi postcircumfix:<{ }> (Int \SELF,$a){dd SELF,$a}; 42{43}
camelia 42
Int $a = 43
ZzZombo the thing is that I have to export that from my class of my module, so that associative indexing will work correctly for it.
08:24 xtreak left
ZzZombo but it just doesn't work, IOninja had a workaround but I felt like that's just a dirty hack, but seems I at loss here, and will have to use that instead, as the language is extremely uncooperative here. 08:25
TimToady and just adding 'is export' doesn't do it? hmm
ZzZombo yes 08:26
moritz ZzZombo: have you tried overriding AT_KEY and friends?
ZzZombo m: say CORE::<&infix:<eqv>>
camelia sub infix:<eqv> ($?, $?) { #`(Sub+{<anon|71760208>}+{Precedence}|27563648) ... }
moritz or AT-KEY, or whatever they're called these days :-)
08:26 xtreak joined
ZzZombo moritz: I did, but as I've said multiple times already, they won't get any additional params that I need, so I have to provide a custom postc <{ }> 08:27
08:27 ufobat left
TimToady if 'is export' doesn't work, I'd call it a bug 08:28
08:29 bjz left
ZzZombo m: say CORE::<&postcircumfix:<{ }>> 08:30
camelia Value of type List uselessly passed to val()
in block <unit> at <tmp> line 1
(Nil Nil)
_sfiguser which are the current applications of perl 6 ? where is it used ?
ZzZombo m: say CORE::<&infix:<eqv>>
camelia sub infix:<eqv> ($?, $?) { #`(Sub+{<anon|71760208>}+{Precedence}|46945920) ... }
ZzZombo WTF
moritz _sfiguser: most production uses I know of involve some fair amount of text precessing/parsing 08:31
ZzZombo m: dd CORE::<&postcircumfix:<{ }>>
camelia Value of type List uselessly passed to val()
in block <unit> at <tmp> line 1
(Nil, Nil)
TimToady m: say &postcircumfix:<{ }> 08:32
camelia sub postcircumfix:<{ }> (| is raw) { #`(Sub+{<anon|71760480>}+{Precedence}+{<anon|71760480>}|40297920) ... }
ZzZombo but why?.. 08:33
is it not in CORE, by chance?
TimToady because you used qw syntax
08:34 zakharyas joined
TimToady m: say CORE::{'&postcircumfix:<{ }>'" 08:34
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say CORE::{'&postcircumfix:<{ }>'7⏏5"
expecting any of:
infix
infix stopper
statement end
statement modifier…
moritz m: say CORE::{'&postcircumfix:<{ }>'}
camelia sub postcircumfix:<{ }> (| is raw) { #`(Sub+{<anon|71760480>}+{Precedence}+{<anon|71760480>}|55539184) ... }
TimToady yeah, that
iow, CORE::<foo bar> is a list of two words 08:35
and you have a space in the middle of the operator name, so that doesn't work
<> subscripts are really only for simple strings like identifiers, so they slice rather than join(' ') 08:36
ZzZombo yea, I get it. 08:37
08:37 bjz joined 08:41 mcmillhj joined 08:42 ufobat joined 08:43 xtreak left, jraglin_ left 08:44 pyrimidi_ joined, pyrimidine left 08:46 mcmillhj left 08:47 wamba left 08:56 ChoHag joined 09:01 bjz left 09:03 jonas1 joined 09:07 bjz joined 09:08 domidumont joined 09:12 xtreak joined 09:32 wamba joined 09:43 astj_ left, astj joined 09:48 astj left 09:58 xinming left 09:59 xinming joined 10:01 astj joined 10:02 robertle joined 10:03 mcmillhj joined 10:06 astj left 10:07 grumble left 10:08 mcmillhj left, grumble joined 10:09 mxco86 left 10:12 mxco86 joined 10:17 astj joined 10:22 TEttinger left, smash_ is now known as smash 10:25 breinbaas left 10:28 eroux joined, breinbaas joined 10:34 astj left 10:35 astj joined 10:37 astj left, astj joined, faraco left 10:41 ChoHag left 10:42 xtreak left 10:44 xtreak joined 10:45 parv joined 10:50 wamba left, koki1 joined 10:53 chansen_ left, TeamBlast left, chansen_ joined 10:58 k-man left 11:00 k-man joined 11:06 mcmillhj joined 11:10 wamba joined, mcmillhj left 11:12 _sfiguser left
ZzZombo <TimToady> if 'is export' doesn't work, I'd call it a bug 11:17
I've had a peek in the code and have been extensively reading the docs, so I dunno how much of a bug this is rather than a logical consequence of how things are done in P6.
When you define a new multi for an existing operator, it defines a lexical (my) sub in the scope. 11:18
When you invoke it, it gets called if possible, that's, the signatures match. 11:19
But if not, the dispatch checks the other multies, since they were already declared.
11:20 xtreak left
ZzZombo Now, when you import a module that exports an operator defined in such way, it doesn't get exported because there is already something under that name. 11:23
Coming from CORE, in this case. 11:24
11:24 ufobat left
ZzZombo m: package A { sub say is export { put 'said'}};import A;say; 11:24
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun
at <tmp>:1
--…
ZzZombo IDK, seems like this is what happens. 11:25
11:25 _sfiguser joined
ZzZombo So ultimately, doesn't seem like you can legitimately export an operator yet. 11:25
11:27 lucasb joined
lucasb m: my %h1 = :a, :b; %h1 = %h1; say %h1 11:29
camelia {}
lucasb I just saw this ticket RT #130870 and was surprised
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130870
lucasb is this really correct? 11:30
%h1 = |%h1 works ok
%h1 = %h2 works ok
that's why I would expect %h1 = %h1 to also work :)
11:31 risou is now known as risou_awy
lucasb If you do "@a = @a", you get the expected behavior. why with hashes it would be different? 11:34
11:34 parv left 11:35 risou_awy is now known as risou 11:42 mr-foobar joined 11:47 salva left
ZzZombo m: package A { our sub say is export { put 'said'}};import A;say; 11:50
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun
at <tmp>:1
--…
11:53 domidumont left 11:55 domidumont joined 11:56 sufrostico joined
lizmat ZzZombo: the error comes from deep in the parsing, before any checks are done 11:58
12:01 brillenfux joined 12:02 cibs left 12:04 cibs joined 12:05 aborazmeh joined, aborazmeh left, aborazmeh joined, mscha joined, brillenfux left 12:06 mxco86 left
mscha m: my @arr = (|(1,3...20), |(2,4...20).map(~*)); for ^20 { @arr .= sort; say @arr } # Pretty! 12:06
camelia [1 10 12 14 16 18 20 3 5 7 9 11 13 15 17 19 2 4 6 8]
[1 10 12 14 16 18 2 20 3 4 5 6 7 8 9 11 13 15 17 19]
[1 10 12 13 14 15 16 17 18 19 2 20 3 4 5 6 7 8 9 11]
[1 10 12 7 13 14 15 16 17 18 3 19 2 20 4 5 6 8 9 11]
[1 10 12 2 20 3 6 7 13 14 15 16 17…
12:06 risou is now known as risou_awy
mscha Looks better in a terminal. 12:06
(I know why it's happening. cmp between numbers and strings.) 12:07
12:07 risou_awy is now known as risou 12:08 risou is now known as risou_awy
mscha m: my @arr = (1..20).map({ $_ %% 2 ?? +$_ !! ~$_ }); for ^20 { @arr .= sort; say @arr } # This one takes even longer to stabilize 12:08
camelia [1 17 2 10 11 12 13 14 15 16 18 19 20 3 4 5 6 7 8 9]
[1 11 6 12 13 14 15 17 2 4 10 16 18 19 20 3 5 7 8 9]
[1 11 13 2 4 5 6 10 12 14 15 16 17 18 19 20 3 7 8 9]
[1 11 12 13 2 3 4 14 15 16 17 18 19 20 5 6 10 7 8 9]
[1 11 15 2 8 10 12 13 16 17 18 19 …
12:19 risou_awy is now known as risou 12:29 CIAvash left 12:30 mcmillhj joined 12:32 Khisanth left 12:33 salva joined 12:34 mcmillhj left 12:37 risou is now known as risou_awy, mcmillhj joined 12:39 Exodist left 12:40 Exodist joined 12:42 mcmillhj left, shadowpaste0 is now known as shadowpaste 12:44 mcmillhj joined 12:45 xfix left, Khisanth joined
tbrowder .tell Zoffix the problem i'm experiencing with shell and run not capturing output still exists with latest rakudo. doing some more testing before presenting results and asking for more help... 12:45
Zoffix You'd find the issue a lot faster if you showed the actual code you're running. 12:46
Full code someone else can run to reproduce the issue, not bits and snippets.
12:47 shadowpaste0 joined
tbrowder I will show code later today after some more testing to try to ensure no user errors. 12:47
12:49 lukaramu joined, astj left 12:51 domidumont left 12:52 mcmillhj left
lizmat www.reddit.com/r/perl/comments/5we...d_behavior # some behaviours are fixed in Perl 6 :-) 12:53
12:53 domidumont joined 12:54 mcmillhj joined, xfix joined 12:55 wamba left
Zoffix "Recently, Perl 6 happened. I suddenly felt a crisis -- what if Perl 5 eventually reduce to dust?" 12:56
ZzZombo what is nqp::getstaticcode for?
Zoffix If Perl 6 can match Perl 5's speed, I feel ^ that's inevitable.
timotimo gives you the code object without closures or anything attached, i think
DrForr ITYM "When Perl 6..." :) 12:57
tbrowder in
disregard...
timotimo huh, perl5 allows you to use version strings for ip addresses? 12:58
Zoffix DrForr: not really. I've seen no evidence to suggest that as guarantee and have no suitable skills to be able to ascertain that on my own.
DrForr I'm trying to be positive about it, though it does get harder as time goes on. 12:59
ZzZombo Github search as always on point 13:01
tbrowder can a Proc::Async object act like a daemon if it has some kind of infinite loop?
ZzZombo asks for Perl6 language
ZzZombo gets Java results
So, since that failed, where does "Cannot iterate object with MVMCode representation" come from?
13:01 wamba joined
Zoffix DrForr: that sounds like being blindly positive is unhealthy :P 13:03
13:04 mcmillhj left
Zoffix In fact, the best approach would be to accept the current speed is the best Perl 6 can be. Then each time there's a boost, you're pleasantly surprised :P 13:04
DrForr looks forward to 45-minute test suite runs for the foreseeable future, then. 13:05
Zoffix DrForr: which test suite?
moritz do it parallel, in the cloud!
tbrowder i should have asked is a Proc::Async object somewhat like starting a process using nohup? 13:06
moritz tbrowder: I don't think so
DrForr Well, it's actually back down to ~1 minute, but once I've added a full corpus test, it'll probably be about an hour. Though by that point I'll likely just give up and do a single "christmas tree" test.
Zoffix :) 13:08
13:09 mcmillhj joined
tbrowder what i would like to do is start a process (say process A) which could be used to indepently test for its existence with a shell command and then kill the original process A after the test. Is that something that could be done with a Proc::Async object? 13:10
'independently' 13:11
13:11 risou_awy is now known as risou 13:14 mcmillhj left 13:17 mcmillhj joined
ZzZombo Wait, where does VMArray live in? I see only NPQArray. 13:18
timotimo VMArray is a repr, it lives in MoarVM's codebase
ZzZombo How can I iterate over it? 13:19
jnthn How did you get it?
That sounds like some internals got leaked 13:20
ZzZombo nah use nqp
jnthn Oh
timotimo your internals are now leaking over the program :D
jnthn Well, can use nqp::elems and then a loop 13:21
and nqp::atpos to index in to it
Alternatively, feed to nqp::hllize(...) and it'll be wrapped up in a Perl 6 List object
ZzZombo hah, I just indexed into it.
but it failed to wok with for, so I thought it doesn't support that. 13:22
work*
jnthn Yeah, you need to hllize it to use it with Perl 6's for
13:22 mcmillhj left
ZzZombo hum... 13:23
13:25 mcmillhj joined
ZzZombo so, I wrote totally-not-a-hack to push my multi candidate first into @!dispatchees so that it would get tried first, but for some reason it breaks with "Unhandled exception: Cannot iterate object with MVMCode representation (BOOTCode) 13:25
at gen/moar/BOOTSTRAP.nqp:1967 (C:\rakudo/share/nqp/lib/Perl6/BOOTSTRAP.moarvm:)", but unshifting an already present candidate works.
What's the difference?
13:28 risou is now known as risou_awy 13:29 aborazmeh left, mcmillhj left
timotimo so ... if i want to implement a TLS socket kind of thing for something written in C++ ... which library should i go for? 13:30
13:31 bjz left 13:32 lukaramu_ joined, xinming left 13:33 xinming joined 13:34 smls joined
smls bisectable6: say (1..3).map: { (*.[* - $_])(<a b c>) }; 13:34
bisectable6 smls, On both starting points (old=2015.12 new=8301a30) the exit code is 0 and the output is identical as well
smls, Output on both points: (c c c)
13:36 lukaramu left
smls Can bisectable go further back? 13:42
Zoffix no, but you can eval on earlier releases
c: all say (1..3).map: { (*.[* - $_])(<a b c>) };
13:43 cibs left
committable6 Zoffix, gist.github.com/3ccc9613317d5d5241...31e8e525bb 13:43
Zoffix So it's been that way since before 2014.01
m: for ^3 { say (*.[* - $_])(<a b c>) } 13:44
camelia Nil
Nil
Nil
13:44 cibs joined
smls OK, thanks 13:45
Zoffix m: for (1..3) -> $i { say (*.[{$_ - $i}])(<a b c>) }
camelia c
b
a
[Coke] Someone who likes atom for perl 6 should respond to the "Your thoughts on Padre?" thread on perl6-users. 13:48
yoleaux 26 Feb 2017 23:03Z <Zoffix> [Coke]: my February report for IO grant is at blogs.perl.org/users/zoffix_znet/20...-2017.html
[Coke] Zoffix++ # will report that to the committee today. 13:49
Zoffix \o/
13:49 bjz joined
[Coke] .seen froggs 13:55
yoleaux I saw FROGGS 17 Jan 2017 21:11Z in #perl6: <FROGGS> dataf3l: to this: hg.dyncall.org/pub/dyncall/dyncall/...allf.c#l91
13:55 SmokeMachine left, SmokeMachine joined
[Coke] wonder if it would be helpful to other people to have a less prominent style for bots (and bot requests) on the irclog 13:58
13:59 lizmat left, mcmillhj joined
lucasb sorry, didn't understand. what do you mean by less prominent style? 13:59
14:02 cibs left
[Coke] lighter font color? italic? smaller font? 14:02
so when I'm reviewing, and someone has gone off on a 30m "talk to the bot" chat, it is easier to skip. 14:03
14:04 cibs joined
lucasb ah, ok. you meant in the generated html/css in irclog 14:04
[Coke] Yes.
lucasb A feature like having all the nicks that said something in a given day in the top of the page, then you could click them to toggle show/hide their messages would be interesting. 14:07
14:07 skids joined
lucasb for example, at the top of the page pkgs.racket-lang.org/ , there's a list of tags that work like that, so you can filter the relevant entries. but I guess nobody touches irclog code anymore 14:08
[Coke] "is 6.d still planned to hatch in summer?" as far as I know that was never a plan. 14:10
(from gfldex at irclog.perlgeek.de/perl6-dev/2017-...141700240) 14:11
crap, ww
was reviewing both channels same time. :) 14:12
Geth doc: 8753464532 | (Will "Coke" Coleda)++ | doc/Language/typesystem.pod6
slight pref. to amer-english
14:21
14:22 bwisti joined 14:29 pyrimidi_ left, pyrimidine joined 14:31 elaADnlxie joined, jonas1 left 14:36 sena_kun joined, bjz left 14:37 lucasb left 14:45 lichtkind_ joined 14:47 elaADnlxie left, elaADnlxie joined 14:48 lichtkind__ left 14:53 wamba left 14:55 Ven joined 15:00 cdg joined, mscha left 15:02 lizmat joined 15:08 DarthGandalf left, DarthGandalf joined
ZzZombo .seen ioninja 15:13
yoleaux I saw IOninja 26 Feb 2017 18:52Z in #perl6: <IOninja> m: sub foo { bar }; sub bar { say "You called me from {callframe(2).code.name}" }; foo
Zoffix What'd you want? 15:14
ZzZombo well, the .add_dispatchee workaround for exporting operators from a class/module doesn't seem to work.
Zoffix Worked for me. 15:15
15:17 imcsk8_ left, imcsk8 joined
ZzZombo m: class A{ multi postcircumfix:<{ }>(Str:D $s,Int:D $_){ $s.substr($_) };CORE::{'&postcircumfix:<{ }>'}.add_dispatchee(::{'&postcircumfix:<{ }>'}) };import A;say '123-10'{3} 15:18
camelia Type Str does not support associative indexing.
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
ZzZombo m: class A{ multi postcircumfix:<{ }>(Str:D $s,Int:D $_) is export{ $s.substr($_) };CORE::{'&postcircumfix:<{ }>'}.add_dispatchee(::{'&postcircumfix:<{ }>'}) };import A;say '123-10'{3}
camelia 5===SORRY!5=== Error while compiling <tmp>
A unit-scoped sub definition is not allowed except on a MAIN sub;
Please use the block form.
at <tmp>:1
------> 3$s,Int:D $_) is export{ $s.substr($_) };7⏏5CORE::{'&postcircumfix:<{ }>'}.add_dis…
15:18 risou_awy is now known as risou
Zoffix m: multi postcircumfix:<{ }>(Str:D $s,Int:D $_) {say "here"}; 'x'{42} 15:19
camelia here
ZzZombo m: class A{ multi postcircumfix:<{ }>(Str:D $s,Int:D $_) is export { $s.substr($_) }; CORE::{'&postcircumfix:<{ }>'}.add_dispatchee(::{'&postcircumfix:<{ }>'}) };import A;say '123-10'{3}
camelia -10
Zoffix Seems to work fine?
ZzZombo what, where?
Zoffix m: class A{ CORE::{'&postcircumfix:<{ }>'}.add_dispatchee: my multi postcircumfix:<{ }>(Str:D $s,Int:D $_) { $s.substr($_) } }; say '123-10'{3} 15:21
camelia -10
ZzZombo why does not work the other way around though? 15:23
Zoffix Because you're adding the wrong thing. 15:25
m: class A{ multi postcircumfix:<{ }>(Str:D $s,Int:D $_){}; ::{'&postcircumfix:<{ }>'}.candidates.say }
camelia (sub postcircumfix:<{ }> (\SELF, \key) { #`(Sub|34589008) ... } sub postcircumfix:<{ }> (\SELF, \key, Mu \ASSIGN) { #`(Sub|34585056) ... } sub postcircumfix:<{ }> (\SELF, \key, Mu :$BIND! is raw) { #`(Sub|34587944) ... } sub postcircumfix:<{ }> (\SELF, \…
ZzZombo what am I supposed to be looking at? 15:27
15:27 mattr__ joined
Zoffix m: class A{ constant $s = multi postcircumfix:<{ }>(Str:D $s,Int:D $_) is export { $s.substr($_) }; CORE::{'&postcircumfix:<{ }>'}.add_dispatchee: $s }; say '123-10'{3} 15:27
camelia -10
Zoffix m: class A{ my $s = multi postcircumfix:<{ }>(Str:D $s,Int:D $_) is export { $s.substr($_) }; CORE::{'&postcircumfix:<{ }>'}.add_dispatchee: $s }; say '123-10'{3} 15:28
camelia Unhandled exception: Cannot iterate object with MVMCode representation (BOOTCode)
at gen/moar/BOOTSTRAP.nqp:1973 (/home/camelia/rakudo-m-inst-1/share/nqp/lib/Perl6/BOOTSTRAP.moarvm:)
from gen/moar/BOOTSTRAP.nqp:2194 (/home/camelia/rakudo-m-inst…
Zoffix LTA error
ZzZombo LTA?
Zoffix leaves for the day 15:29
lucs Less Than Awesome
15:29 mcsnolte joined, MilkmanDan left
ZzZombo m: class A{ my \s = multi postcircumfix:<{ }>(Str:D $s,Int:D $_) is export { $s.substr($_) }; CORE::{'&postcircumfix:<{ }>'}.add_dispatchee: s }; say '123-10'{3} 15:29
camelia -10
ZzZombo Anybody else can explain what exactly wrong was I adding while Zoffix is away? 15:30
15:32 eroux left, MilkmanDan joined, eroux joined
Zoffix ZzZombo: ::{'&postcircumfix:<{ }>'} is all the candidates, not the one dispatchee you want to add 15:32
mattr__ Hello, Mac OS X dmg p6doc not working out of the box. Does anyone know where I can find guide to installation? 15:33
(where should the files be in the install)
Zoffix Even when it's only sub there're to Subs handling it IIRC
m: my &bar = sub foo {}; say &foo === &bar
camelia False
Zoffix mattr__: what's the error? 15:34
ZzZombo Zoffix, oh. Alright then.
Zoffix mattr__: instructions are here: github.com/perl6/doc#install
mattr__ Hi Zoffix thanks and loved your article, p6doc already installed and built but cannot find any docs. 15:36
p6doc -f Type::Array.push Could not find Type::Array at line 0 in: /Users/mattr/.perl6 /Applications/Rakudo/share/perl6/site /Applications/Rakudo/share/perl6/vendor /Applications/Rakudo/share/perl6 CompUnit::Repository::AbsolutePath<140359463237616> CompUnit::Repository::NQP<140359462828424> CompUnit::Repository::Perl5<140359462828464> in sub locate-curli-module at /Applications/Rakudo/share/perl6/site/res
ZzZombo Zoffix: you don't have to make them explicitly my, BTW 15:37
15:40 risou is now known as risou_awy
mattr__ Zoffix: another error is p6doc -f slurp No documentation found for a routine named 'slurp' 15:41
[Coke] last time I mentioned an issue with this, someone said it was a known issue, mattr__
in the meantime, you can use doc.perl6.org/ and use the search feature. 15:42
Zoffix mattr__: I opend an Issue on the topic: github.com/perl6/doc/issues/1224 15:43
mattr__: use -f Array.push, without adding `Type::` thing
ZzZombo wait, how can I iterate a string char by char? 15:44
timotimo use .comb
ZzZombo m: say '1234'.comb
camelia (1 2 3 4)
lucs Inline::Perl5 problem: gist.github.com/lucs/dd83de28db512...5878eb00c2 15:45
15:45 pyrimidine left, pyrimidine joined
mattr__ Zoffix: Thanks, also I cannot do p6doc Str or p6foc faq either. Some problem with the dmg, as Coke notes 15:47
15:48 rurban joined
Zoffix `p6doc Str` works for me. Did you run `pd6doc-index build`? 15:48
mattr__ yes
Zoffix faq works too for me. This is on Bodhi Linux
no idea why it don't work for oyu
mattr__ I think as Coke (thanks!) notes there is some problem with the latest max os x dmg installer 15:49
p.s. the article I mentioned is a year old but I liked it. "Why in The World Would Anyone Use Perl 6?" 15:50
Zoffix More at perl6.party/ 15:51
15:51 risou_awy is now known as risou
ZzZombo m: class A{ my \s = multi postcircumfix:<{ }>(Str:D $s,*@_,*%_) { dd @_,%_;nextwith {},|@_,|%_; }; CORE::{'&postcircumfix:<{ }>'}.add_dispatchee: s }; say '123-10'{3} 15:55
camelia Type Str does not support associative indexing.
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
ZzZombo this fails ^
moritz ... now with TLS, Zoffix++
15:57 gregf_ joined 16:01 gdonald_ left, gdonald_ joined 16:03 cdg left, cdg joined 16:04 ufobat joined 16:07 pyrimidine left 16:08 pyrimidine joined
Zoffix m: class A{ my \s = multi postcircumfix:<{ }>(Str:D $s, $key, *@_,*%_) { dd @_,%_;nextwith {},$key,|@_,|%_; }; CORE::{'&postcircumfix:<{ }>'}.add_dispatchee: s }; say '123-10'{3} 16:18
camelia []
{}
(Any)
Zoffix ZzZombo: ^ need to have more specific candidate thatn Any SELF, Any key
m: class A{ my \s = multi postcircumfix:<{ }>(Str:D $s, $key, *@_,*%_) { dd @_,%_;nextwith :{3 => 42},$key,|@_,|%_; }; CORE::{'&postcircumfix:<{ }>'}.add_dispatchee: s }; say '123-10'{3} 16:19
camelia []
{}
42
16:23 khw joined 16:24 effbiai_ left
ufobat is sam morrison in this channel? :) 16:26
16:27 eroux left, lizmat_ joined 16:29 lizmat left 16:31 Ven left, Ven joined 16:33 lizmat joined, lizmat_ left 16:34 lizmat left 16:35 risou is now known as risou_awy 16:36 kurahaupo joined, risou_awy is now known as risou 16:41 pmurias joined 16:43 kurahaupo left
pmurias hi 16:43
Zoffix \o 16:45
16:46 kurahaupo joined 16:53 wamba joined 16:54 abraxxa left 16:58 Ven left 17:02 Ven joined 17:04 zakharyas left
pmurias Zoffix: have you thought yet about the subs that change the homedir/temporary dir and/or current dir? 17:06
Zoffix A bit. Why?
17:11 pmurias left
Zoffix Ok then :) 17:11
17:12 pmurias joined
pmurias Zoffix: I'm just interested if they get replaced/removed as they seemed really ugly 17:13
17:15 itcharlie joined
Zoffix I have some notes in that area, but I rather not reveal them right now to prevent Endless Bikeshed™. All the proposed changed will be available in rakudo/docs/IO-Action-Plan-2017.md on March 11th and the core team will have a week to comment on everything. 17:16
17:17 robertle left 17:23 domidumont left 17:25 risou is now known as risou_awy
pmurias Zoffix: people outside of the core team can't comment? ;) 17:25
Zoffix pmurias: they can comment, but no public announcement will be made to them, to avoid Too Many Cooks situation. 17:26
[Coke] too many cooks? too many cooks. 17:28
17:28 mxco86 joined 17:29 bazzaar joined
bazzaar \o Perl6 17:30
Zoffix \o
bazzaar I'm having a bit of an issue with zef on Rakudo Star 2017.01 ( pastebin.com/nR9m2nH1 ), anyone seen anything similar? 17:33
pmurias Zoffix: is the Endless Bikesheding a real threat? a lot of the current IO seems to underdesigned (I'm fine with waiting to comment on a finished proposal as it cuts on the discussion overhead)
Zoffix bazzaar: you don't have git installed? I don't remember if zef has any support for gitless environments... 17:34
bazzaar Zoffix: Aaah, that's probably it, .. have just had to rebuild my linux, and haven't installed Git yet... thanks for the help :) 17:36
Zoffix pmurias: I don't yet have a finished product. Yet the comments on it would assume the parts already written are the final thing. I see little reason to process all the commentary on things that are yet to be finished. 17:39
perlpilot_ Zoffix++ 17:40
Zoffix pmurias: to clarify, I more than welcome you point out things that suck and should be changed, I'm just not yet ready to share my proposals on how stuff should be changed. 17:41
17:41 gdonald_ left, gdonald_ joined 17:44 Ven left 17:48 kyan joined, bazzaar left 17:55 b7j0c joined
pmurias Zoffix: seems resonable 17:55
17:56 kyan left
mst Zoffix: I tend to follow a similar policy 17:56
17:57 lizmat joined, robertle joined
b7j0c hello, simple question here. I would like to confirm that when I get a value out of a hash in perl6, I always get a copy of the value, even if the value in the hash is something created with a .new() method...for example, if I have a hash of string -> URI, if I read a value into a new lhs URI (i.e. my URI $u = %hash{'thekey'}), I always get a copy (?) 17:58
[Coke] (zef) perhaps install curl? 17:59
Zoffix b7j0c: no, you don't 18:00
m: class Foo { has $.x is rw = 42 }; my $f = Foo.newl my %h = foo => Foo.new; %h<foo>.x = 72; say $f.x 18:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3{ has $.x is rw = 42 }; my $f = Foo.newl7⏏5 my %h = foo => Foo.new; %h<foo>.x = 72;
expecting any of:
infix
infix stopper
18:01 Ven joined
Zoffix m: class Foo { has $.x is rw = 42 }; my $f = Foo.new; my %h = foo => Foo.new; %h<foo>.x = 72; say $f.x 18:01
camelia 42
Zoffix oh shit.
tbrowder Zoffix: false alarm on shell and run. i upgraded rakudo to latest and all works as advertised. sorry for the noise.
Zoffix oh :) doh
m: class Foo { has $.x is rw = 42 }; my $f = Foo.new; my %h = foo => $f; %h<foo>.x = 72; say $f.x
camelia 72
Zoffix b7j0c: ^ otherwise it'd be impossible to shuttle objects around like that
b7j0c right but I am thinking more of the case where I say: class Foo { has $.x is rw = 42 }; my $f = Foo.new; my %h = foo => $f; my Foo $c = %h<foo>; %h<foo>.x = 72; say $f.x; say $c.x; 18:03
ilmari m: class Foo { has $.x is rw = 42 }; my $f = Foo.new; my %h = foo => $f; my Foo $c = %h<foo>; %h<foo>.x = 72; say $f.x; say $c.x; 18:04
camelia 72
72
b7j0c hmmm strange... because I tried this out on my own with a hash of string -> URI 18:05
i copied out one of the URIs from the hash, printed my copy...changed the value of the key in the hash and then printed out my copy, it remained as it was when it was defined 18:06
and URIs are also .new()'d
Zoffix "...changed the value of the key..." sounds like you just replaced the original object? 18:08
b7j0c yeah I think that is my confusion, sorry, right 18:09
ilmari b7j0c: did you mean %foo<bar> = $baz; or %foo<bar>.baz = zot;?
the former replaces the value in the hash, the latter modifies it
b7j0c right, in my case I am **replacing** the value, not modifying it 18:10
so yeah, my bad
thanks everyone! 18:11
Zoffix Any time.
18:12 b7j0c left 18:14 risou_awy is now known as risou 18:16 Ven left 18:21 Ven joined 18:22 ChoHag joined 18:30 Ven left 18:31 risou is now known as risou_awy 18:34 kalkin- joined
kalkin- hi 18:34
18:35 pyrimidine left 18:36 pyrimidine joined
rindolf kalkin-: meow! 18:36
kalkin-: how are you?
Hi all! Sup?
Zoffix: hi, long time
Zoffix \o 18:37
elaADnlxie \o/
rindolf Zoffix: what's new? 18:38
18:38 cdg left
Zoffix dunno 18:39
18:39 andrzejk_ joined
Zoffix m: '42'.FatRat.say 18:39
camelia 42
Zoffix That's new.
rindolf Zoffix: it didn't work before?
Zoffix nope
rindolf Zoffix: ah, nice
Zoffix: ah, so - nice! 18:40
Zoffix: I went on a longish walk today
18:40 pyrimidine left 18:41 Ven joined
Zoffix To where? 18:41
rindolf Zoffix: just in the neighbourhood
18:42 dotness joined
rindolf Zoffix: and then I continued to make my home site's HTML more strictly valid based on tidyp/HTML::Tidy 18:43
18:44 Ven_ joined 18:45 mattr__ left, Ven left
Zoffix Sounds like a quiet life. Do you get worried when the war's kicking off? 18:47
rindolf Zoffix: the war? 18:48
kalkin- Zoffix: did trump start a war?
Zoffix rindolf: don't you live like an hour away from Gaza? Dunno, maybe I live in too remote area, but from news here feels like there's always war kicking off. 18:49
And if there were a war that close to me, I'd be worried. 18:50
rindolf Zoffix: I live in northern Tel Aviv - there hasn't been missiles here in a while 18:51
18:51 darutoko left
Zoffix Good. 18:51
rindolf Zoffix: there were possibly some stabbings
18:57 dotness left
perlpilot_ rindolf: do you get worried you might get stabbed? ;) 19:01
19:02 espadrine joined
rindolf perlpilot_: not really 19:03
19:06 rurban1 joined 19:07 rurban left
elaADnlxie Zoffix: your comment about self-referential arrays makes so much sense 19:08
though the behavior you are describing is probably far from being DWIM in most of the cases 19:09
19:09 Ven_ left
elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h1 ,= %h2; say %h1 19:09
camelia {x => 15, y => 16}
elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h1 = %h1, %h2; say %h1
camelia {x => 15, y => 16}
elaADnlxie wait, wasn't it fixed
e: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h1 = %h1, %h2; say %h1
evalable6 elaADnlxie, rakudo-moar ae7bcf1b8: OUTPUT«{bar => 8, foo => 4, x => 15, y => 16}»
elaADnlxie ah, there we go
e: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h1 ,= %h2; say %h1 19:10
evalable6 elaADnlxie, rakudo-moar ae7bcf1b8: OUTPUT«{bar => 8, foo => 4, x => 15, y => 16}»
elaADnlxie camelia--
Zoffix Yeah, which is probably why it was made to auto-flatten hashes; to DWIM 19:12
m: my %h1 = :42a; my %h2 = :72b; %h1 = $%h2, $%h2; say %h1 19:13
camelia {b 72 => {b => 72}}
Zoffix And you can still get the behaviour I described by asking for it ^
19:15 _sfiguser left 19:17 itcharlie left 19:18 pyrimidine joined 19:20 lizmat left 19:21 rurban joined, lizmat joined
RabidGravy ooh, Fedora 25 just gave me rakudo 2017.01 19:23
19:23 rurban1 left, dwarring joined
RabidGravy I think that's the most up to date it has been :) 19:23
andrzejk_ хай гайс 19:24
RabidGravy that's easy for you tooo say 19:26
Zoffix hi to you too 19:28
19:29 _sfiguser joined, lizmat left 19:37 rurban1 joined 19:38 rurban2 joined, rurban2 left 19:40 llfourn left 19:41 rurban left 19:42 rurban1 left
elaADnlxie RabidGravy: now the question is how do you install zef on top of that :) 19:43
RabidGravy [jonathan@coriolanus zef]$ /usr/bin/perl6 -Ilib bin/zef install . 19:48
===> Testing: zef:ver('0.1.1'):auth('github:ugexe')
t/00-load.t ........... ok
t/identity.t .......... ok
t/utils-filesystem.t .. ok
All tests successful.
Files=3, Tests=14, 13 wallclock secs
Result: PASS
===> Testing [OK] for zef:ver('0.1.1'):auth('github:ugexe')
===> Installing: zef:ver('0.1.1'):auth('github:ugexe')
1 bin/ script [zef] installed to:
/home/jonathan/.perl6/bin
:)
19:49 andrzejk_ left
RabidGravy seems to work 19:50
samcv good *
19:51 ufobat left 19:53 i7f6 joined
elaADnlxie samcv: o/ 19:54
samcv your name is unsettling
19:55 kyan joined 19:59 bjz joined
elaADnlxie it's ok :) 19:59
20:01 Ven joined 20:03 smls left
dylanwh samcv: your name reminds me a little of XS, so... also disturbing. 20:09
20:10 aindilis` left, jhill__ joined 20:14 obfusk_ left 20:15 andrzejk_ joined 20:16 pyrimidine left 20:17 pyrimidine joined 20:25 perlpilot_ is now known as perlpilot
RabidGravy you're all disturbing buy hey! 20:26
elaADnlxie m: class Toothpaste { method sink { say ‘:O’ } }; Toothpaste.new 20:32
camelia :O
elaADnlxie m: class Toothpaste { method sink { say ‘:O’ } }; my $x = Toothpaste.new
camelia ( no output )
elaADnlxie m: class Toothpaste { method sink { say ‘:O’ } }; my $x = Toothpaste.new; $x 20:33
camelia WARNINGS for <tmp>:
Useless use of $x in sink context (line 1)
elaADnlxie m: class Toothpaste { method sink { say ‘:O’ } }; my $x = Toothpaste.new; sink $x
camelia WARNINGS for <tmp>:
Useless use of $x in sink context (line 1)
:O
elaADnlxie how do I sink it without a warning?
I know I can call .sink but… 20:34
20:34 bjz left 20:35 telex left
Zoffix quietly 20:36
20:36 llfourn joined, telex joined
Zoffix nm 20:36
yeah, just call think 20:37
Why a but?
*sink
20:41 llfourn left
elaADnlxie Zoffix: not sure actually. Just trying to figure if writing your own sink method could be useful for anything 20:46
20:58 bjz joined
sjn hello, #perl6 21:03
Zoffix \o
sjn question; Is there a way to introspect perl6 to see which operators it has? 21:04
other than reading code, I mean 21:05
timotimo of course
m: say CORE::.keys.grep(*.contains('fix'))
camelia (&infix:<+|> &infix:<∖> &infix:<ne> &infix:«<=» &infix:<notandthen> &infix:<o> &infix:<**> &infix:<eqv> &infix:«~<» &infix:<⊎> &infix:<∩> &infix:<coll> &infix:<xx> &postcircumfix:<[ ]> &postfix:<i> &infix:<∈> &infix:<..^> &infix:«<=>» &infi…
21:06 _28_ria left
sjn nice! 21:06
21:07 _28_ria joined 21:08 _28_ria left 21:09 risou_awy is now known as risou
TimToady perhaps you should scan for 'fix:' if you wan to be slightly more future proof 21:10
21:10 cdg joined
TimToady *want 21:10
Zoffix sjn: map.perl6.party lists them 21:11
sjn: and the code in the repo (mapper.p6) has the code for introspection
21:17 _28_ria joined 21:21 _28_ria left 21:22 _28_ria joined 21:25 bjz left
firefish5000 Anyone know how I could join two Buf objs? I was doing ($b1.decode ~ $b2.decode).encode, but now I have some non UTF-8 data mixed in and its not working. 21:26
21:26 _28_ria left 21:28 _28_ria joined, _28_ria left 21:30 kyclark joined
RabidGravy Hmm assuming I have declared "thing" in EXPORTHOW, is there anyway I can parameterise it like "thing Bar["something"] { }"? 21:31
elaADnlxie m: my $a = Buf.new(1, 2, 3); my $b = Buf.new(4, 5, 6); my $c = $a ~ $b; dd $c
camelia Buf $c = Buf.new(1,2,3,4,5,6)
elaADnlxie firefish5000: ↑ 21:32
firefish5000: most string operations work with Bufs directly
firefish5000: so there's no need to decode/encode
21:32 risou is now known as risou_awy
elaADnlxie
.oO( and by “most string operations” I mean just ~ )
21:33
firefish5000 elaADnlxie, Thanks!
up until this point I was dealing with both bufs and strings, so that wasn't working. but all bufs or all strings works as you said! 21:34
21:34 rindolf left
Zoffix m: Buf.new(42) ~ "foo" 21:34
camelia WARNINGS for <tmp>:
Useless use of "~" in expression ".new(42) ~ \"foo\"" in sink context (line 1)
Cannot use a Buf as a string, but you called the Stringy method on it
in block <unit> at <tmp> line 1
21:35
El_Che new rakudo 2017.02 debs/rpms: github.com/nxadm/rakudo-pkg/releas...ag/2017.02
RabidGravy wahay!
Zoffix firefish5000: side on about non-UTF8 data: you can .decode.encode round-trip using Latin-1 encoding
s/side on/side note/; 21:36
21:37 MilkmanDan left, llfourn joined, girafe joined 21:38 agentzh joined
firefish5000 thanks, ill try to remember that for next time! 21:38
21:38 andrzejk_ left
Zoffix m: my $a = Buf.new(1, 2, 3); my $b = Buf.new(4, 5, 6); say Buf.new: $a, $b 21:40
camelia Type check failed in initializing element #0 to Buf; expected uint8 but got Buf (Buf.new(1,2,3))
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
Zoffix m: my $a = Buf.new(1, 2, 3); my $b = Buf.new(4, 5, 6); say Buf.new: |$a, |$b
camelia Buf:0x<01 02 03 04 05 06>
Zoffix another way
elaADnlxie I think you can also use push
Zoffix bisect: Buf.new ~ Buf.new
elaADnlxie huh? 21:41
Zoffix bisectable6: Buf.new ~ Buf.new
bisectable6 Zoffix, On both starting points (old=2015.12 new=ae7bcf1) the exit code is 0 and the output is identical as well
Zoffix, Output on both points: WARNINGS for /tmp/vS0AgVT0IF:␤Useless use of "~" in expression ".new ~ Buf.new" in sink context (line 1)
Zoffix, On both starting points (old=2015.12 new=ae7bcf1) the exit code is 0 and the output is identical as well
Zoffix, Output on both points: WARNINGS for /tmp/u9bLdcvDBi:␤Useless use of "~" in expression ".new ~ Buf.new" in sink context (line 1)
elaADnlxie (sorry, was my bad)
Zoffix huh
21:41 TEttinger joined
elaADnlxie m: my $a = Buf.new(1, 2, 3); my $b = Buf.new(4, 5, 6); $a.push($b); dd $a 21:41
camelia Buf $a = Buf.new(1,2,3,4,5,6)
elaADnlxie firefish5000: also this ↑
Zoffix bisectable6: Buf.new ~ Buf.new
bisectable6 Zoffix, On both starting points (old=2015.12 new=ae7bcf1) the exit code is 0 and the output is identical as well 21:42
Zoffix, Output on both points: WARNINGS for /tmp/oszJBJMhI1:␤Useless use of "~" in expression ".new ~ Buf.new" in sink context (line 1)
Zoffix bisectable6: [~] Buf.new, Buf.new
bisectable6 Zoffix, Bisecting by output (old=2015.12 new=ae7bcf1) because on both starting points the exit code is 0
Zoffix Oh
bisectable6: [~] Buf.new
OK
bisectable6 Zoffix, bisect log: gist.github.com/568221a5120904fe34...1a9ebb0c87
Zoffix, (2016-12-15) github.com/rakudo/rakudo/commit/ac...e2a71d851a
Zoffix, Bisecting by output (old=2015.12 new=ae7bcf1) because on both starting points the exit code is 0
Zoffix I thought I added the Buf ~ Buf thing, but it was just 1-arg one
bisectable6 Zoffix, bisect log: gist.github.com/fe7c41d8ecfbc70147...b559728b59
Zoffix, (2016-12-15) github.com/rakudo/rakudo/commit/ac...e2a71d851a
21:42 llfourn left
elaADnlxie committable6: all [~] Buf.new, Buf.new 21:42
committable6: all [~] Buf.new 21:43
Zoffix bisectable6: $ = [~] Buf.new
bisectable6 Zoffix, On both starting points (old=2015.12 new=ae7bcf1) the exit code is 0 and the output is identical as well
Zoffix, Output on both points:
committable6 elaADnlxie, gist.github.com/f9822d9bf767c87932...b63a228354
21:43 aaa3 joined
Zoffix erm, fine then 21:43
committable6 elaADnlxie, gist.github.com/fe115bf5216c86dafa...7203abf2b0
21:44 sena_kun left
aaa3 rakudo: say "Hello, World!" 21:44
camelia Hello, World!
elaADnlxie m: say ‘Hello!’
camelia Hello!
Zoffix This is the one i sought: github.com/rakudo/rakudo/commit/77...913718b7df
21:45 salva left, aaa3 left
Zoffix m: say WHY 'Life, the Universe and Everything': 21:45
camelia 42
21:46 Ven left
TimToady m: say WHY 'Life, the Universe, and Everything': 21:47
camelia (Any)
TimToady doesn't work with Oxford comma, which is a bug :)
elaADnlxie Zoffix: yeah, I see now. This finds it: bisect: old=2016.09 say [~] Buf.new 21:48
21:48 MilkmanDan joined
elaADnlxie it was working fine before 2016.09, so bisectable will refuse to bisect :) 21:48
Zoffix It's a feature :) And I'd point to the commit with explanation if only GitHub weren't too dumb to link to the link in commit's title other than the commit itself -_-
mc: say WHY 'Life, the Universe, and Everything':
committable6 Zoffix, ¦«2015.12»: 42
Zoffix :) 21:49
elaADnlxie bisect: say WHY 'Life, the Universe, and Everything':
bisectable6 elaADnlxie, Bisecting by output (old=2015.12 new=ae7bcf1) because on both starting points the exit code is 0
elaADnlxie, bisect log: gist.github.com/5d2db178f586deba7c...33c3c943ee
elaADnlxie, (2016-10-04) github.com/rakudo/rakudo/commit/d8...d39130a895
Zoffix Ah OK, no explanation in commit, but the comment on IRC was that comma-less version was a more accurate quote 21:50
TimToady sure, but we should support modern English as well
elaADnlxie I like how bisectalbe is the most convenient way to find some commit :) 21:52
TimToady maybe the Oxford comma version should return 43 21:54
Geth routine-map: 1dc9b3b789 | (Zoffix Znet)++ | update-map.perl6.party
Fix missing map.json in uploader script

Fixes #1
21:56
22:00 kyclark left 22:02 agentzh left 22:03 skids left, agentzh joined
Zoffix So... me and my buddy paid SpaceX a bunch of money to fly us to the Moon next year. Cool, eh? 22:04
Don't tell anyone...
elaADnlxie moritz: and you're talking about short round-trip time 22:05
DrForr Are you planning to swing among them stars? 22:06
22:06 _28_ria joined
elaADnlxie Zoffix: I thought the plan was Mars, no? 22:07
Zoffix Maybe in 2019. First gotta see what the moon feels like.
elaADnlxie: my buddy and I can't afford Mars. So we settled for the Moon.
elaADnlxie fair enough
perlpilot Zoffix: while you're out there, look for new phenomena that you can give a Perl 6-related name. :) 22:09
elaADnlxie or just take plush camelia with you 22:10
Zoffix Nah, 'can't. My buddy is paying the larger share of our ticket to the Moon and he hates Perl 6. 22:11
elaADnlxie send him alone. 22:12
Zoffix But then I don't get to go!
DrForr One way?
22:13 agentzh left
Zoffix Nah, we won't even land (can't afford it). Just sling around it, look at the backside, and come back. 22:13
perlpilot Are you bringing a high-powered light? The backside has no light.
DrForr "I would just like to say that though I intend to fly away, I do *not* intend to travel to the moon, the Milky Way or even Mars. Up yours, Kravitz!"
Zoffix ROFL 22:14
elaADnlxie xDD
Zoffix perlpilot: of course there is light :)
22:14 pyrimidine left
elaADnlxie 🙈 no light here 22:14
22:14 pyrimidine joined, RabidGravy left
DrForr Actually it usually has light, think about what happens during eclipses :) 22:15
Zoffix Yeah :)
22:15 cog_ joined
perlpilot depends on what you mean by "backside" 22:15
Zoffix perlpilot: any side :)
"dark side of the moon" is just figurative speech.
22:17 cognominal left
DrForr Gotta love resonance locks. 22:17
22:17 itaipu joined 22:19 pyrimidine left
perlpilot Really someone just needs to put some more energy into building a habitat that can sustain humans on the order of decades, *then* figure out how to attach rockets to it 22:20
Zoffix That's bound to fail :) Better build it in orbit 22:21
22:21 pyrimidine joined
Zoffix Well, we *have* it in orbit :) It just needs resupliage 22:21
perlpilot I'd hate to be on the ever-longer supply run. 22:22
(for when we colonize other planets)
gfldex fear not! Zoffix will write you a bot to do the supply runs for you. 22:23
Zoffix For planets, you don't need to really. On Mars, the only supply you need to start with is hydrogen. And if there is indeed water ice under surface you're all set. 22:24
And for cross-star journeys, I'd imagine damage to your spacecraft would be biggest concern. 22:25
...well, other than dying of old age :P
perlpilot First ... make a trip to the asteroid belt to pick up a large supply of asteroids to use a shield on your journey ... 22:26
TEttinger well use a robot
perlpilot A future billionaire will make his (or her) money by inventing a giant glue gun for accreting asteroids by bombardment 22:29
(and then we'll just use the mass of the asteroid belt to make another earth-like planet in a closer orbit than Mars)
22:30 Actualeyes left
Zoffix Don't need any glue guns :) They'd stick to each other with gravity :P 22:30
perlpilot momentum might over power gravity in the beginning. 22:31
Though ... according to wikipedia the asteroid belt doesn't have near enough mass for an earth like planet. Bummer. 22:32
22:34 mcmillhj left, itaipu left 22:36 llfourn joined 22:37 Voldenet left 22:40 risou_awy is now known as risou 22:41 kyan left, llfourn left 22:42 Voldenet joined, Voldenet left, Voldenet joined 22:44 itcharlie1 joined 22:57 risou is now known as risou_awy 22:58 pyrimidine left 22:59 pyrimidine joined 23:02 ajr_ joined
ajr_ Has anyone successfully deployed Rakudo* on the Raspberry Pi? 23:02
gfldex ajr_: takes about 2h to build 23:03
23:03 pyrimidine left
elaADnlxie depends on what Pi you have. If I recall correctly, I was unable to build it myself on Zero 23:04
but I was able to install it from debian unstable repo with no issues
ajr_ I'm trying to do it on a 3. Make is dying.
elaADnlxie huggable: deb 23:05
huggable elaADnlxie, CentOS and Debian Rakudo packages: github.com/nxadm/rakudo-pkg/releases
elaADnlxie no arm packages, heh
El_Che elaADnlxie: I need to look into arm docker support. I may then create arm packages
23:06 itcharlie1 left
El_Che fedora 25 has arm support iirc, and I read today here that it has rakudo 2017.01 23:07
23:14 robertle left
elaADnlxie El_Che: well, debian unstable has 2016.12, which is also something you should consider 23:15
23:16 mcmillhj joined
elaADnlxie especially given that we are going to see a new debian release relatively soon 23:16
23:17 lichtkind_ left
ajr_ So if I do manage the feat, it'll be an additional platform? 23:19
elaADnlxie El_Che: oops, this was actually meant for ajr_ :) 23:20
SmokeMachine Im going to add a new module into the ecosystem... should I PR or can I just commit it?
ajr_ @gfldx - does that imply that you've succeeded? (I know it takes a while, but that's fine.) 23:21
23:22 mcmillhj left
gfldex I didn't but remember somebody reporting it here. Also, somebody else digged into the failed build log for arm on debian and got that to work. 23:22
that was about 6 month ago 23:23
Geth ecosystem: 5e96167a75 | (Fernando Correa de Oliveira)++ | META.list
Adding Punnable to the ecosystem

  github.com/FCO/Punnable
elaADnlxie ajr_: again, if I were you, I'd just add debian testing repo and install it from there
SmokeMachine I just committed... :)
Zoffix \o/ 23:24
ajr_ Any idea where I can find out what changes made it work? I'm less concerned about having it run than fixing the process.
elaADnlxie ajr_: so what's the error you see? 23:25
sjn Zoffix, TimToady, thanks! ^^ 23:26
btw, is there a reason why .WHY hasn't been populated for perl6 symbols/methods/etc.? 23:28
ajr_ sorry, I don't have the details at hand. I don't want to waste people's time here on a debugging session. I just didn't want to waste time if a fix exists. 23:29
sjn imagines something related to parsing time
Zoffix sjn: bigger issue is contributor time. You must sign CLA to be able to contribute to Rakudo, while anyone can contribute to docs repo freely. 23:32
sjn: and even bigger issue: Rakudo does not define Perl 6. It doesn't make sense for docs to be bound to it. 23:33
23:35 risou_awy is now known as risou 23:37 llfourn joined 23:39 mcmillhj joined
Zoffix If it can be kept separate, but merged together on build... 23:40
23:41 espadrine left 23:42 lep-delete left, lichtkind_ joined, llfourn left 23:44 mcmillhj left, lichtkind_ left 23:45 lep-delete joined
Zoffix m: #=meows␤sub x { }; say &x.WHY 23:46
camelia Nil
Zoffix how to set WHY anyway?
timotimo m: #|meows␤sub x { }; say &x.WHY
camelia Nil
timotimo *shrug* ?
Zoffix m: sub cast(Int $s)␤#= Initiate a specified spell normally␤#= (do not use for class 7 spells)␤{␤}␤say &cast.WHY; 23:48
camelia Initiate a specified spell normally (do not use for class 7 spells)
Zoffix :/
m: #= meows␤sub x { }; say &x.WHY
camelia Nil
Zoffix m: sub x␤#= meows␤ { }; say &x.WHY
camelia meows
23:49 Actualeyes joined 23:50 ajr_ left
Zoffix m: use nqp; sub x { }; nqp::bindattr(&x, Block, '$!why', 'meows'); say &x.WHY 23:51
camelia No such method 'set_docee' for invocant of type 'Str'
in block <unit> at <tmp> line 1
Zoffix Guess this one would work if given proper Pod
Pod object
23:51 ajr_ joined 23:52 risou is now known as risou_awy
Zoffix Can be done as a module. You load it and book, got all the .WHYs set. 23:52
s/book/boom/; -_-
23:54 wamba left 23:55 mcmillhj joined 23:56 cibs left 23:57 eater left 23:58 cibs joined