Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-10-26

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:15 lizmat zengargoyle: well, it may be a bit weird, but there *is* a bug there, I think, and it's not in your part of the code  :-)
00:15 dbrock joined #perl6
00:18 cognominal joined #perl6
00:24 lizmat good night. #perl6!
00:28 zengargoyle [perl #126454] [BUG] Channel: earliest $channel { ... } does not go away at end of scope -- and done
00:28 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126454
00:29 zengargoyle sorta hampers my /r/dailyprogrammer puzzle solver. :(
00:31 zengargoyle but at least it works that first time. :P
00:32 pollei joined #perl6
00:37 tokuhirom joined #perl6
00:38 raiph .ask psch have you read https://gist.github.com/sorear/5947073 ?
00:38 yoleaux raiph: I'll pass your message to psch.
00:46 cognominal joined #perl6
00:48 aborazmeh joined #perl6
00:48 aborazmeh joined #perl6
00:53 colomon joined #perl6
01:09 Actualeyes joined #perl6
01:10 Ben_Goldberg joined #perl6
01:12 uruwi Back
01:12 tokuhirom joined #perl6
01:17 psch raiph: no, i hadn't, thanks for bringing it up
01:17 yoleaux 00:38Z <raiph> psch: have you read https://gist.github.com/sorear/5947073 ?
01:18 psch raiph: a first reading shows many idea fitting with what i arrived and implemented (or planned to implement) myself, which is a good thing i suppose
01:19 psch raiph: unfortunately, r-j current suffers from a too large CORE.setting to fit into one .class file, which means there's some rather deep general codegen stuff to solve first
01:26 konobi mmm... missed pmurias again
01:26 yoleaux 23 Oct 2015 20:03Z <pmurias> konobi: how should I profile node.js applications (to see if there are any low hanging speedups for nqp-js)
01:28 BenGoldberg_ joined #perl6
01:32 BenGoldberg joined #perl6
01:38 BenGoldberg joined #perl6
01:47 raiph psch: I stumbled on that "goals" gist by accident. Perhaps we'd best add a copy of it to perl6/nqp/docs?
01:51 konobi pmurias drop me a PM... i should have all that infor for you.
01:53 psch raiph: yeah, it's probably good to at least guarantee it doesn't get lost
01:55 psch raiph: i'll probably eventually try and integrate it with the existing jvminterop.md, though
01:55 raiph just found another, not jvm specific, but still great info: https://gist.github.com/sorear/5747025
01:55 psch well, less conjectural
01:57 raiph psch: afaict the jvminterop doc is what's done, the gist I shared would be javainteropgoals.md; of course, if you've achieved some of the goals there are presumably corresponding removals/additions to these two docs
01:58 psch raiph: yeah, that's what i mean.  the second paragraph of "General Object Features" was mostly implemented pre-GLR
01:58 psch with the first solution in the paragraph
01:58 raiph both docs were last updated 2 years ago
01:58 psch many of the marshal-{in,out} bits also worked
01:59 psch yup, i had neglected that.  it's mostly in the advent blog post :/
02:00 llfourn joined #perl6
02:02 dalek nqp: d6361dc | peschwa++ | docs/jvminterop-goals.md:
02:02 dalek nqp: Preserve design and implementation goals for jvminterop.
02:02 dalek nqp:
02:02 dalek nqp: raiph++ for bringing this up.  Some parts in there were already done pre-GLR,
02:02 dalek nqp: but jvminterop broke during GLR and neither NQP nor Rakudo have fully recovered
02:02 dalek nqp: yet.  This means both jvminterop-goals.md as jvminterop.md will need some
02:02 dalek nqp: attention as soon as we have a stable enough nqp-j and perl6-j.
02:02 dalek nqp: review: https://github.com/perl6/nqp/commit/d6361dce7a
02:08 raiph pcsh++
02:08 raiph er, psch++
02:17 raiph ( I now see that a later version of https://gist.github.com/sorear/5747025 is already in the perl6/nqp/docs directory )
02:30 tokuhiro_ joined #perl6
02:32 dalek nqp: 0c4e80b | peschwa++ | docs/jvminterop-goals.md:
02:32 dalek nqp: Line wrap at 80 characters, to make it actually readable.
02:32 dalek nqp: review: https://github.com/perl6/nqp/commit/0c4e80b638
02:42 telex joined #perl6
02:48 SuzieQueue joined #perl6
02:50 aindilis joined #perl6
02:50 tony-o did pack('b*'  go away?
03:10 adu joined #perl6
03:15 TEttinger joined #perl6
03:17 geekosaur is pack fully implemented yet?
03:17 geekosaur (i.e. it may not be there but that doesn't necessarily mean it went away...)
03:19 prevost joined #perl6
03:27 Juerd m: pack("v", 0x20ac)
03:27 camelia rakudo-moar cd7766: ( no output )
03:27 Juerd m: say pack("v", 0x20ac).gist
03:27 camelia rakudo-moar cd7766: OUTPUT«Buf:0x<ac 20>␤»
03:27 Juerd geekosaur: ^
03:28 Juerd I don't know if it's "full" enough for your needs. It doesn't do everything that Perl 5's pack does yet.
03:28 geekosaur I think you wanted to aim that at tony-o
03:28 Juerd Oh, right :)
03:29 kaare_ joined #perl6
03:29 yeahnoob joined #perl6
03:30 colomon joined #perl6
03:39 kmel joined #perl6
03:39 Actualeyes joined #perl6
04:07 adu joined #perl6
04:11 kmel If we create a class that has variables with no twigils:  class { has $var }
04:11 kmel how can we use these attributes?
04:12 kmel are they accessible outside the class? Inside only? Not accessible at all?
04:12 kmel I am asking because ! makes it private so accessible inside only
04:13 kmel and . creates a getter so makes it accessible outside
04:13 kmel what about no twigil?
04:14 tony-o ahh, okay so maybe NYI
04:14 tony-o kmel: the $ is the twigil.., what do you mean without twigils?
04:16 tony-o m: class A { has $!b = 5; method b { $!b; }; }; say A.new.b;
04:16 camelia rakudo-moar cd7766: OUTPUT«5␤»
04:16 kmel tony-o: $ is the sigil
04:16 AlexDaniel m: class A { has $b = 5; method b { $b; }; }; say A.new.b;
04:16 camelia rakudo-moar cd7766: OUTPUT«5␤»
04:16 AlexDaniel tony-o: look, no twigil
04:16 tony-o $ is still a twigil
04:17 tony-o m: my \r = 5;  say r;
04:17 camelia rakudo-moar cd7766: OUTPUT«5␤»
04:17 tony-o that's no twigil
04:17 AlexDaniel tony-o: what's a sigil then? :)
04:17 tony-o ah damnit
04:17 tony-o i'll go back to implementing unpack b*
04:19 kmel AlexDaniel: is there a way to access an attribute outside the class without a getter?
04:20 AlexDaniel kmel: hmmm, maybe without a twigil it is a class variable
04:20 AlexDaniel m: class A { has $b = 5; }; say A.b;
04:20 camelia rakudo-moar cd7766: OUTPUT«Method 'b' not found for invocant of class 'A'␤  in block <unit> at /tmp/Gj5nu6ecMH:1␤␤»
04:20 AlexDaniel no idea actually
04:21 kmel AlexDaniel: thanks
04:21 AlexDaniel kmel: did you find how to make it work?
04:23 AlexDaniel ok, so let's try this
04:25 AlexDaniel m: class A { has $b = 0; method foo { $b += 5 }; method get { $b } }; my $x = A.new; my $y = A.new; $x.foo; say $y.get;
04:25 camelia rakudo-moar cd7766: OUTPUT«0␤»
04:25 AlexDaniel m: class A { my $b = 0; method foo { $b += 5 }; method get { $b } }; my $x = A.new; my $y = A.new; $x.foo; say $y.get;
04:25 camelia rakudo-moar cd7766: OUTPUT«5␤»
04:25 AlexDaniel ok, class attributes are declare with “my”
04:26 AlexDaniel then what is this twigilless thing?
04:26 AlexDaniel declared*
04:26 ugexe m: class Foo { has $bar = 1; }; say Foo.^attributes;
04:26 camelia rakudo-moar cd7766: OUTPUT«(Mu $!bar)␤»
04:27 kmel AlexDaniel: not yet. still reading docs and trying to figure out how classes work
04:27 AlexDaniel ugexe: what does that mean? $foo is a synonym to $!foo?
04:29 ugexe yes
04:29 ugexe m: class Foo { has $bar = 1; method get { say $!bar; }; }; Foo.new.get;
04:29 camelia rakudo-moar cd7766: OUTPUT«1␤»
04:30 kmel ugexe: then why use ! in the first place?
04:30 kmel if all attributes are private by default?
04:30 raiph aiui, declaring a $bar in a class is the same as $!bar but gives you a $bar alias
04:30 ugexe ah raiph++
04:31 kmel class Foo { has $bar = 99; method get { say $!bar; }; }; Foo.new.get;
04:32 ugexe probably constructors too
04:32 kmel m: class Foo { has $bar = 99; method get { say $!bar; }; }; Foo.new.get;
04:32 camelia rakudo-moar cd7766: OUTPUT«99␤»
04:32 kmel m: class Foo { has $bar = 99; method get { say $bar; }; }; Foo.new.get;
04:32 camelia rakudo-moar cd7766: OUTPUT«99␤»
04:32 kmel m: class Foo { has $!bar = 99; method get { say $bar; }; }; Foo.new.get;
04:32 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2sBdLRTUSx␤Variable '$bar' is not declared. Did you mean '$!bar'?␤at /tmp/2sBdLRTUSx:1␤------> 3 Foo { has $!bar = 99; method get { say 7⏏5$bar; }; }; Foo.new.get;␤»
04:32 CiNN joined #perl6
04:33 kmel m: class Foo { has $bar = 99; method get { say $!bar; }; }; Foo.new.get;
04:33 camelia rakudo-moar cd7766: OUTPUT«99␤»
04:33 raiph http://design.perl6.org/S12.html#Attributes
04:35 kmel m: class Foo { has $bar = 99; has $!bar = 1; method get { say $!bar; }; }; Foo.new.get;
04:35 camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤Package 'Foo' already has an attribute named '$!bar'␤»
04:36 kmel ok that;s
04:37 kmel summary: has $x is private  just as has $!x
04:37 AlexDaniel m: class Foo { has $!bar = 99; has $bar = 1; }
04:37 camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤Package 'Foo' already has an attribute named '$!bar'␤»
04:37 secwang joined #perl6
04:38 AlexDaniel kmel: ok, which one should I prefer? :)
04:38 kmel only difference is: has $x can be used later as either $x or $!x
04:38 kmel but has $!x will always need to be referenced as S!x
04:38 llfourn AlexDaniel: use $!x :) has $x is just some auto aliasing which is going to be confusing in most cases
04:39 tokuhirom is there a way to generate infinite list from existed list?
04:39 tokuhirom i want to generate `a,b,c,a,b,c,..*` from <a b c>
04:40 llfourn m: my @list = <a b c> xx *; say @list[42];
04:40 camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
04:40 kmel AlexDaniel: Honestly I will try not to use ! since it attributes are private by nature.
04:40 AlexDaniel kmel: but that's good?
04:41 llfourn m: my @list = <a b c>.flat xx *; say @list[42];
04:41 camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
04:41 AlexDaniel llfourn: <a b c> is already flat
04:41 kmel AlexDaniel: i am not sure. I will use it and see where and when it breaks
04:41 kmel AlexDaniel: that's the only way to really know the difference
04:42 AlexDaniel kmel: well, nothing will break, but you will have internals exposed to everyone
04:42 tony-o m: class A { has $!priv = 5; }; Attribute.new(:name('$!priv'), :type(Mu), :package(A)).get_value(A.new).say;
04:42 camelia rakudo-moar cd7766: OUTPUT«5␤»
04:43 llfourn m: my @list = <a b c> xx *; say @list.flat[42];
04:43 camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
04:43 tony-o m: class A { has $!priv = 5; }; my A $a .=new(priv => 100); say $a.^attributes[0].get_value($a);
04:43 camelia rakudo-moar cd7766: OUTPUT«5␤»
04:43 tony-o meh, something like that works
04:43 kmel AlexDaniel: how so?
04:43 tony-o if you want to get a private var from a class kmel ^
04:44 kmel tony-o: thanks
04:44 tony-o requires you know the type and everything, though
04:44 tony-o to some extent
04:47 kmel got to go to work
04:48 kmel have a nice day
04:48 kmel laters
04:49 llfourn does anyone know how to do what tokuhirom asked?
04:49 AlexDaniel llfourn: well, I'm trying
04:49 llfourn ah k me too :)
04:50 secwang joined #perl6
04:52 AlexDaniel m: my @list1 = <a b c>; my @list = map {@list1[$_ % @list1.elems]}, (0..*); say @list[42];
04:52 camelia rakudo-moar cd7766: OUTPUT«a␤»
04:52 AlexDaniel m: my @list1 = <a b c>; my @list = map {@list1[$_ % @list1.elems]}, (0..*); say @list[42..50];
04:52 camelia rakudo-moar cd7766: OUTPUT«(a b c a b c a b c)␤»
04:52 AlexDaniel tokuhirom: ^ this maybe?
04:54 llfourn AlexDaniel: nice!
04:54 tokuhirom AlexDaniel: Ah, yes! it's what i was looking for!
04:54 AlexDaniel tokuhirom: but you have to make sure that @list1 does not change
04:58 AlexDaniel is .flat broken?
04:59 llfourn m: say (<a b c> ~~ [<a b c>].flat)
04:59 camelia rakudo-moar cd7766: OUTPUT«False␤»
04:59 llfourn m: say (<a b c> ~~ |[<a b c>])
04:59 camelia rakudo-moar cd7766: OUTPUT«True␤»
04:59 llfourn AlexDaniel: maybe..
04:59 AlexDaniel m: my @list = <a b c> xx 100; say @list.flat.flat.flat.flat[42];
04:59 camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
05:01 AlexDaniel m: say (<a b>, 'c').flat.elems;
05:01 camelia rakudo-moar cd7766: OUTPUT«3␤»
05:03 pollei joined #perl6
05:04 dayangkun joined #perl6
05:04 secwang joined #perl6
05:09 llfourn m: my $list = (<a b c> xx *).flatmap: { .flat }; say $list[42];
05:09 camelia rakudo-moar cd7766: OUTPUT«a␤»
05:09 llfourn AlexDaniel: ah-ha!
05:09 llfourn m: my $list = (<a b c> xx *).flatmap: { .flat }; say $list[40..50];
05:09 camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
05:09 AlexDaniel tokuhirom: ^
05:10 tokuhirom wow
05:10 AlexDaniel m: my $list = (<a b c> xx *).flatmap: { $_ }; say $list[40..50];
05:10 camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
05:11 AlexDaniel this does not really make any sense
05:11 AlexDaniel m: my $list = (<a b c> xx *).flat; say $list[40..50];
05:11 camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
05:11 AlexDaniel OK, this does
05:11 llfourn you don't even need .flat... :P
05:11 llfourn oh even better!
05:11 tokuhirom ah
05:11 tokuhirom m: my $list = (|<a b c> xx *); say $list[40..50];
05:11 llfourn dunno why I never tried that...
05:12 camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
05:12 AlexDaniel m: my $list = flat <a b c> xx *; say $list[40..50];
05:12 camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
05:13 llfourn that's pretty cool
05:13 AlexDaniel indeed, that works as well!
05:13 AlexDaniel m: my $list = |<a b c> xx *; say $list[40..50]
05:13 camelia rakudo-moar cd7766: OUTPUT«(b c a b c a b c a b c)␤»
05:13 AlexDaniel I wonder why it took us so much time to get that…
05:13 llfourn I only tried flat on the <a b c> not on the whole thing :\
05:14 llfourn but as you pointed out that made no sense because it was already flat
05:19 llfourn m: my $x = <a b c> xx *; say $x.WHAT
05:19 camelia rakudo-moar cd7766: OUTPUT«(Seq)␤»
05:31 llfourn joined #perl6
05:45 diana_olhovik joined #perl6
05:59 dalek ecosystem: 842ac10 | tony-o++ | META.list:
05:59 dalek ecosystem: Huffman Encoding with PP6
05:59 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/842ac10780
06:07 lizmat joined #perl6
06:10 quester joined #perl6
06:29 davido_ joined #perl6
06:29 itz_stmu1 joined #perl6
06:58 bjz joined #perl6
07:01 rindolf joined #perl6
07:04 lizmat good *, #perl6!
07:08 llfourn hi lizmat :D
07:08 lizmat llfourn o/
07:09 secwang joined #perl6
07:09 llfourn how does one say not match: /[!<.ident>|'-']/ <= I'm trying to match a variable name
07:10 llfourn [!...] doesn't work obviously
07:11 llfourn m: 'a b'.subst(/<![\w]>+/,'',:g)
07:11 camelia rakudo-moar cd7766: OUTPUT«Memory allocation failed; could not allocate 974225408 bytes␤»
07:11 lizmat wow
07:12 llfourn while trying to figure it out I found that that hangs on forever :D
07:12 lizmat no, it just takes longer on your machine  :-)
07:12 llfourn I see :\
07:13 lizmat ah, it's the old + quantifier on a zero-width match
07:13 lizmat bug
07:13 llfourn ill submit it :)
07:13 lizmat no need, there are several already
07:13 llfourn lizmat: ah ok
07:14 llfourn when I said "I'm trying to match a variable name" I meant im trying to remove all sigils and twigils etc from a variable name with .subst
07:19 * llfourn figures it out by instead doing a positive match and capture
07:20 domidumont joined #perl6
07:21 CIAvash joined #perl6
07:24 edehont joined #perl6
07:25 dalek rakudo/nom: 00d0cc7 | lizmat++ | src/core/asyncops.pm:
07:25 dalek rakudo/nom: Make the awaiterator block in sink context
07:25 dalek rakudo/nom:
07:25 dalek rakudo/nom: One step closer to replacing await by the awaiterator.  Unfortunately,
07:25 dalek rakudo/nom: the awaiterator at the moment does not take Channels.  Not sure how
07:25 dalek rakudo/nom: to effectively and efficiently fix that yet.
07:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/00d0cc7c43
07:28 quester joined #perl6
07:29 espadrine_ joined #perl6
07:30 firstdayonthejob joined #perl6
07:31 bjz joined #perl6
07:31 pollei left #perl6
07:36 [Sno] joined #perl6
07:37 lizmat commute to EuroOSCON
07:39 FROGGS joined #perl6
07:39 ChoHag I have an object which is a Str with a role mixed in that does Positional. elems, AT-POS and EXIST-POS are all defined. How can I loop through all of its elements?
07:40 [Tux] test             50000    38.446    38.328
07:40 [Tux] test-t           50000    39.040    38.923
07:41 bjz joined #perl6
07:50 moritz ChoHag: you need to mix-in Iterable if you want it to be iterated over by map, for et. al
07:51 moritz ChoHag: but seriously, Str with Positional mixed in? Don't you want a proper, custom type instead?
07:51 ChoHag I don't know.
07:52 ChoHag I have too little programming time available to put serious thought into things, and I *do* want it to seem in most instances like a string, and in particular to be coercable to from a string.
07:54 ChoHag Generally the object will be looked at like it's a string or the final element of the list will be used in various additional calls.
07:54 ChoHag The fact that it's Positional is mostly an under-the-hood thing.
07:57 ChoHag Is there an example anywhere of writing an iterator?
07:58 ChoHag And is it worth upgrading from a pre-GLR perl? I'm wary of doing so lest I break code which currently works and get distracted working on that rather than this.
07:58 moritz ChoHag: not quite an example, but http://doc.perl6.org/type/Iterator documents the interface
07:59 moritz ChoHag: and yes, post-GLR is the future.
07:59 bjz joined #perl6
08:04 ChoHag I know it's the future, but is it the present and does it have an impact on writing an Iterator?
08:04 ChoHag The only/main thing I think I didn't get from the docs page is where/how to create the Iterator object.
08:05 ChoHag But you're right, documenting this stuff in the document rather than relying on examples is preferable.
08:05 Actualeyes joined #perl6
08:05 moritz ChoHag: the Iterable object must have a method "iterator"
08:05 moritz ChoHag: and yes, post-GLR is the present too, and it's required for a sane iterator API
08:06 ChoHag In that case: fiddlesticks.
08:06 ChoHag Here I go shaving another yak.
08:08 sitaram joined #perl6
08:14 darutoko joined #perl6
08:15 bjz joined #perl6
08:21 andreoss joined #perl6
08:24 bjz joined #perl6
08:29 lizmat joined #perl6
08:29 * lizmat waves from the Perl booth at EuroOSCON
08:30 * mrf waves back
08:31 * DrForr waves from ... well, his office. Exciting, I know.
08:32 mrf DrForr: I don't think its fair that you have an exciting office.
08:33 ely-se joined #perl6
08:36 DrForr Well, we *do* have a foosball table and X-Box.
08:38 mrf Well la de da :D
08:42 ChoHag My office has a 4 year old.
08:42 ChoHag It's certainly exciting.
08:42 sergot hi #perl6 \o
08:43 sergot timotimo: do you work on the qt-profiler?
08:47 ChoHag Is the GLR merged into 2015.10?
08:47 FROGGS ChoHag: yes, was merged in 2015.09 already
08:48 ChoHag Oh. Yeah I haven't been able to pay much attention recently.
08:49 softmoth joined #perl6
08:50 g4 joined #perl6
08:54 lizmat ChoHag o/
08:55 ChoHag Hi.
08:57 ChoHag e: class Foo is Iterator { multi method pull-one { "the other" } }
08:57 ChoHag m: class Foo is Iterator { multi method pull-one { "the other" } }
08:57 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H0IKLurIXR␤Method 'pull-one' must be implemented by Iterator because it is required by a role␤at /tmp/H0IKLurIXR:1␤»
08:58 moritz ChoHag: "does Iterator", not "is Iterator"
08:58 moritz it's a role
08:58 ChoHag m: class Foo does Iterator { multi method pull-one { "the other" } }
08:58 camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤Method 'pull-one' must be implemented by Foo because it is required by a role␤»
08:59 moritz m: class Foo does Iterator { method pull-one { "the other" } }
08:59 camelia rakudo-moar cd7766: ( no output )
08:59 moritz if you want multis, you need your onw proto there
08:59 ChoHag Oh right.
09:01 dakkar joined #perl6
09:03 quester left #perl6
09:04 llfourn I'm currently getting a hang on test 17 with: perl t/harness --verbosity=5 --moar t/spec/S05-transliteration/trans.rakudo.moar
09:04 ChoHag Right well (does Iterable)'s .map calls iterator but (does Iterator)'s pull-one seems to be ignored.
09:04 ChoHag Are there any other parts of Iterator which need to be implemented for basic operation?
09:07 espadrine joined #perl6
09:13 TEttinger joined #perl6
09:18 lolisa joined #perl6
09:31 tokuhiro_ joined #perl6
09:33 domidumont joined #perl6
09:34 cognominal joined #perl6
09:41 espadrine joined #perl6
09:42 brrt joined #perl6
09:42 brrt \o
09:50 timotimo heyo
09:50 timotimo tokuhirom, try this for an infinite list of a bunch of things:
09:50 timotimo m: my @list = <a b c>.Slip xx *; say @list[99]
09:50 camelia rakudo-moar cd7766: OUTPUT«a␤»
09:51 tokuhirom Slip!
09:51 timotimo .tell AlexDaniel you can use .Slip for the <foo bar baz> xx * thing to make it flat: <foo bar baz>.Slip xx * will give you a lazy list of these three elements repeated
09:51 yoleaux timotimo: I'll pass your message to AlexDaniel.
09:53 timotimo sergot: i've dug into the code a tiny bit, but not really much; do you have a specific question?
09:54 nowan_ joined #perl6
09:55 RabidGravy joined #perl6
09:56 rarara_ Hello, I have a question about the MAIN function: can it have an indefinite number of arguments?
09:56 bjz_ joined #perl6
09:57 brrt ohai timotimo
09:58 timotimo yeah, you can just use a *@rest parameter for your MAIN multi-sub, rarara_
09:58 timotimo ohai brrt
09:58 rindolf joined #perl6
09:59 nowan joined #perl6
10:06 edehont joined #perl6
10:09 sergot timotimo: no, I just wanted to get back to it recently :)
10:09 timotimo sounds good to me
10:09 timotimo i had started on a view for garbage collection data, but didn't get it to workh
10:10 timotimo and also we're lacking a widget that can show multiple colors for a single progress bar
10:10 dalek roast/curli: aa1a8a3 | (Stefan Seifert)++ | / (3 files):
10:10 dalek roast/curli: Don't use lib from inside a module
10:10 dalek roast/curli: review: https://github.com/perl6/roast/commit/aa1a8a3690
10:10 timotimo so if you want to fiddle around with painting manually ... ;)
10:10 dalek Heuristic branch merge: pushed 16 commits to rakudo/curli by niner
10:11 dakkar joined #perl6
10:15 rurban joined #perl6
10:16 donaldh joined #perl6
10:18 pmurias joined #perl6
10:28 spider-mario joined #perl6
10:31 Zoffix joined #perl6
10:37 ParsonsNose joined #perl6
10:37 lucasb_ joined #perl6
10:37 softmoth joined #perl6
10:41 dayangkun_ joined #perl6
10:42 bjz joined #perl6
10:44 dalek nqp: 57a0c2f | (Pawel Murias)++ | src/vm/js/nqp-runtime/ (2 files):
10:44 dalek nqp: [js] Make nqp::elems work correctly on things that have a 'is positional_delegate'.
10:44 dalek nqp: review: https://github.com/perl6/nqp/commit/57a0c2f633
10:44 dalek nqp: c8354e8 | (Pawel Murias)++ | t/nqp/73-delegation.t:
10:44 dalek nqp: Test that nqp::elems works correctly on things that have a 'is positional_delegate'.
10:44 dalek nqp: review: https://github.com/perl6/nqp/commit/c8354e837e
10:44 dalek nqp: 63f8d26 | (Pawel Murias)++ | t/nqp/11-sub.t:
10:44 dalek nqp: Print out a nice test number when outputing tap with a print from a test file.
10:44 dalek nqp: review: https://github.com/perl6/nqp/commit/63f8d267ae
10:44 dalek nqp: 8401f08 | (Pawel Murias)++ | src/vm/js/ (2 files):
10:44 dalek nqp: [js] Implement nqp::freshcoderef.
10:44 dalek nqp: review: https://github.com/perl6/nqp/commit/8401f0894b
10:44 dalek nqp: 6333c7e | (Pawel Murias)++ | src/vm/js/ (2 files):
10:44 dalek nqp: [js] Implement nqp::markcodestub. (The serialization doesn't yet take it into account).
10:44 dalek nqp: review: https://github.com/perl6/nqp/commit/6333c7e584
10:44 dalek nqp: 354b474 | (Pawel Murias)++ | src/QAST/Var.nqp:
10:44 dalek nqp: Dump the value/default of a QAST::Var when dumping the AST.
10:44 dalek nqp: review: https://github.com/perl6/nqp/commit/354b474949
10:46 zakharyas joined #perl6
10:47 weihan joined #perl6
10:51 azawawi joined #perl6
10:51 azawawi hi #perl6
10:51 azawawi how do I copy a folder recursively in Perl 6?
10:52 dalek roast/curli: cbe5c5a | lizmat++ | S02-types/WHICH.t:
10:52 dalek roast/curli: Add test for new X::Pragma::CannotPrecomp class
10:52 dalek roast/curli: review: https://github.com/perl6/roast/commit/cbe5c5a7a7
10:52 dalek roast/curli: fa871fd | lizmat++ | S02-types/WHICH.t:
10:52 dalek roast/curli: Add X::Package::UseLib
10:52 dalek roast/curli: review: https://github.com/perl6/roast/commit/fa871fd133
10:52 dalek roast/curli: 57a7ba6 | (Stefan Seifert)++ | S11-compunit/compunit-dependencyspecification.t:
10:52 dalek roast/curli: Test CompUnit::DependencySpecification
10:52 dalek roast/curli: review: https://github.com/perl6/roast/commit/57a7ba6cc2
10:52 dalek roast/curli: ad02a52 | (Stefan Seifert)++ | S11-compunit/compunit-repository.t:
10:52 dalek roast/curli: First tests for CompUnit::Repository
10:52 dalek roast/curli: review: https://github.com/perl6/roast/commit/ad02a52c6b
10:52 dalek roast/curli: 75a4abd | (Stefan Seifert)++ | S11-compunit/compunit-repository.t:
10:52 dalek roast/curli: Test if $*REPO is a CompUnit::Repository
10:52 dalek roast/curli: review: https://github.com/perl6/roast/commit/75a4abd141
10:52 dalek roast/curli: 140314a | (Stefan Seifert)++ | / (3 files):
10:52 dalek roast/curli: Don't use lib from inside a module
10:52 dalek roast/curli: review: https://github.com/perl6/roast/commit/140314a525
10:53 timotimo azawawi: personally, i'd shell out to cp; there's no way you'll implement every last little thing that's necessary for a proper copy; like soft/hard links, ACLs and extended attributes, selinux context, ...
10:53 timotimo or perhaps even rsync
10:55 azawawi timotimo: so basically depend on OS commands to do it as a first step until someone actually implements it :)
10:56 timotimo i think "copy a directory recursively" is one of those things that looks ridiculously simple at the surface, but has a whole bunch of details that can go wrong
10:56 timotimo and also you'd have to make a decision up front what kind of copying would be enough for you
10:57 nine also cp has --reflink=auto which may speed up copying tremendously on file systems like btrfs
10:58 timotimo is a reflink a bit like a hardlink, but more like "copy on write"?
10:58 nine It's exactly a copy on write. Which is why it works with a copy on write file system like btrfs or zfs
10:58 timotimo fair enough
10:59 lizmat joined #perl6
11:01 rarara_ timotimo: what is  the * in the *@rest parameter of MAIN multi ?
11:01 nine m: "Whfg nabgure Crey unpxre".trans("a .. z" => "n .. za .. m", "A .. Z" => "N .. ZA .. M")
11:01 camelia rakudo-moar cd7766: ( no output )
11:01 timotimo it makes it a slurpy
11:02 timotimo there's slurpy positional parameters, like *@args, and there's slurpy named parameters, like *%kwargs
11:02 rarara_ great!
11:02 rarara_ and what is the use of a non-slurpy @ parameter?
11:03 timotimo comparable to python where it'd be *args and **kwargs
11:03 timotimo that's for when you want to pass an array
11:03 llfourn m: say "Whfg nabgure Crey unpxre".trans('a .. z' => 'n .. za .. m', 'A .. Z' => 'N .. ZA .. M')
11:03 camelia rakudo-moar cd7766: OUTPUT«Whfg nnbgure Crey unpxre␤»
11:03 timotimo m: sub two_arrs(@one, @two) { say +@one; say +@two }; two_arrs <foo bar baz> <a b c d e f>
11:03 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RsmSfg3N_u␤Two terms in a row␤at /tmp/RsmSfg3N_u:1␤------> 3two }; two_arrs <foo bar baz> <a b c d e7⏏5 f>␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤       …»
11:03 timotimo m: sub two_arrs(@one, @two) { say +@one; say +@two }; two_arrs <foo bar baz>, <a b c d e f>
11:03 camelia rakudo-moar cd7766: OUTPUT«3␤6␤»
11:04 azawawi timotimo: i see. thanks for the info.
11:05 rarara_ timotimo thank you
11:05 timotimo you're welcome :)
11:07 lizmat llfourn nine can confirm the hang, but no idea why
11:07 kid51 joined #perl6
11:07 lizmat or how it could relate to the work I've done
11:07 llfourn lizmat: I'm on OS X
11:07 timotimo i've had a transliteration spectest OOM on me, too
11:08 llfourn lizmat: but I ran it on a debian container -- the test fails but it doesn't hang I think
11:10 llfourn lizmat: actually scratch that this hangs on my deb as well >perl6 -e "'Whfg nabgure Crey unpxre'.trans('a .. z' => 'n .. za .. m', 'A .. Z' => 'N .. ZA .. M')"
11:10 dalek rakudo/nom: f2ac7ee | lizmat++ | src/core/Supply.pm:
11:10 dalek rakudo/nom: Implement :vent-at for Supply.throttle
11:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f2ac7ee41d
11:10 llfourn but the test fails more gracefully
11:10 llfourn in the harness -- dunno why
11:11 llfourn ....but running the harness manually in my deb container like erl t/harness --fudge --moar --verbosity=5 t/spec/S05-transliteration/trans.t also hangs
11:11 * llfourn has no idea
11:14 ely-se joined #perl6
11:14 Actualeyes joined #perl6
11:17 leont joined #perl6
11:17 dolmen joined #perl6
11:17 dolmen I'm discovering the DateTime type: http://doc.perl6.org/type/DateTime
11:18 dolmen I'm surprised to see there isn't a TimeZone object
11:19 dolmen How are we supposed to handle dailylight saving time? Manually?
11:19 dolmen (Manually = without core support)
11:21 dolmen except this MAJOR issue, I like this API
11:21 dolmen (Date / DateTime api)
11:22 lizmat llfourn: it looks like it is picking the wromg MMD candidate... not the one that starts with a Pair  :-(
11:24 leont dolmen: AFAIK the primitives are there to build a DateTime::Timezone module
11:24 llfourn lizmat: I think I understand. So it loops in the MMD. Glad you found it :)
11:24 brrt dolmen: timezones are provided as integers... what is missing to you
11:26 brrt (let's just say that i would not a priori agree with the thesis that a timezone should be an object)
11:28 llfourn brrt: handling daylight savings? your UTC offset is not static...
11:28 timotimo unless you represent a timezone as "the whole thing", you can't implement traversal along the timeline "properly"
11:29 brrt but timestamps, which is what a datetime object is, do have a static UTC offset
11:29 brrt a clock object may have a timezone object, but for a timestamp object that is not true
11:30 dolmen brrt: my timezone is Europe/Paris. It was UTC+2 until saturday night and is now UTC+1. Will be back to UTC+2 in march. This happens every year. This is called daylight saving time.
11:30 brrt i'm familiar with the process
11:30 brrt :-)
11:30 dolmen brrt, when building a localtime object what matters is the timezone, not its offset right now
11:31 brrt disagreeish
11:32 dolmen brrt, DateTime.now.truncated-to('month') will not be DWIM if it returns a value in UTC+1 instead of UTC+2
11:33 brrt hmm.... i can see why that would be so. but then you're talking about calendar services, not timestamping
11:34 brrt basically, we're blending the functions of 'immutable representation of a certain point in time' and 'calculating jumps on a timeline'
11:34 dolmen brrt, timezone name is also very important for DateTime formatters
11:34 brrt and they're not the same
11:35 brrt hmm.. i can see why you would say that. but again, that's beside the point (imho)
11:35 brrt anyway, i have to go
11:35 brrt my opinions on this are not nearly as strong as i suggest
11:36 brrt :-)
11:36 llfourn dolmen: pretty much every language's main datetime thing handles TZ. I don't think you are crazy for expecting it.
11:36 dolmen brrt, DateTime are for human. Computer just need an Instant and an epoch
11:37 llfourn the decision was made (I'm guessing) so that implementations didn't have to worry about all those headaches and that one good community module could handle it for all of them
11:38 llfourn like DateTime in perl 5, moment.js etc
11:39 dolmen DateTime in perl 5 hase DateTime::TimeZone
11:40 RabidGravy there is a DateTime::TimeZone in the ecosystem
11:40 llfourn dolmen: ok I thought it was part of it all I remember is that when you parse a datetime string you can set which timezone it's meant to be in
11:40 llfourn dolmen: my point was that DateTime was a community module
11:40 RabidGravy if it doesn't do everything that is required, may I suggest sending patches to make that happen?
11:41 llfourn RabidGravy: according to spec it's not meant to handle TZ
11:41 mrf Datetime has a lot of issues with the method of its implementation. I would recommend speaking with zephram on '
11:41 mrf #london.pm if you want to know more
11:42 CIAvash joined #perl6
11:43 RabidGravy llfourn, DateTime::TimeZone er?
11:43 dolmen yes mrf is doing huge work with timezone in Perl 5, such as building infrastructure to rely on timezones available (an kept up to date) in the operating system
11:43 dolmen s/yes mrf/mrf: yes, Zefram/
11:43 llfourn RabidGravy: orite sorry I misinterpreted :)
11:43 * dolmen is going to lunch
11:44 mrf I generally would defer to Zefram on any Time related discussions.
11:46 tokuhiro_ joined #perl6
11:47 colomon joined #perl6
11:47 dakkar joined #perl6
11:51 colomon joined #perl6
11:59 eiro joined #perl6
12:03 rurban joined #perl6
12:04 RabidGravy is "is does of returns as handles will trusts hides" the complete list of "trait introducing words" or are there others hidden in the grammar?
12:06 llfourn RabidGravy: looking at the grammar atm and that seems to be it
12:07 RabidGravy this gleaned by 'grep proto src/core/traits.pm | grep -v '#' | sed -e 's/.*<//' -e 's/>.*//' | paste -s -d " " - -' for reference ;-)
12:08 llfourn grepping Grammar.nqp revlease the same although trusts doesn't seem to be there
12:08 llfourn reveals*
12:09 RabidGravy cheers
12:09 lucasb_ is "as" still a thing?
12:10 RabidGravy well apparently
12:11 lucasb_ btw, nice pipeline. I like pipelines :)
12:11 RabidGravy multi sub trait_mod:<as>(Parameter:D $param, $type)
12:11 RabidGravy :)
12:15 ollej joined #perl6
12:17 yqt joined #perl6
12:18 azawawi quick q, how do get a character array from a Perl 6 string?
12:19 dalek rakudo-star-daily: e8c874a | coke++ | log/ (8 files):
12:19 dalek rakudo-star-daily: today (automated commit)
12:19 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/e8c874a71f
12:19 dalek perl6-roast-data: 071969c | coke++ | / (9 files):
12:19 dalek perl6-roast-data: today (automated commit)
12:19 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/071969cdb3
12:19 nine azawawi: Str.comb
12:22 lucasb_ m: sub f(::Int() $x) { say $x }; f(Int())
12:22 camelia rakudo-moar cd7766: OUTPUT«(Int(Any))␤»
12:22 lucasb_ m: sub f($x as Int()) { say $x }; f(Int())
12:22 camelia rakudo-moar cd7766: OUTPUT«(Int(Any))␤»
12:22 azawawi nine: thanks though it is no intuitive
12:22 lucasb_ ^^ just showing an interesting thing I found. coercion types as first class things :)
12:23 lucasb_ I know, it doesn't make sense to mix "as" and Type() syntax
12:23 nine azawawi: true. No one seems to think first of a hair comb when trying to split a string into characters
12:24 azawawi nine: and split has extra '' behavior around an array
12:24 azawawi m: say "Perl 6".split('').perl;
12:24 camelia rakudo-moar cd7766: OUTPUT«("", "P", "e", "r", "l", " ", "6", "").Seq␤»
12:25 softmoth joined #perl6
12:27 * pink_mist would have expected there to be a :trim argument to split
12:29 pink_mist (and that that was how comb was implemented)
12:32 RabidGravy comb is somewhat the reverse of split, though the degenerate case has a similar effect
12:36 Begi1114 joined #perl6
12:37 kolikov joined #perl6
12:38 kolikov Hi perl6 !
12:38 AlexDaniel joined #perl6
12:38 lucasb_ Just for the record, nevermind my previous example of using ::Int() as paramenter type. It is totally wrong.
12:39 Skarsnik joined #perl6
12:39 lucasb_ m: sub f(::Int $x) {}
12:39 camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤You cannot create an instance of this type␤»
12:39 lucasb_ m: sub f(::Int() $x) { say $x }; f('abc')
12:39 camelia rakudo-moar cd7766: OUTPUT«abc␤»
12:40 lucasb_ the first one is ok: you can't capture a type in Int, because Int already exists
12:40 lucasb_ the second one I don't know what it means. ::Int() should be the same type of the argument, which is a string
12:44 loren joined #perl6
12:46 lucasb_ m: sub f(::foo() $x) { say ::('foo()') }; f('abc')
12:46 camelia rakudo-moar cd7766: OUTPUT«(Str)␤»
12:47 lucasb_ ^^ See? the type Str got captured in a type called 'foo()'. it has nothing to do with coercions. don't know why the parentheses are allowed :)
12:47 sufrostico joined #perl6
12:48 llfourn I didn't even know you could capture the type in subs o.o
12:48 kolikov m: say ('a','b','c').first:k: /a/;
12:48 camelia rakudo-moar cd7766: OUTPUT«a␤»
12:49 kolikov should not :k cature the index of list since 2015.43 ??
12:50 ShimmerFairy m: say ('a','b','c').first: :k, /a/;
12:50 camelia rakudo-moar cd7766: OUTPUT«0␤»
12:50 ShimmerFairy ^^^ that's how you use adverbs when using  .foo:  syntax
12:50 kolikov Thanks ShimmerFairy :)
12:51 ShimmerFairy you're welcome :)
12:53 lucasb_ m: 'oh'.say:a:b:c
12:53 camelia rakudo-moar cd7766: OUTPUT«oh␤»
12:54 lizmat the .trans hang seems xx related
12:54 zakharyas joined #perl6
12:54 lucasb_ ^^ don't know where those adverds end up; they are silently ignored
12:55 Skarsnik hm, I have a dumb question about Nativecall. why str in CStruct does not work to represent const *char? but Str work, I mean it does not corrupt the data.
12:55 lizmat m: (my $ = "foo") xx -1   # the hang is found
12:55 camelia rakudo-moar cd7766: ( no output )
12:55 lizmat huh?
12:56 lizmat hangs for me locally
12:57 lizmat star: dd (my $ = "foo") xx -1
12:57 camelia star-m 2015.09: OUTPUT«().Seq␤»
12:57 lizmat m: dd (my $ = "foo") xx -1
12:57 camelia rakudo-moar cd7766: OUTPUT«Seq $var = ().Seq␤»
12:59 azawawi https://github.com/azawawi/perl6-selenium-webdriver/blob/master/examples/ex02.t # Automated Firefox testing is now working. Have fun :)
13:00 ][Sno][ joined #perl6
13:07 lizmat azawawi++
13:07 RabidGravy azawawi++ # nice job
13:07 mrf score azawawi++
13:08 kolikov m: say ('aa','a').first(:kv,/^^ a $$/);
13:08 camelia rakudo-moar cd7766: OUTPUT«Unexpected adverb 'kv' passed to first on List␤  in block <unit> at /tmp/twM_W2ukEc:1␤␤Actually thrown at:␤  in block <unit> at /tmp/twM_W2ukEc:1␤␤»
13:08 kolikov m: say ('aa','a').first(:p,/^^ a $$/);
13:08 camelia rakudo-moar cd7766: OUTPUT«1 => a␤»
13:09 AlexDaniel .tell timotimo “azawawi: personally, i'd shell out to cp” – noooo… use “run”, you don't need the shell to call “cp“ command…
13:09 yoleaux 09:51Z <timotimo> AlexDaniel: you can use .Slip for the <foo bar baz> xx * thing to make it flat: <foo bar baz>.Slip xx * will give you a lazy list of these three elements repeated
13:09 yoleaux AlexDaniel: I'll pass your message to timotimo.
13:10 lizmat kolikov: that seems wrong  :-)
13:10 aborazmeh joined #perl6
13:10 aborazmeh joined #perl6
13:10 rurban joined #perl6
13:11 kolikov first() returns list or pair ?
13:12 dalek rakudo/nom: 421022d | lizmat++ | src/core/Str.pm:
13:12 dalek rakudo/nom: Make sure all candidates have same invocant sig
13:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/421022dcd6
13:12 dalek rakudo/nom: c93e637 | lizmat++ | src/core/List.pm:
13:12 dalek rakudo/nom: Fix for hang in t/spec/S05-transliteration/trans.t
13:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c93e6379d5
13:12 nowan_ joined #perl6
13:13 lizmat kolikov: ah, yes: grep allows for kv, but for first it doesn't make much sense
13:13 lizmat as it always returns a single thing, not a List
13:14 lizmat so if you want the position, you would need to use :p
13:14 edehont joined #perl6
13:15 kolikov - lizmat the adverb (:k,:p,:v) is not specifying the return type in that case ?
13:17 lizmat well, depends on what you're firsting on, of course
13:17 lizmat but it always returns a single scalar
13:17 nowan joined #perl6
13:17 lizmat :kv would then be a really odd one out, so I figured I'd better no do it
13:20 kolikov - lizmat , ok suits me fine, and the error message on adverb is quite explict, so ... :)
13:21 takadonet morning all
13:22 domidumont joined #perl6
13:26 domidumont joined #perl6
13:26 telex joined #perl6
13:29 domidumont joined #perl6
13:32 n0tjack joined #perl6
13:32 travis-ci joined #perl6
13:32 tokuhiro_ joined #perl6
13:38 skids joined #perl6
13:39 sufrostico joined #perl6
13:40 azawawi AlexDaniel: ping
13:40 AlexDaniel yes
13:40 azawawi AlexDaniel: maybe you need to use shell if you need globbing?
13:41 AlexDaniel azawawi: for quick and dirty scripts, maybe
13:42 AlexDaniel azawawi: otherwise you can find your files in perl6 and then just pass them to run
13:42 * AlexDaniel has to go
13:43 azawawi AlexDaniel: thanks and cya
13:46 lizmat .tell masak hejki told us to say hi to you at EuroOSCON
13:46 yoleaux lizmat: I'll pass your message to masak.
13:48 n0tjack .tell yoleaux define recursion
13:48 yoleaux n0tjack: Thanks for the message.
13:48 lucasb_ no recursion :(
13:49 n0tjack lucasb_: it was just TCO'd away ;)
13:53 gfldex m: https://gist.github.com/gfldex/57c6deea4b5244f69d09
13:53 camelia rakudo-moar cd7766: OUTPUT«1) f has been entered␤3) here be dragons␤6) no, I'm dead␤»
13:53 gfldex should the LEAVE be executed in that case?
13:54 gfldex i'm asking because without the CATCH it is
13:56 pink_mist http://design.perl6.org/S04.html#Phasers mentions it should also fire LEAVE when there are exceptions, so I'd expect that to also be true for handled exceptions
13:58 lizmat yeah, jnthn fixed some bugs related to that not too long before is holiday
13:58 lizmat m: use nqp; sub a is raw { nqp::list(1,2,3) }; dd nqp::atpos(a,0)   # works as expected
13:58 camelia rakudo-moar cd7766: OUTPUT«Int $var = 1␤»
13:59 lizmat m: use nqp; class A { method a is raw { nqp::list(1,2,3) } }; dd nqp::atpos(A.a,0)   # but not when it's a class method ?
13:59 camelia rakudo-moar cd7766: OUTPUT«This type does not support positional operations␤  in block <unit> at /tmp/aeUoqsG7zP:1␤␤»
13:59 PerlJam gfldex: if you s/die/fail/ the LEAVE phaser gets executed too
13:59 lizmat timotimo masak moritz : is there a reason for this, or is this some bug / NYI ?
14:01 moritz lizmat: no idea
14:01 gfldex PerlJam: is that intentional?
14:01 lizmat it's stopping me from moving internal subs to class methods in Rakudo::Internals
14:01 riatre joined #perl6
14:01 PerlJam gfldex: I dunno.
14:02 softmoth joined #perl6
14:02 PerlJam gfldex: I would have expected the LEAVE phaser to fire no matter what.
14:02 lizmat m: use nqp; class A { our sub a is raw { nqp::list(1,2,3) } }; dd nqp::atpos(A::a,0)   # our subs work, but are like 20x slower
14:02 camelia rakudo-moar cd7766: OUTPUT«Int $var = 1␤»
14:02 lizmat so not really an option  :-(
14:06 lucasb_ gfldex: Isn't the problem that 'exit 1' inside CATCH? If you remove it, then I think LEAVE gets executed.
14:07 bbarker So what Linux distributions are people using Rakudo Star on with relative ease?
14:10 gfldex lucasb_: that does indeed work. However, that just moves the bug around.
14:10 leont Meh. MAIN doesn't support having both short and long ended names arguments apparently ( :l(:$lib)) )
14:10 moritz bbarker: Debian (though I build R* from source)
14:10 leont Is that intentional or an oversight?
14:11 moritz leont: doesn't sound intentional
14:11 RabidGravy bbarker, I primarily use Fedora though have Debian on the raspberry pis
14:12 Skarsnik Hello, hm what did I do wrong with named argument? http://pastebin.com/NKN3EaSD
14:12 raiph joined #perl6
14:13 RabidGravy Skarsnik, there are no named arguments to print_xml
14:13 RabidGravy named arguments are prefixed by :
14:13 RabidGravy eg print_xml (:$xmldoc, :$cpt = 0, :$tag_only = False)
14:14 gfldex Skarsnik: see http://design.perl6.org/S06.html#Named_arguments
14:15 Skarsnik I think I stumble on an old doc or I did not see you have to do something special in the declaration
14:15 Skarsnik thx
14:16 Skarsnik hm, can't use the ordered call when there are tagged as named?
14:17 * gfldex .oO( Death to all old docs! Long live the revolution! )
14:18 n0tjack Skarsnik: named and positional arguments are distinct in p6 -- an argument is either named or it is position
14:18 n0tjack al
14:19 n0tjack Skarsnik: you can mix the two; positional arguments first, then named arguments
14:22 Skarsnik Another question: I want to use the tests from another module (html::parser::xml) for the module I am writing (does the same thing) should I do a fake h:p:x module that call mine. Or is thre a way to replace the call in some way?
14:23 lizmat FROGGS: so how serious is the http://irclog.perlgeek.de/perl6/2015-10-24#i_11428957 issue that psch mentioned?
14:24 lizmat I've been able to build JVM until now, will that soon change ?
14:24 FROGGS lizmat: I can't build perl6-j since saturday...
14:25 FROGGS lizmat: maybe this depends on the jvm one uses
14:25 lizmat oh?  hmmm...
14:25 bbarker Thanks moritz and RabidGravy
14:26 FROGGS lizmat: cd77669d09d38e5ddb89ee8f6c8392bacebdf829 works, while the patch afterwards results in a "Class file too large"
14:26 * lizmat is double checking
14:27 dalek perl6-roast-data: e9eb244 | coke++ | / (9 files):
14:27 dalek perl6-roast-data: today (automated commit)
14:27 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/e9eb24406b
14:27 FROGGS lizmat: I use oracle jdk atm btw
14:28 lizmat argh, confirmed
14:29 FROGGS lizmat: as I understand we split methods already, but not classes
14:30 jdv79 does it make sense to have some sort of write once attr trait?
14:31 jdv79 its like to have the attr type obj determine the class (.= new) and that's hard to do when you want immutable attrs
14:31 jdv79 s/like/nice/
14:32 * [Coke] tries a jvm build on his local box.
14:34 ely-se joined #perl6
14:37 khw joined #perl6
14:41 [Coke] ayup, class file too large.
14:41 * llfourn also has Class file too large!
14:44 leont Meh, I just wanted to build my first perl6-j today!
14:48 RabidGravy jdv79, on the face of it that wouldn't be too hard to make: trait applies a role to the Attribute object that over-rides the set-value to do it with a flag to indicate it has been set once
14:50 RabidGravy or something like that
14:50 jdv79 maybe i'll try to do that someday.  right now maybe i'll just multi in a setter that dies if the attr is defined.
14:52 Aggressively_Alp joined #perl6
14:52 lizmat I'm working on the P6W, please let me know of anything newsworthy!
14:52 [Coke] lizmat: the release.
14:53 lizmat hehe... like I could forget that  :-)
14:53 RabidGravy I for one have nothing useful to report, lots of crack induced ideas but they don't count
14:53 gfldex lizmat: it may be worth to note that rosettacode got some Perl 6 love. Some post-GLR fallout has been fixed but there may be more and help, both with spotting and with fixing, is very welcome.
15:04 lizmat one way to fix the JVM size issue, is to make the core smaller by expelling some features to lib and autoload them when needed
15:04 lizmat Sets/Bags/Mixes come to mind there, e.g. ?
15:08 * FROGGS really really hates javascript... in a browser... on a phone... when it is buggy and does not report errors
15:10 RabidGravy yeah, I think the only javascript I've every actually enjoyed was some Node server stuff I made in my last job
15:11 ely-se joined #perl6
15:13 CIAvash joined #perl6
15:15 tony-o i like javascript, i don't like that copying a jquery widget makes people think they *know* js
15:15 boggard the server side is the last place i'd want to see javascript.
15:15 ely-se nowhere is where I want to see JavaScript
15:16 tony-o replace it with ecmascript
15:16 FROGGS I like javascript when I am able to debug it
15:16 ely-se JavaScript is ECMAScript
15:16 tony-o i know..
15:16 ely-se FROGGS: :)
15:17 leont FROGGS: I once had to deal with a javascripted system where the main HTML inlined about half a megabyte of minified javascript, and that's without external libs such as jquery, and without the iframes :-/
15:18 FROGGS ohh dear
15:18 FROGGS though, I have to support BlackBerry, beat that :P
15:19 leont Needless to say, I never really understood what was going on, but it produced pretty graphs
15:23 hoelzro o/ #perl6
15:23 lizmat hoelzro o/
15:24 rarara_ Hello, in an action, the input object returns an "orig", a "to" and a "from" field. If I want to extract the matched text should I do ".orig.substr(.from, .to).subst("\n","", :g) given $match;" or is there a cheaper way?
15:25 hoelzro o/ lizmat
15:25 FROGGS rarara_: just do ~$/
15:25 rarara_ FROGGS could you explain me a bit?
15:26 RabidGravy "stringify the match object"
15:26 abaugher joined #perl6
15:26 ely-se line noise
15:26 rarara_ ok
15:27 dakkar a propos of grammars… has anyone tried to write a grammar to parse something indentation-dependent, like Python?
15:27 FROGGS rarara_: ~$/ is like $/.Str, and $/ usually is your match object
15:27 dakkar (I'd like to have a ReStructured Text parser)
15:27 FROGGS rarara_: and .orig.substr(.from, .to) is basically what Match.Str does internalls
15:27 FROGGS internally*
15:27 leont dakkar: I have a YAML parser
15:27 dalek doc: e5dd523 | (Lloyd Fournier)++ | doc/Language/faq.pod:
15:27 dalek doc: Noted spec on faq
15:27 dalek doc: review: https://github.com/perl6/doc/commit/e5dd523535
15:28 dakkar leont: that may be enough to give me some idea; link?
15:28 FROGGS dakkar: there is snake, which is written in nqp and is a Pythonish thing
15:28 FROGGS rarara_: if your input param is $_, then just call .Str on that one
15:28 FROGGS rarara_: or $match.Str
15:28 RabidGravy I think we need a COBOL parser
15:29 dakkar leont: oh, YAMList, found it
15:29 dakkar s/t,/h,/
15:29 RabidGravy just for shits and giggles
15:29 tokuhirom joined #perl6
15:29 AndyDee joined #perl6
15:30 leont RabidGravy: writing a hybrid environment that allows one to switch from COBOL to a modern language gracefully may actually be a viable thing, TBH
15:31 dakkar leont: yep, that trick with :temp $*yaml-indent is exactly what I was missing
15:31 dakkar now I "only" have to understand it properly :)
15:31 leont Yeah, it took some experimentation to get it to work :-)
15:34 ely-se parsing COBOL is easy
15:34 RabidGravy leont, it's entirely possibly that one could just feed https://github.com/antlr/grammars-v4/tree/master/cobol85 to DrForr's ANTLR4 and take it from there
15:36 * DrForr pricks his ears up.
15:36 dakkar leont: what lifetime / storage / visibility does a «my $*foo» have?
15:36 DrForr It's in the corpus/ directory, I believe.
15:36 AlexDaniel joined #perl6
15:37 leont dakkar: it's dynamic, that's why I explicitly define them in parse/subparse
15:38 dakkar "dynamic" does not mean much to me… I'm missing things :)
15:38 dakkar the actual doubt I have: if two threads run that grammar at the same time, will they interfere?
15:38 leont "not lexical"
15:38 leont No
15:38 leont It's looked up in the callstack, going up until it finds a $*variable with the right name
15:39 dakkar finally, non-package 'local' :)
15:39 DrForr RabidGravy: The last main issue I've got to fix is parsing stops at 'mode' tokens.
15:40 RabidGravy :)
15:46 petercommand joined #perl6
15:53 * [Coke] hopes he's not the only one who reads "awaiterator" in Doofenschmirtz's voice.
15:54 [Coke] lizmat: what is Supply.throttle(:$vent-at) do? (needs docs for http://docs.perl6.org/type/Supply#method_throttle)
15:55 [Coke] *does
15:55 lizmat it gives the value at which any buffered messages are bled of to the bleed supply
15:55 lizmat *off
15:57 [Coke] "bleed" also doesn't appear anywhere in the Supply docs.
15:58 [Coke] nor "message"
15:58 [Coke] I'll open a doc ticket.
16:08 |Tux| joined #perl6
16:08 yqt joined #perl6
16:12 RabidGravy is there an example in the spec test (or elsewhere) of EVALing a class definition in a string and trying to use it?
16:14 Alina-malina joined #perl6
16:14 RabidGravy or is that even possible? I might be missing something as I can't get it to work
16:17 RabidGravy never mind, getting confused between shell quotes and perl quotes
16:19 [Coke] if you're EVAL'ing a class definition, you should look into using the MOP directly instead.
16:21 RabidGravy normally yes, but this is for a basic test of some method traits (i.e. that it compiles)
16:21 [Coke] ok
16:24 * [Coke] looks for MOP in the spec test suite and fails to find anything.
16:24 RabidGravy ew
16:27 hahainternet so if i was implementing a class which does Positional, is there any good example I can look at? I'm sure there is in the source but i'd like to find something clean and readable to a non perl6-er
16:30 diana_olhovik joined #perl6
16:34 RabidGravy hahainternet, https://github.com/zostay/perl6-ArrayHash/blob/master/lib/ArrayHash.pm6 does Positional *and* Associative just for fun
16:34 dalek doc: b22d12a | (Lloyd Fournier)++ | doc/Type/Callable.pod:
16:34 dalek doc: doc .assuming
16:34 dalek doc: review: https://github.com/perl6/doc/commit/b22d12abe6
16:34 RabidGravy if you only want Positional you can ignore the *-KEY methods ;-)
16:34 pollei joined #perl6
16:35 hahainternet RabidGravy: looks good, but i'm confused as to how positional is defined
16:35 hahainternet the only method listed under its role is 'of'
16:35 hahainternet but this is called with no args, no return and is passed through by your example
16:35 hahainternet i guess i'm missing something key here
16:36 hahainternet ah, http://doc.perl6.org/language/subscripts#Custom_types
16:36 hahainternet would be nice if there was some easy association between Positional -> these methods
16:38 DrParisInHolland joined #perl6
16:39 quuxman left #perl6
16:42 loren joined #perl6
16:46 rarara_ is it correct that: my $seq = ~$/; is read only? how to copy the content?
16:51 lizmat joined #perl6
16:51 psch rarara_: what content to you want to change?
16:51 hahainternet RabidGravy: ok so lets say i do class MyClass is Array
16:51 hahainternet but i want to be ale to catch 'after push'
16:51 hahainternet i could have sworn i saw this in p6 docs, method modifiers?
16:51 hahainternet but i can't find it again now
16:51 psch rarara_: ~$/ gives you the stringified last match object, which is a Str, which are immutable
16:52 rarara_ psch I found a workaround
16:53 rarara_ I think I understand the rule
16:53 rarara_ now
16:54 perigrin left #perl6
16:54 n0tjack joined #perl6
16:54 lizmat commute to AmsterdamX.PM&
16:54 n0tjack I know I've asked this before but I forgot the answer: how do I do weighted random selection?
16:55 psch m: say <a a a b b c>.Bag.pick: 3
16:55 camelia rakudo-moar cd7766: OUTPUT«(c b a)␤»
16:55 psch m: say <a a a b b c>.Bag.pick: 3
16:55 camelia rakudo-moar cd7766: OUTPUT«(a b c)␤»
16:55 psch m: say <a a a b b c>.Bag.pick: 3
16:55 camelia rakudo-moar cd7766: OUTPUT«(b a c)␤»
16:55 psch what are the odds
16:55 psch m: say <a a a b b c>.Bag.pick: 3
16:55 camelia rakudo-moar cd7766: OUTPUT«(a a a)␤»
16:55 RabidGravy hahainternet, there are no "method modifiers" per se, there is a wrap() on a Method, but in this case you probably want something like:
16:56 n0tjack hmm, I was thinking more along the lines of {foo => 1.23 , bar => 4.56, baz => 1e6}
16:56 kolikov left #perl6
16:56 n0tjack which would almost always pick baz
16:56 xfix joined #perl6
16:56 psch m: (foo => 1.23 , bar => 4.56, baz => 1e6).Bag.pick(3)
16:56 camelia rakudo-moar cd7766: OUTPUT«Type check failed in assignment; expected Int but got Rat␤  in block <unit> at /tmp/W_ADKmaxpn:1␤␤»
16:56 psch hm, Mix?
16:56 RabidGravy m: class G is Array { method push(|c) { my $f = callsame; say "push"; $f }}; my $g = G.new; $g.push("h"); say $g.perl
16:56 camelia rakudo-moar cd7766: OUTPUT«push␤$["h"]␤»
16:56 psch m: (foo => 1.23 , bar => 4.56, baz => 1e6).Mix.pick(3)
16:56 camelia rakudo-moar cd7766: OUTPUT«.pick is not supported on a Mix␤  in block <unit> at /tmp/Z_uRWv9Mpj:1␤␤Actually thrown at:␤  in block <unit> at /tmp/Z_uRWv9Mpj:1␤␤»
16:56 psch no
16:57 n0tjack timtoady showed me a cool method but it slipped my mind :/
16:57 hahainternet RabidGravy: yeah i'm with you, callsame is what i was looking for
16:57 hahainternet although i must say i'm a little confused about the signature of push
16:58 hahainternet seems like it'd never work with a string
16:59 mayuresh joined #perl6
16:59 hahainternet (not the one you list, but the one on http://doc.perl6.org/type/Array#routine_push )
16:59 mayuresh hello, again! :)
16:59 mayuresh guess what, i am back.
17:00 mayuresh relatively speaking, the other other project's community is very grumpy
17:00 mayuresh i love it out here a lot more
17:00 psch n0tjack: not sure, i guess you'd have to browse the clog
17:00 diana_olhovik_ joined #perl6
17:00 n0tjack psch: Eh, I'll whip something up
17:01 mayuresh i am going to continue pursuing my interest in developing the 'pxn'. :)
17:01 n0tjack first step is to find a cute way to sort %h.keys by %h.values
17:01 mayuresh btw, how does timtoady manage to stay so slim inspite of his love for pepsi?
17:01 hahainternet n0tjack: sort on kv, compare keys in the sort block? seems logical
17:01 hahainternet i'm no p6 expert though laff
17:02 mayuresh mr. wall must be quite disciplined in the amount of pepsi he consumes, i guess.
17:02 rhr joined #perl6
17:03 psch m: my %h = foo => 1.23 , bar => 4.56, baz => 1e6; %h.antipairs.sort.say
17:03 camelia rakudo-moar cd7766: OUTPUT«(1.23 => foo 4.56 => bar 1000000 => baz)␤»
17:03 psch but then the value is the key and the key is the value :P
17:04 dha joined #perl6
17:04 mayuresh psch, that's quite like yin-yang, isn't it?
17:04 n0tjack psch: antipairs, cute :)
17:05 psch mayuresh: it might be yang-yin like.. :)
17:05 mayuresh :D
17:05 mayuresh if you like that kind of stuff, check out https://medium.com/@mayureshkathe
17:06 mayuresh it has some pretty wild ideas about reality and existence. :)
17:06 psch uh, i was just making a pun, not getting philosophical :)
17:06 mayuresh lol :D
17:07 n0tjack making a pun? in a perl channel? scandal!
17:07 mayuresh very!
17:07 hahainternet RabidGravy: yeah so it looks like the only thing that confuses me (i noticed i need an |@ ?) is the subroutine signature of push
17:07 tony-o wtf did i just look at
17:07 psch n0tjack: as the .Bag error above alludes to, .Bag works with Ints, which means normalizing your weights could get you .Bag.pick, which might be good enough
17:08 tony-o hahainternet: you need the |@ if you want to push the elements flatly onto the array
17:08 psch n0tjack: not sure if normalizing is less work than reimplementing a Rat-aware weighted random though :)
17:08 hahainternet tony-o: no i get the flattening, what i mean is: http://doc.perl6.org/type/Array#routine_push
17:08 hahainternet if i am 'overriding' ie wrapping this
17:08 tony-o ah ^
17:08 hahainternet what's with its complex signature that i don't understand :)
17:08 hahainternet ok, a defined array (Whch is not what i'm pushing), but **@values just reminds me of python
17:08 hahainternet just some docs pointers would be fine thx
17:09 tony-o are you confused by the sub/method sigs?
17:09 n0tjack psch: Yeah, normalizing works fine
17:09 tony-o or the Array:D thing
17:09 n0tjack psch: Right now I'm fiddlign with doing it directly ([\+] %h.values) X/ ([+] %h.values) firstless 1.rand;
17:10 RabidGravy I'm not sure that the doc is completely up to date with the actual implementation, it's a multi
17:10 mayuresh this channel does have nice people, knowledgeable and intelligent, yet well grounded.
17:10 n0tjack though firstless isn't as pretty as I'd like it to be
17:10 n0tjack mayuresh: yeah, then you have me.
17:10 n0tjack ;)
17:10 hahainternet tony-o: Array:D: just means a defined array afaik, i'm confused by **@values
17:10 gfldex hahainternet: http://design.perl6.org/S06.html#Multidimensional_argument_list_binding
17:10 mayuresh :D
17:10 hahainternet gfldex: ok so that's as i expected
17:11 hahainternet but surely this doesn't work with .push("Hi")
17:11 hahainternet that's not an array in any dimensions
17:11 jnthn joined #perl6
17:11 tony-o it does, it's slurping all values into an array when that method is called
17:11 tony-o m: sub r (*@a) { @a.perl.say; }; r("hi");
17:11 camelia rakudo-moar cd7766: OUTPUT«["hi"]␤»
17:11 n0tjack anyone who complains about perl6's startup time clearly is not being forced to use Eclipse in any other part of their profession :/
17:12 mayuresh of the past 40 hours, i slept only 5, and spent the rest trying to figure out that other project's community. didn't like it as much there.
17:12 mayuresh eclipse is painful, groan.
17:12 tony-o n0tjack: eclipse start up times are probably 40% of wikipedia's page read time
17:12 RabidGravy hahainternet, it's a multi with single value candidates
17:12 mayuresh infact, even netbeans is better.
17:12 mayuresh but p6 via rakudo+moarvm doesn't have too many problems on my machine.
17:13 hahainternet RabidGravy: but where are the single value candidates?
17:13 n0tjack all my company's tools are Eclipse based
17:13 hahainternet are they just not listed in the docs?
17:13 n0tjack I mean once it's going it's full featured and very configurable
17:13 n0tjack but also brittle
17:13 hahainternet or are they seamless calls to another function, append or whatever
17:13 tony-o it sucks to use.  vim++
17:13 mayuresh but i still feel uncomfortable about the fact that they are two separate projects and disparate code bases.
17:13 RabidGravy hahainternet, that's what I meant when I said "I'm not sure that the doc is completely up to date with the actual implementation, it's a multi" ;-)
17:14 mayuresh perhaps a result of having worked with smalltalk! ;)
17:14 hahainternet RabidGravy: roger that
17:14 RabidGravy :)
17:14 hahainternet RabidGravy: answered my question thoroughly too, thank you very much for your time, and you tony-o and gfldex
17:14 hahainternet i'll just assume there's a multi with (|@values) or similar hanging about ;)
17:14 hahainternet certainly meets my requirements
17:15 hahainternet one other thing, the reply with my p6 version doesn't do so well with up/down keys and history, is this something that exists already that i'm missing
17:15 hahainternet or is it something for the future
17:16 [Coke] install the Linenoise module
17:16 mayuresh heya [coke]!
17:16 mayuresh how have you been?
17:17 ^elyse^ joined #perl6
17:17 hahainternet [Coke]: didn't even have panda :(
17:17 hahainternet shows how well my rakudo setup is configured
17:18 n0tjack eclipse on a remote desktop with a shakey wifi connection == productivity
17:18 mayuresh n0tjack, how about eclipse on a remote desktop over a packet-radio link?
17:19 n0tjack mayuresh: gives me plenty of time to practice perl6...
17:19 mayuresh :D
17:21 mayuresh i think, as the leader is, so is his community, else either the community dies off, or the leader gets the boot.
17:21 mayuresh that's why the perl community is so nice.
17:22 FROGGS OT: does somebody know of a datamatrix decoder for javascript? or that can be ported to javascript in a reasonable amount of time?
17:22 mayuresh froogs, search for "marijn haverbeke".
17:22 mayuresh he's good at writing such stuff, might be able to help you.
17:23 mayuresh i meant, froggs!
17:23 mayuresh :\
17:23 mbrock joined #perl6
17:23 ugexe m: (^5).map: { if $^a > 3 { say $_; say $^a; }; } # this seems strange
17:23 camelia rakudo-moar cd7766: OUTPUT«(Any)␤True␤»
17:23 FROGGS mayuresh: I'll get in touch with him, thank you :o)
17:23 mayuresh froggs, you are welcome. :)
17:24 kaare_ joined #perl6
17:25 RabidGravy is there some non-obvious way I can intercept the parameter binding for a routine? like I want to do something to the parameter value before it gets bound?
17:25 moritz RabidGravy: you can wrap a routine
17:26 moritz RabidGravy: and/or bind to a capture parameter, which binds as raw as possible
17:26 RabidGravy what I have in mind is a parameter trait, so wrapping doesn't help there
17:27 * RabidGravy looks at Parameter
17:27 llfourn joined #perl6
17:28 virtualsue joined #perl6
17:29 tony-o hahainternet: this seems relevant: http://doc.perl6.org/type/Signature#Slurpy_(A.K.A._Variadic)_Parameters
17:29 psch hm, can we already declare coercion for user types?
17:29 psch that's what RabidGravy's question makes me think about, fwiw
17:30 RabidGravy psch, that's part of what I want to do actually
17:31 psch RabidGravy: what's the other part(s), ooc?
17:31 RabidGravy you *can* do coercion of user types,  but Foo(Str) requires a .Foo method
17:31 RabidGravy on Str
17:31 mayuresh so, if i understood it right, the p6 specification evolved as the prototype implementations succeded or failed!
17:32 tony-o hahainternet: http://design.perl6.org/S06.html#Multidimensional_argument_list_binding
17:32 RabidGravy psch, so I want to capture the parameter binding to apply a role that makes that happen (for the coercion case)
17:33 RabidGravy it's all fun until someone gets hurt
17:34 * [Coke] does not like coercions, and would prefer if the callers passed in the declared type.
17:34 moritz https://twitter.com/TheLandonHarris/status/658693980155154432 # this tweet is in context of Patrick Rothfuss not being very fast with writing his sequels, and people telling him what (not) to do to get them out faster
17:35 moritz but I couldn't help thinking of TimToady++'s last keynote :-)
17:36 RabidGravy [Coke], yeah infact multis make this so easy coercions are largely un-neccessary except for the very simplest of cases
17:36 mayuresh moritz, can you please share a link for that last keynote?
17:36 tony-o m: sub r ($a where { "binding".say; $_; }) { $a.say; }; r("hello"); # RabidGravy
17:36 camelia rakudo-moar cd7766: OUTPUT«binding␤hello␤»
17:37 RabidGravy tony-o, of course
17:37 RabidGravy :)
17:38 dha moritz - Rothfuss is supposed to be on the next JoCo cruise. I haven't read his books, but he's interesting to listen to, so I say to hell with the books, let him go on cruises. :-)
17:38 tony-o not sure if that gets you to your goal, i'm working and only half reading
17:38 patrickz joined #perl6
17:38 moritz dha: I quite enjoyed his books, it's some of the best High Fantasy (I guess) since... dunno, LOTR comes to mind :-)
17:39 dha I've heard good things. I just haven't read much fiction in a while, and the PR stuff looks like a big commitment...
17:39 dha Maybe I should read some before the cruise.
17:40 moritz mayuresh: https://www.youtube.com/watch?v=RvCkvXvqi3U&amp;list=PLsYEfmwhBQdJV3BMrucH7D9ZW3tMj30Z2
17:40 boggard can we please go back to calling him jonathan coulton?
17:41 tony-o negative
17:41 mayuresh moritz, thanks for that link.
17:41 RabidGravy tony-o, possibly but it helps me understand what is going on, I hadn't actually considered it to be open to abuse like that ;-)
17:41 boggard :(
17:41 mayuresh oh, mr. wall has a pony tail!
17:41 dha boggard-  I tend to. But I call the cruise JoCo
17:42 tony-o RabidGravy: the other thing that might work is wrapping or augmenting Attribute.new
17:42 dha As, it seems, that is what it is called. More specifically "JoCo Cruise Crazy"
17:43 tony-o m: class A { has $!priv = 'private'; }; my A $a .=new; say Attribute.new(:name('$!priv'), :type(Mu), :package(A)).get_value($a);
17:43 camelia rakudo-moar cd7766: OUTPUT«private␤»
17:43 tony-o m: class A { has $!priv = 'private'; }; my A $a .=new; say Attribute.new(:name('$!priv'), :type(Mu), :package(A)).^methods;
17:43 camelia rakudo-moar cd7766: OUTPUT«(<anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> compose apply_handles get_value set_value container has-accessor readonly package inlined WHY set_why Str gist)␤»
17:43 tony-o set_value ^^
17:44 RabidGravy yaw
17:48 n0tjack joined #perl6
17:51 nowan_ joined #perl6
17:52 boggard :(
17:53 n0tjack joined #perl6
17:55 mayuresh mr. wall's keynote is really a lot of fun.
17:56 mayuresh positive and enthusiastic.
17:56 mayuresh very infectious.
17:56 mayuresh :)
17:56 RabidGravy it's the crack, it can't be helped
17:57 mayuresh crack??
17:57 mayuresh is that some kind of a drug?
17:57 tony-o poor version of cocaine
17:57 RabidGravy er, yes
17:57 ugexe sodium bicarbonate and cocaine
17:57 mayuresh umnn, wouldn't that just make it coca cola!
17:58 mayuresh hmnn, or as in mr. wall's case, probably "pepsi". ;)
17:58 ugexe well you have to heat it up and whip the mixture while it bubbles unlike coca cola
17:59 mayuresh perhaps coca cola is pre-heated and then cooled to make it easy to consume!
17:59 mayuresh :)
18:01 moznion joined #perl6
18:07 mayuresh i tried coca cola, pepsi and thumbs-up.
18:08 mayuresh prefer pepsi, it's smoother and sweeter.
18:08 boggard rc>*
18:08 mayuresh thumbs-up is very much indian, spicy.
18:08 mayuresh coca cola, was very salty.
18:08 boggard salty?
18:08 mayuresh yeah, it felt like very acrid
18:09 mayuresh guess, that's like a combination of salty and sour.
18:09 boggard rc cola is still the best.
18:10 boggard and you're the only person i've ever heard describe coca cola as "salty".
18:10 [Coke] coke zero is best cola.
18:10 [Coke] I admit... I may be slightly biased.
18:10 mayuresh what's "coke zero"?
18:10 mayuresh is that like diet-coke?
18:10 mayuresh boggard, yeah, very acrid.
18:10 dha I... think so. But more... zero-y.
18:11 dha ?
18:11 dha *shrug*
18:11 boggard diet coke is very much NOT the same as coke zero.
18:11 [Coke] zero calorie coke (phenylaline and acesulfame potassium)
18:11 [Coke] diet coke has different syrup and different fake sweetener.
18:11 mbrock left #perl6
18:11 tony-o [Coke]++
18:11 ][Sno][ joined #perl6
18:12 [Coke] it is zero calorie (yay, diabetes!) and tastes like I remember Coke tasting before new coke/coke classic
18:12 [Coke] I am sure it doesn't, but it is best cola. :)
18:12 boggard they use the same sweetener.
18:12 boggard http://foodwatch.com.au/blog/additives-and-labels/item/q-what-s-the-difference-between-diet-coke-and-coke-zero.html
18:12 * [Coke] opens one of the 7 remaining cans on his desk.
18:13 lucasb_ joined #perl6
18:13 boggard coke zero has less caffeine
18:13 mayuresh you have 7 cans on your desk! radical.
18:13 dha less caffeine? what's the point?
18:13 tony-o i'm still on coffee today
18:13 * itz_stmu1 has been experimenting with Pepsi Max since it's significantly cheaper in his part of the world
18:13 [Coke] boggard: no, diet coke has no ace-k
18:13 boggard [full disclosure: i don't caffeine]
18:14 [Coke] they both have aspartame, though, sure.
18:14 boggard [Coke]: /me shrugs
18:14 boggard that link said they both have ace-k
18:14 boggard and i don't drink colas personally
18:14 dha I find diet sodas generally vile.
18:14 mayuresh dha +1.
18:15 dha But I don't drink a lot of soda nowadays anyway. Tea. Lots of tea.
18:15 * moritz likes Irn Bru. Scotland has infected me.
18:15 boggard i prefer for me carbonated beverages to contain alcohol instead of caffeine.
18:15 TimToady note that's a .au site, rules could be different down under
18:15 mayuresh rotflmao. :D
18:16 kjs_ joined #perl6
18:17 novapatch i'm at the Internationalization & Unicode Conference (#IUC39) this week, which will give me a chance to show off unicode in p6
18:17 TimToady \o/
18:17 Oatmeal joined #perl6
18:19 novapatch https://twitter.com/novapatch/status/658705447986294785
18:19 Oatmeal joined #perl6
18:21 TimToady novapatch: if you really wanted to show off, you'd use smartquotes around the 3 chars :)
18:21 * itz_stmu1 likes Club Mate. Germany has infected me.
18:21 * [Coke] opens RT #126461 for the jvm build bug
18:23 timotimo .o( just gimme a pepsi free )
18:23 yoleaux 13:09Z <AlexDaniel> timotimo: “azawawi: personally, i'd shell out to cp” – noooo… use “run”, you don't need the shell to call “cp“ command…
18:23 novapatch TimToady: oh my! :D
18:23 TimToady I find it slightly hilarious that the followup tweet thinks ???? is two characters
18:24 timotimo AlexDaniel: i said "shell out to" to circumvent having to decide between shell(), run(), QX, P::A, .. ;)
18:24 timotimo the left half of ???? looks like the "char not found in font" symbol you sometimes get to see :D
18:25 mayuresh i am connected via "ircii", and all those weird characters are painful. ;)
18:25 mayuresh they just show up as little light coloured diamonds.
18:25 TimToady irssi does much better
18:25 timotimo also, when typing on the LHS of that character in my input line, all letters appeared in the same spot consecutively and when i hit "end" to type text afterwards, the cursor was far to the right with a lot of blank space after that symbol :D
18:25 lucasb_ I only see question marks and boxes with hexadecimals in it. someday I'll get my fonts & encoding configuration right.
18:26 TimToady we plan to drag the world kicking and screaming into the 1990s
18:26 mayuresh :D
18:26 boggard ascii for life.
18:26 mayuresh boggard, +1.
18:27 timotimo to be fair, i also get the diamond in this setup i have here
18:27 timotimo but i think it's probably gnome-terminal's fault?
18:27 timotimo maybe it's more likely that it's missing fonts
18:27 TimToady I'm using gnome-terminal, and it seems fine
18:27 boggard imho, we're missing a great opportunity to use computing as a tool to twist humanity's arm into using a single character set.
18:28 FROGGS joined #perl6
18:29 TimToady actually, that's precisely what we're doing, only that single characer set is not ASCII :P
18:29 mayuresh :)
18:30 boggard sorry, i meant a single character set of reasonable size.
18:30 FROGGS o/
18:30 dha Maybe we should just simplify it down to a single character.
18:30 mayuresh o/
18:30 boggard \o/
18:30 TimToady Unicode is of reasonable size, if you're a sufficiently good reasoner.
18:30 * FROGGS takes a closer look at his wardrobe
18:32 mayuresh :)
18:34 kmel joined #perl6
18:35 xfix joined #perl6
18:36 boggard 7 bits oughta be enough for anybody.
18:36 FROGGS and 64k RAM...
18:36 boggard 640k
18:37 brrt joined #perl6
18:37 mayuresh boggard, you should be in the "forth" channel.
18:37 dha In my day, we stored data on cassette tapes, AND WE LIKED IT.
18:38 boggard mayuresh: i didn't know forth was still a thing.
18:38 mayuresh it very much is, check the channel, they have it out here too.
18:38 brrt ohai #perl6
18:38 FROGGS hi brrt
18:38 novapatch is it a known issue that extended grapheme clusters are not (yet) supported?
18:38 novapatch m: say «நி กำ षि "\r\n"»».chars
18:38 camelia rakudo-moar cd7766: OUTPUT«(2 2 2 2)␤»
18:39 brrt i'm afraid i must insist with regards to the datetime offset being static
18:39 boggard either way, i profess my love of ascii and consequent hatred of utf8 as someone whose native tongue doesn't play well with ascii.
18:39 brrt or rather
18:39 FROGGS novapatch: is that related? https://rt.perl.org/rt3/Ticket/Display.html?id=125927
18:39 brrt that i must insist in the difference between a calendar or clock object and a time-instant
18:40 TimToady novapatch: I believe so; jnthn++ has been working on that in some branch or other
18:40 nowan joined #perl6
18:40 brrt a time-instant *must* have a static utc-offset if the timezone thing is meaningful at all
18:40 leont Proc::Async really needs a merge option for std{out,err}. Merging the streams later kills the synchronization that would exist on a properly merged stream
18:41 yuppie joined #perl6
18:41 yuppie joined #perl6
18:41 TimToady novapatch: and it's definitely in the plan to fix it
18:42 novapatch FROGGS: yes, in fact that uses one of the same examples
18:42 FROGGS leont: same goes for Proc, but I have no idea how to merge streams using libuv
18:42 FROGGS novapatch: do you want to add your examples or shall I?
18:42 leont AFAIK proc already handles that
18:43 novapatch FROGGS: feel free, thanks
18:43 FROGGS leont: that's news to me
18:43 leont It just passes the new stdout as stderr
18:44 novapatch TimToady: great. \r\n is bound to surprise some :)
18:44 leont Mind, I haven't tested if it works correctly, but it looks correct at first sight
18:45 FROGGS leont: that should be the code I added, and using the :merge option makes moar segfault :S
18:46 * leont goes testing it
18:46 FROGGS erl6 -e 'say shell("ls", :merge).out.lines'
18:46 FROGGS Abgebrochen (Speicherabzug geschrieben)
18:47 FROGGS err, that's lacking a p
18:47 lucasb_ cool, erlang 6
18:47 leont Hmmm, it seems you're right.
18:47 FROGGS lucasb_: :D
18:47 kjs_ joined #perl6
18:48 leont I thought I had tested it, but I quickly moved on to !err (which to me is more sensible in TAP anyway, I'd really like a better solution to how to present that :-/
18:48 n0tjack m: say :4th;
18:48 camelia rakudo-moar cd7766: OUTPUT«Unexpected named parameter 'th' passed␤  in block <unit> at /tmp/hTWOJkziKC:1␤␤»
18:48 n0tjack m: say (:4th);
18:48 camelia rakudo-moar cd7766: OUTPUT«th => 4␤»
18:48 n0tjack heh weird
18:50 n0tjack m: say (:really :stacked);
18:50 camelia rakudo-moar cd7766: OUTPUT«(really => True stacked => 1)␤»
18:54 timotimo weird.
18:55 FROGGS :S
18:55 n0tjack m: say (:a :b :c :d :e);
18:55 camelia rakudo-moar cd7766: OUTPUT«(a => True b => 1 c => 1 d => 1 e => 1)␤»
18:55 n0tjack heh
18:55 FROGGS I dont like the code where that is handled
18:56 timotimo well, the place we hunt stacked adverbs needs a tiny adjustment ...
18:56 domidumont joined #perl6
18:56 timotimo i've had my hands in that code ... i'm not proud of what i've done
18:56 n0tjack the benefit of being a "user" and not a "contributor" is clean hands and a blissful ignorance
18:57 FROGGS well, I'm not saying there is an obvious cleaner solution... I just say that I do not enjoy working at it :o)
18:57 TimToady n0tjack: but once you've said that, your conscience can no longer be clean :)
18:58 n0tjack TimToady: I'm sorry, I can't hear you through this thick layer of ignorance.
18:59 timotimo FROGGS: yeah
18:59 rindolf Hi all, sup?
18:59 mayuresh o/
18:59 FROGGS hi rindolf
18:59 rindolf FROGGS: how are you?
19:00 FROGGS rindolf: fine, thanks :o)
19:06 n0tjack m: say (:a0 (:a1 (:a2) ) );
19:06 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PILfTLwkil␤Two terms in a row␤at /tmp/PILfTLwkil:1␤------> 3say (:a07⏏5 (:a1 (:a2) ) );␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement mo…»
19:06 n0tjack m: say (:a0(:a1(:a2)));
19:06 camelia rakudo-moar cd7766: OUTPUT«a0 => a1 => a2 => True␤»
19:06 n0tjack sup with that
19:06 mayuresh gah, that's killed my terminal colours.
19:06 mayuresh i gotta go now, it's past mid-night, time to sleep.
19:07 n0tjack I get a0 => a1 => a2 => True but I don't get why whitespace is significant
19:07 mayuresh and yeah, i am now not going away, ever again, hopefully ... :)
19:07 n0tjack night mayuresh
19:07 mayuresh :)
19:07 FROGGS gnight mayuresh
19:08 FROGGS n0tjack: because :foo( ... ) composes a pair
19:08 mayuresh froggs; hope you receive help from marijn for your javascript problem.
19:08 FROGGS mayuresh: we'll see :o)
19:08 n0tjack FROGGS: and :foo(...) doesn't?
19:08 n0tjack I thought adverbs were just pairs "attached" to something
19:08 timotimo it does, but :foo (...) doesn't
19:09 FROGGS n0tjack: and :foo (... is a pair (foo => True) followed by a term
19:09 FROGGS so, two terms in a row
19:09 n0tjack ah, ah, I see
19:09 n0tjack thanks
19:11 dha joined #perl6
19:11 n0tjack m: say (:0xDEADBEEFhi);
19:11 camelia rakudo-moar cd7766: OUTPUT«xDEADBEEFhi => 0␤»
19:12 n0tjack m: say (:1e6hello);
19:12 camelia rakudo-moar cd7766: OUTPUT«e6hello => 1␤»
19:12 rindolf Can anyone tell me how to make this program faster? The original Perl 5 script (same dir) runs much faster - https://bitbucket.org/shlomif/project-euler/src/be77378c28378e6250d77b181ae438136ae98bc9/project-euler/294/euler-294-v1.p6?at=default&amp;fileviewer=file-view-default
19:12 n0tjack m: say (:1.23hithere);
19:12 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lcjUA0_l7_␤Malformed radix number␤at /tmp/lcjUA0_l7_:1␤------> 3say (:17⏏5.23hithere);␤    expecting any of:␤        number in radix notation␤»
19:12 dalek rakudo/nom: ab91aea | FROGGS++ | src/Perl6/Actions.nqp:
19:12 dalek rakudo/nom: fix T(Foo) when T was captured as ::T
19:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ab91aeaf44
19:13 timotimo huh, perl6 has no expmod built-in?
19:13 FROGGS m: sub foo(::T $a) { say T(Cool) }; foo 42 # that's what the patch fixes
19:13 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xHKd2LQhIn␤Target type too complex to form a coercion type␤at /tmp/xHKd2LQhIn:1␤------> 3sub foo(::T $a) { say T(Cool)7⏏5 }; foo 42 # that's what the patch fixes␤»
19:13 timotimo rindolf: if you're interested to do a bit of digging yourself, you can try running perl6 --profile
19:14 rindolf timotimo: OK.
19:14 timotimo i may do digging myself later today
19:14 timotimo but don't bet on it
19:15 n0tjack rindolf: Off the top of my head, I can't remember where I read it, but I believe p6 has exp_mod built-in
19:15 FROGGS n0tjack: the colon of a pair constructor must be followed by an identifier
19:15 n0tjack FROGGS: not in the case of e.g. :4th
19:15 n0tjack that's th => 4
19:15 n0tjack I was just probing the boundaries of what counts as a number
19:15 FROGGS true
19:15 n0tjack turns out, just decimal integers
19:15 timotimo rindolf: i have a patch almost-working that makes for loops over ranges faster again
19:16 rindolf n0tjack: OK, it isn't called a lot.
19:16 timotimo rindolf: until then you can get the same result by writing your for loops as "loop (my $low_ds = 0; $low_ds < $DIGITS_SUM; $low_ds = $low_ds + 1) { ... }"
19:16 rindolf timotimo: ah.
19:17 rindolf timotimo: that's ugly.
19:17 timotimo yes, it is
19:17 timotimo in the future, the code will be transformed in the background for you when compiling
19:17 timotimo and it won't be ugly at all any more
19:17 timotimo until then, with that change you can measure how big the impact of that might be
19:18 tokuhiro_ joined #perl6
19:20 vendethiel joined #perl6
19:20 espadrine joined #perl6
19:21 timotimo rindolf: can you tell me your timings for both scripts and what exact version of rakudo and moarvm you have?
19:23 rindolf timotimo: how do I tell that?
19:24 timotimo just "time perl6 foobar.p6" and then "time perl foo.pl"
19:24 rindolf timotimo: it's real    0m2.652s for perl 5.
19:25 timotimo it'd also be interesting to know if any of those variables need to hold big integers, or if you could type them all as "int"
19:25 rindolf timotimo: http://www.shlomifish.org/Files/files/text/profile-1445887357.87291.html.xz - this is the perl 6 profile
19:25 timotimo with that, i'll be off for a little commute
19:25 rindolf timotimo: they can all be ints.
19:26 rindolf well, 64-bit ones.
19:26 timotimo if your system is 64bit, so are our ints
19:27 timotimo ah, it's "only" 18 megabytes big
19:27 timotimo ... browser is churning ...
19:28 timotimo rindolf: we have a "fast path" in moarvm for big integers that fit into 32bits, where the upper 32bit of what is otherwise the pointer to a big int thingie get turned into a flag
19:28 timotimo but it's still very costly in comparison to a native int, as those are stored in exactly 64bit in ram while they are being calculated with (though our boxing-removal may not be perfect, or even good)
19:29 lucasb_ m: my ::foo $x
19:29 camelia rakudo-moar cd7766: ( no output )
19:29 lucasb_ ^^ should this die, since foo is not known at compile time?
19:30 pollei left #perl6
19:32 n0tjack m: say ::whaa;
19:32 camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol whaa␤»
19:32 n0tjack m: say my ::whaa;
19:32 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5===␤Type 'whaa' is not declared␤at /tmp/_ZaBDd6G77:1␤------> 3say my ::whaa7⏏5;␤Malformed my␤at /tmp/_ZaBDd6G77:1␤------> 3say my ::whaa7⏏5;␤␤»
19:33 [Coke] m: my ::foo $x = 3; say "alive";
19:33 camelia rakudo-moar cd7766: OUTPUT«Type check failed in assignment to $x; expected foo but got Int␤  in block <unit> at /tmp/67hS_O6N2e:1␤␤»
19:33 [Coke] That seems not unreasonable.
19:33 timotimo perhaps it gets stubbed there?
19:34 travis-ci joined #perl6
19:36 lucasb_ m: class Str {}; class Bool {}; class Num {}; say 'hi'
19:36 camelia rakudo-moar cd7766: OUTPUT«===SORRY!===␤This type cannot box a native string␤»
19:37 lucasb_ sorry, nonsense eval :)
19:42 domidumont joined #perl6
19:43 zengargoyle is there anything like --profile for the rakudo level?  ala NTYProf?  (wish i could understand the --profile stuff )
19:43 _dolmen_ joined #perl6
19:44 pyrimidi_ joined #perl6
19:44 llfourn joined #perl6
19:45 FROGGS zengargoyle: try: perl6-m --profile-compile -e 'say 42'
19:45 n0tjack joined #perl6
19:45 domidumont joined #perl6
19:45 timotimo i think zengargoyle means a line-profiler
19:45 [Coke] What do you mean "for the rakudo level"? it's there...
20:00 cognominal joined #perl6
20:00 zengargoyle yeah, more like NYTProf or something that shows which subroutines / lines of my code are the time takers
20:01 zengargoyle my poor laptop can't even load the --profile-compile for a non-trivial program.
20:04 RabidGravy I don't think so
20:05 jnthn zengargoyle: It *does* show you the subroutines that are the time takers; if you just want to restrict it to subroutines in your script then type (some chars from) the name of your script into the name filter box at the to of the routines tab. It mostly *looks* overwhelming 'cus it includes where time is spent inside of the Perl 6 built-ins too
20:05 yoleaux 20 Oct 2015 21:31Z <tony-o> jnthn: i've submitted a PR for Grammar::Debugger to fix Grammar::Tracer for most recent rakudo build
20:06 yoleaux 23 Oct 2015 02:39Z <[Coke]> jnthn: When you return, if you can build a tarball of the last moarvm tag we did while you were gone and upload that to the moarvm download site, jnthn++
20:06 yoleaux 25 Oct 2015 21:00Z <vendethiel> jnthn: on your blog, http://jnthn.net/papers/2008-fpw-rakudo-slides.pdf is broken
20:06 kjs_ joined #perl6
20:06 vendethiel I did say that.
20:06 vendethiel Hi, #perl6.
20:12 * jnthn is never going to manage to backlog 8 days worth, so will patiently wait for lizmat++ to post the p6weekly to find out what happened :)
20:14 * [Coke] again is stymied by not being able to use panda on the work network.
20:17 zengargoyle yeah, the --profile is 1.8M and won't filter on my subroutines, the --profile-compile is 34M and too much for my machine
20:17 [Coke] switched to non work network; tried to install IO::Socket::SSL - dies with a Find::Bundled not found.
20:18 jnthn zengargoyle: "won't filter"?
20:18 [Coke] We could probably add something to the profile.html that lets you exclude the setting, or pick a specific file
20:18 jnthn zengargoyle: --profile-compile is not likely to be of interest
20:18 jnthn [Coke]: Aye, or build entirely different frontends to the info :)
20:18 zengargoyle i type one of my subroutine names in the search box and it isn't there...
20:18 jnthn zengargoyle: Maybe it wasn't called?
20:19 zengargoyle definately called.
20:19 lichtkind joined #perl6
20:20 apotheon joined #perl6
20:21 [Coke] looks like a panda bug - IO::Socket::SSL depends on openssl, which depends on Find::Bundled, but that isn't installed.
20:21 zengargoyle i have a 'is-solved()' that's called a bunch and on the #routines section all i see is is-lazy and is-absolute
20:22 jnthn zengargoyle: Then I'd be interested on how to reproduce it; I've not yet known the profiler to *miss* stuff, and if it is then I'd like to fix it
20:22 retupmoca [Coke]: 'panda update'?
20:23 retupmoca [Coke]: Find::Bundled is new as of this past weekend
20:23 yqt joined #perl6
20:24 zengargoyle i'll gather up some stuff it's a problem sover for a /r/dailyprogrammer challenge that uses some of the concurrency stuff.
20:24 [Coke] if ppanda is smart enough to grab the latest version of the code, why doesn't it grab the corresponding version of META.info ?
20:24 zengargoyle i'd rather you look at https://rt.perl.org/Public/Bug/Display.html?id=126454 which i found while working on it. :)
20:25 [Coke] Or report that the META.info has changed, and that perhaps a panda update is in order?
20:25 jnthn zengargoyle: Well, I wasn't planning earliest to survive until Christmas...
20:25 flussence jnthn: tl;dr of this week: a bunch more of lizmat++'s "x% faster" commit messages, someone asking for a solaris tracing feature in moarvm, a long debate over qx{} being nasty and should go away etc, some other stuff
20:27 jnthn flussence: Thanks. Did TimToady++ weigh in on the qx thing?
20:27 jnthn (if you saw)
20:28 FROGGS I didn't see nothing
20:28 flussence I haven't paid much attention [or that tl;dr would be more l :)], don't think so though
20:28 jnthn k
20:28 jnthn I hope he isn't hoping to leave me to rule on that :P
20:29 flussence oh and lizmat made an await-ish thingy that works in for loops, that looked kinda neat.
20:29 jnthn Yeah, I saw it in the commit log, but I sure ain't clever enough to review concurrency stuff this evening :)
20:29 [Coke] cosimo: if I want http_proxy support, will LWP::Simple support that?
20:30 [Coke] I know tickets about it were closed, but it's not working here. :)
20:31 geraud joined #perl6
20:32 RabidGravy jnthn, also funny deadlock thing in require tickled by creating URI objects in a thread
20:33 ^elyse^ joined #perl6
20:34 jnthn In...require? As in the require keyword?
20:34 FROGGS jnthn: there is a Lock in CompUnit.load IIRC
20:34 FROGGS so, probably yes
20:34 RabidGravy yeah, so it seems, though this may be a  mis-diagnosis
20:34 jnthn k...RT'd?
20:35 RabidGravy RT #126390
20:35 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126390
20:35 jnthn OK, thanks
20:35 apotheon joined #perl6
20:37 FROGGS RabidGravy: let that man rest :o)
20:38 jnthn Well, not going to work on any of these tonight, just getting an idea of what's been going on :)
20:38 itz_stmu1 wb jnthn++
20:38 jnthn And what people hope might get my tuits in the nearish future :)
20:39 RabidGravy no, no. the house isn't on fire ;-)
20:39 itz_stmu1 precomp!
20:39 zengargoyle jnthn: cool, i'll worry about earliest or whatever at a later date.  here's the code i was trying to profile: https://gist.github.com/zengargoyle/88083fdafb5507d63ef4
20:39 kmel how do i install p6doc?
20:39 FROGGS itz_stmu1: others are working on it :o)
20:39 itz_stmu1 others++
20:39 kmel panda install pedoc?
20:39 RabidGravy yeah
20:39 kmel p6doc**
20:39 PerlJam kmel: yeah, withouth the typo
20:40 PerlJam heh, typo irony
20:40 RabidGravy downloads the data and everything
20:40 [Sno] joined #perl6
20:40 * jnthn smiles at d70ff74d4c. Ain't nothin' wrong 'bout U+0027 ;)
20:41 kmel weird, it doesn't show in panda list
20:42 jnthn zengargoyle: Thanks; added to my "to look at" list :)
20:42 kjs_ joined #perl6
20:43 kmel done. thanks PerlJam RabidGravy
20:44 [Coke] jnthn: that particular one got reverted.
20:45 * FROGGS spectests a fix for RT #126383
20:45 [Coke] ilmari++'s note made sense at first, but I got a comment on the commit with citations!
20:45 [Coke] they are still unicody, though.
20:46 zengargoyle joined #perl6
20:48 RabidGravy [Coke], that comment tickled me, it just shows how geeks will form armed camps of conflicting opinion on the slightest pretext
20:49 [Coke] With great vim, even.
20:49 RabidGravy same as people really quite seriously freaking out over the number spaces after a full-stop in English text
20:49 FROGGS RabidGravy: NUMBER *OF* SPACES! ò.ó
20:50 * FROGGS .oO( RAGE!!11 )
20:50 boggard number of spaces? how are spaces delimited?
20:50 FROGGS *g*
20:50 boggard i figured empty space would be a continuous quantity, not a discrete one. or are we talking about quantum lengths here?
20:51 boggard s/quantum/planck/
20:51 boggard sorry, it's monday.
20:52 RabidGravy some of us learned to type on typewriters
20:52 n0tjack joined #perl6
20:53 PerlJam mechanical or electric?
20:53 FROGGS heh, imagine a unicode extension :o)
20:53 boggard well now you're talking about typesetting, not english text in general.
20:53 RabidGravy mechanical
20:54 n0tjack m: »ö«;
20:54 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MTxXc3RTlw␤Missing infix inside hyper␤at /tmp/MTxXc3RTlw:1␤------> 3»7⏏5ö«;␤    expecting any of:␤        infix␤        infix stopper␤»
20:54 boggard english text can also be hand printed, or even hand written in script. in these contexts, "number of spaces" is meaningless.
20:54 * geekosaur *eyeroll*
20:54 n0tjack m: sub infix:<ö> ($a, $b) { say "surprise!"}; »ö«;
20:54 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DlxOGF3P7J␤Preceding context expects a term, but found infix »ö« instead␤at /tmp/DlxOGF3P7J:1␤------> 3fix:<ö> ($a, $b) { say "surprise!"}; »ö«7⏏5;␤»
20:54 * RabidGravy readies the pedant bat
20:54 * geekosaur also from the age of mechanical typewriters. kids these days wouldn't believe...
20:54 boggard perhaps you may find this distinction pedantic, but i think it's very much relevant in the context of spacing following a full stop.
20:55 Sgeo joined #perl6
20:55 dalek rakudo/nom: 6902d51 | FROGGS++ | src/Perl6/ (2 files):
20:55 dalek rakudo/nom: handle genertic types in coercions on params
20:55 dalek rakudo/nom:
20:55 dalek rakudo/nom: As in: sub foo(::T $a, T() $b) { ... } - fixes RT #126383
20:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6902d51eb7
20:55 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126383
20:55 n0tjack I say split the difference: 1.5 spaces after a period.
20:55 boggard particularly since most modern desktop publishing solutions take care of kerning intelligently in a way that renders this whole debate moot.
20:56 boggard kerning != 'number of spaces'.
20:56 boggard the very idea that some quantified 'number of spaces' should follow a full stop is now dated.
20:56 n0tjack m: say "We must all learn to compromise.  All of us.";
20:56 camelia rakudo-moar cd7766: OUTPUT«We must all learn to compromise.  All of us.␤»
20:56 n0tjack heh
20:56 [Coke] but given that how it renders often has little to do with the bytes in the file, eh. I was raised on 2 spaces for typing out documents, but try hard to keep it to one when doing anything electronic.
20:57 * n0tjack types two out of habit, not religion
20:57 n0tjack .u
20:57 yoleaux U+2002 EN SPACE [Zs] ( )
20:57 boggard so, if we're talking about plain text in a file, indeed, kerning isn't something that should be encoded in the file bytes.
20:57 boggard that's why using 2 spaces makes no sense.
20:58 geekosaur back in typewriter days it mattered, at least to some authorities who would reject manuscripts if you didn't use 2 spaces
20:58 n0tjack m: say "\x200A";
20:58 camelia rakudo-moar cd7766: OUTPUT« ␤»
20:58 n0tjack .u
20:58 yoleaux U+200A HAIR SPACE [Zs] ( )
20:59 Hotkeys I just use one space and let microtype handle making everything look nice
20:59 ilbot3 joined #perl6
20:59 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
20:59 n0tjack I didn't either, but my teachers did
21:00 boggard in an era of typewriters and monospaced fonts, it made sense. but that aera is over.
21:00 Hotkeys I just write all the documents for which I care about presentation in latex
21:00 Hotkeys it handles it well enough
21:00 n0tjack boggard: in certain contexts it still makes sense. on one mailing list I participate in, the web interface renders everything monospaced (because there's such a high code:prose ratio).
21:01 boggard valid point, but i'm still not sure how i feel about that.
21:01 dalek roast: 7f43444 | FROGGS++ | S06-signature/type-capture.t:
21:01 dalek roast: add tests for foo(::T, T(Any)) { ... }
21:01 dalek roast: review: https://github.com/perl6/roast/commit/7f43444370
21:02 boggard i never really understood the justification for the whole 'two spaces after a full stop' thing to begin with.
21:02 patrickz Hi! I want to do a "use lib '../lib';" which works irrespective of the cwd. Does Perl6 offer anything or do I need to fiddle using $*PROGRAM or similar?
21:02 n0tjack boggard: in monospaced text, it really is easier to pick out the beginning of sentences that way.
21:02 n0tjack one thing I never understood was indenting the first line of a para.
21:03 n0tjack unless the para is directly beneath the former with no intervening blank lines. then it makes sense.
21:03 moritz m: say $*PROGRAM.parent
21:03 camelia rakudo-moar cd7766: OUTPUT«"/tmp".IO␤»
21:03 moritz patrickz: nothing explicitly built in, afaict
21:04 FROGGS patrickz: seems to work here:
21:04 FROGGS ~/dev/rakudo$ perl6 -e 'BEGIN chdir ".."; use lib "$*CWD/../lib"; say @*INC[0]'
21:04 FROGGS file#/home/froggs/dev/../lib
21:04 moritz eeks, don't chdir in BEGIN
21:04 FROGGS ~/dev/rakudo$ perl6 -e 'BEGIN chdir ".."; use lib "../lib"; say @*INC[0]'
21:04 FROGGS file#../lib
21:04 FROGGS :o)
21:05 moritz unless you really want to confuse yourself :-)
21:05 n0tjack m: [xx] (3,2,1);
21:05 camelia rakudo-moar cd7766: ( no output )
21:05 patrickz use lib $*PROGRAM.parent ~ '../lib'; # That does it
21:05 n0tjack m: say [xx] (3,2,1);
21:05 camelia rakudo-moar cd7766: OUTPUT«((3 3))␤»
21:06 n0tjack m: say [xx] (4,3,2,1);
21:06 camelia rakudo-moar cd7766: OUTPUT«(((4 4 4) (4 4 4)))␤»
21:06 n0tjack m: say [Rxx] (4,3,2,1);
21:06 camelia rakudo-moar cd7766: OUTPUT«(((1 1) (1 1) (1 1)) ((1 1) (1 1) (1 1)) ((1 1) (1 1) (1 1)) ((1 1) (1 1) (1 1)))␤»
21:06 patrickz moritz: Thanks!
21:06 gfldex are there any operators beside // and [//] that look for definedness?
21:07 moritz gfldex: andthen, orelse iirc
21:07 n0tjack m: say Nil iirc 3; # nope
21:07 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6mVcAhvo_T␤Two terms in a row␤at /tmp/6mVcAhvo_T:1␤------> 3say Nil7⏏5 iirc 3; # nope␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤    …»
21:08 n0tjack though now I'm gonna make an iirc op
21:08 FROGGS :P
21:08 Hotkeys lol
21:09 FROGGS gnight
21:09 boggard n0tjack: but in what situation do you ever find yourself scanning over a large block of monospaced text and looking specifically for the start of each sentence?
21:09 RabidGravy will it occasionally give a different result in case it didn't remember correcty
21:09 boggard is that a use case that we should base typesetting around?
21:09 Hotkeys Just be happy that it isn't what it originally was--3 spaces
21:09 n0tjack boggard: one doesn't look for the start of sentences, they present themselves to you. same reason we break stuff up into paras. you're not looking for the "start of a new para", but introducing para breaks makes the entire structure more obvious and approachable.
21:10 n0tjack boggard: I imagine that's the origin of capitalization after a period as well.
21:10 boggard heh, another useless feature of written language :P
21:11 n0tjack 90% of edits I make on StackExchange are to break up impenetrable walls-o'-text into paras, just so I can see if there's even a question being asked.
21:11 boggard let's double the glyph count for.. for what? to make full stops even more apparent?
21:11 Begi1114 joined #perl6
21:12 n0tjack boggard: written language wasn't designed under a "glyph count budget", and when those constraints were introduced, we got all sorts of cool innovations (headlinese, telegraph abbrvs).
21:12 raiph joined #perl6
21:12 boggard imho s/cool/terrible/
21:12 n0tjack boggard: many rules which seem arbitrary, not only in orthography but many spheres of thought, were introduced to address some problem (which may no longer be apparent).
21:13 * [Coke] decommutes
21:13 n0tjack boggard: I think if you go and study orthography and grammar, not typesetting, you'll change that opinion.
21:13 * n0tjack [RCoke] # Recommutes [Coke]
21:14 RabidGravy so I make a 107 character glib comment about geeks taking polarised views and the next half hour expends several thousand characters reinforcing it ;-p
21:15 Ven joined #perl6
21:15 n0tjack RabidGravy: just means you have well-established opinions ;)
21:15 boggard regarding capitals in english?
21:15 n0tjack (PS: dude ... you just counted the number of characters in your comment ;)
21:16 RabidGravy :-O
21:16 RabidGravy wc counted it for me
21:16 n0tjack oh, did it raise its hand, then?
21:16 boggard i'd be fascinated to see if that's possible. capitalization pains me, as should be evident.
21:16 n0tjack wish my terminal were more proactive....
21:16 leont n0tjack: capitals are older than periods, in fact they're older than lower-case ;-)
21:16 RabidGravy e e cummins hated capitals too
21:17 n0tjack leont: But when and why was the convention of capitalizing the 1st word in a sentence introduced?
21:17 RabidGravy paris mostly, but occasionally E
21:17 n0tjack leont: It's only speculation, but makes sense to me to visually indicate sentence breaks
21:17 n0tjack I always found it odd that "E prime"'s primary purpose was to eschew Es.
21:18 RabidGravy I'd say it originates from handwritten script of much importance
21:18 Hotkeys a lot of the time when typing I don't capitalize the start of sentences
21:18 boggard if  European languages, except for Ancient Greek and Latin, did not make the case distinction before about 1300.
21:18 n0tjack me either.
21:18 Hotkeys or punctuate individual sentences
21:18 Hotkeys I still can't resist capitalizing "I" though
21:18 n0tjack Hotkeys: Well, going back far enough, words weren't broken up either
21:18 RabidGravy which I think is also why the spaces on paragraphs comes from, to make room for hand illumination of the starting character
21:18 n0tjack Hotkeys: and sometimes they did the zig-zag thing on paper
21:18 travis-ci joined #perl6
21:19 n0tjack but as the technology developed, more rules insisting on structure and consistency were introduced and enforced
21:19 n0tjack "proper spelling" wasn't even a thing til like what, the 18th century/
21:19 Hotkeys I like the old cramming style of some letters where they wrote both vertically and horizontally over one another to fit more content on a small letter paper
21:19 boggard There was no fixed capitalisation system until the early 18th century.
21:19 Hotkeys it isn't really part of the language structure
21:19 Hotkeys but still neat
21:20 n0tjack I mean heck, go back far enough (or even to all those weird countries over there -->) and vowels were optional
21:21 RabidGravy n0tjack, France?
21:21 n0tjack [#perl6] m: say "\x200A";
21:21 Hotkeys vowels are still mostly optional if you write in shorthand :p
21:21 n0tjack RabidGravy: your monitor is oriented improperly ;)
21:21 moritz srsl?
21:21 RabidGravy (because I don't think Bexleyheath is a country....)
21:21 n0tjack Hotkeys: clrly tht wld b cnfsng ...
21:22 Hotkeys not really
21:22 Hor|zon joined #perl6
21:22 n0tjack RabidGravy: I'm sitting here thinking you made up "Bexleyheath" altogether
21:22 Hotkeys ambiguous words can usually be written with a vowel in them
21:22 n0tjack I know, I was making a (ineffective) pun
21:22 Hotkeys lol
21:23 Hotkeys esp. since yours was pretty much unambiguous :p
21:23 cognominal joined #perl6
21:23 * Zoffix giggles
21:23 Zoffix Wrote to codeeval.com, asking to add P6 and this is the response: "Hello Zoffix, Right now Pearl 6 is not in our product roadmap. We generally review new languages once every quarter or so and discuss adding those that look like they're gaining traction or interest from our community. Warmly, Jeff" (yes, they wrote "Pearl" :P)
21:23 n0tjack I feel like if there are really places named "Bexleyheath", we should get hobbits, too
21:23 Hotkeys maybe it got corrected automatically
21:24 Ven joined #perl6
21:24 Hotkeys I like when names are spelt entirely unlike their pronunciation
21:24 Hotkeys eg. Featherstonehaugh
21:24 Hotkeys pronounced "Fanshaw"
21:24 boggard regarding "optional vowels", are you talking about languages which had abjads but not alphabets?
21:25 n0tjack Hotkeys: https://www.youtube.com/watch?v=mOd3lwluQIw
21:25 boggard i'd argue that that's not really a fair comparison, at least not any more than bringing up some logographic system.
21:26 n0tjack no, alphabetic languages where vowels were not written
21:26 n0tjack modern Hebrew is an example, even today
21:27 n0tjack only little kids write the "vowels" (actually diacritical marks) so that they learn how words are pronounced
21:27 n0tjack adults don't, except in extremely ambiguous cases
21:29 Hotkeys n0tjack: i've seen this vid
21:29 Hotkeys very good
21:31 n0tjack His "just glue some gears on it and call it steampunk" is pretty good too
21:32 lucasb_ joined #perl6
21:33 firstdayonthejob joined #perl6
21:34 Hotkeys I'm not sure if this counts as a shibboleth but you can tell if someone isn't from southern ontario if they pronounced "toronto" as [tərɑnto] instead of [trɑnə]/[trɑno]
21:35 n0tjack Hmm, I'm from NYC and I use the two-syllable pronunciation
21:35 Hotkeys Do you pronounce the second 't'
21:35 n0tjack I guess I've been there enough to have picked that up
21:35 RabidGravy Lunnan
21:35 lucasb_ m: 42++
21:35 camelia rakudo-moar cd7766: OUTPUT«Parameter '$a' expected a writable container, but got Int value␤  in block <unit> at /tmp/KO3KCGECrT:1␤␤»
21:35 n0tjack no, toronno
21:35 TimToady but have you been to Atlanna?
21:35 lucasb_ ^^ Clearly a LTA message, since there is no $a in my code. It should say something like that message "Cannot modify an immutable Int"
21:35 Hotkeys the second 't' is usually the giveaway
21:35 Hotkeys 3 syllable is acceptable too as long as you miss the second 't'
21:36 Hotkeys n0tjack: you are an honorary ontarian
21:36 Hotkeys congrats
21:36 n0tjack Hotkeys: Thanks. Sorry.
21:37 n0tjack oregonians have the same quip about their state: uruhgun, not ore-ah-gon
21:37 n0tjack or worse, ore-ay-gon
21:37 Hotkeys I've always say ore-uh-gun
21:37 Hotkeys never heard ur-uh-gun
21:37 Hotkeys s/say/said
21:38 TimToady maybe east of the cascades
21:38 n0tjack ore-uh-gun is also acceptable so long as the first two syllables overlap a bit
21:38 Hotkeys er
21:38 Hotkeys it's more like uh
21:38 TimToady not west of the cascades
21:38 Hotkeys origin but with a hard 'g' sound
21:38 n0tjack TimToady: how do you say it
21:38 TimToady Just like it's spelled :P
21:39 TimToady and I've lived in Oregon, as have many of my relatives...
21:39 n0tjack I had a friend, Alan Dzjima, who used to say that
21:39 n0tjack (JAY-mah ... duh)
21:39 cognominal joined #perl6
21:39 gfldex m: sub f1(){Failure.new('WELP!')}; sub f2(){ $_ ~~ Failure }; my $s = f1() orelse f2(); dd $s; # this mistake will be common
21:39 camelia rakudo-moar cd7766: OUTPUT«Failure $var = Failure.new(exception => X::AdHoc.new(payload => "WELP!"), backtrace => Backtrace.new)␤»
21:40 gfldex i would prefere ($s = f1() over (f1() orelse f2())
21:40 Hotkeys I say [orəgɪn]
21:40 Hotkeys I think I did that right
21:41 n0tjack learning IPA is on my list.. but it's a long list
21:41 Hotkeys had to for my intro ling class a couple weeks ago
21:41 RabidGravy lI don't say it often enough to have an opinion, even though my brother in law lives in Portland
21:41 tokuhirom joined #perl6
21:41 Hotkeys did well on my transcription test but actually finding the letters on the computer is still an adventure
21:42 n0tjack hmm, would be fun to make a slang that spoke IPA
21:42 Hotkeys ?
21:42 n0tjack in p6
21:42 n0tjack make an IPA grammar
21:42 n0tjack have it speak the sounds
21:42 Hotkeys lol
21:42 Hotkeys there's quite a few sounds in the IPA
21:43 Hotkeys that'd be an interesting project
21:43 RabidGravy festival binding crossed my mind a couple of times
21:43 n0tjack or maybe make a phonetic-spelling grammar, fairly liberal, that tried its best to render the appropriate IPA
21:43 AlexDaniel joined #perl6
21:43 n0tjack Hotkeys: I'd restrict the scope to spoken English
21:43 Hotkeys that becomes difficult because of how many dialects of english there are
21:43 Hotkeys https://en.wikipedia.org/wiki/International_Phonetic_Alphabet_chart_for_English_dialects
21:43 Hotkeys check out that vowel chart
21:44 n0tjack Yeah, I know, but I think (?) all I have to do is map char : sound file
21:45 RabidGravy they don't have "Estuarine"
21:46 Hotkeys They don't have a lot of american dialects either
21:46 Hotkeys I think they went with the most general
21:46 Hotkeys RP, GA, etc.
21:46 RabidGravy https://en.wikipedia.org/wiki/Estuary_English
21:47 AlexDaniel .tell jnthn No, there was no input from TimToady yet. Although I like my pull request the way it is, there are a couple of things to think about: “out” or “runout”, “runout” or “run-out”, and whether qx// should still exist with “no strict”.
21:47 yoleaux AlexDaniel: I'll pass your message to jnthn.
21:47 Hotkeys I like this dialect
21:49 n0tjack alright, I'm going to go pick an argument with a programming language
21:49 n0tjack I'll see y'all tomorrow
21:49 tokuhiro_ joined #perl6
21:49 Zoffix \o
21:49 cognominal m: my @a; .say for @a.^roles
21:49 camelia rakudo-moar cd7766: OUTPUT«(Positional)␤Method 'iterator' must be implemented by Iterable because it is required by a role␤  in any compose_method_table at gen/moar/m-Metamodel.nqp:2661␤  in any apply at gen/moar/m-Metamodel.nqp:2671␤  in any compose at gen/moar/m-Metamodel.…»
21:50 cognominal sounds weird
21:50 leont It's a more general issue that I've hit before
21:51 leont m: role Foo { method bar {...} }; my Foo @bar; @bar.perl.say
21:51 camelia rakudo-moar cd7766: OUTPUT«Method 'bar' must be implemented by Foo because it is required by a role␤  in any compose_method_table at gen/moar/m-Metamodel.nqp:2661␤  in any apply at gen/moar/m-Metamodel.nqp:2671␤  in any compose at gen/moar/m-Metamodel.nqp:2807␤  in any make_…»
21:54 [Coke] I just looked up estuary english, and thought "what? I grew up right next to the thames, what are they... oh. the one in OLD england."
21:55 cognominal joined #perl6
21:55 lucasb_ when you 'say' a role, it tries to create a class out of it? that's why this message?
21:55 lucasb_ m: say Iterable
21:55 camelia rakudo-moar cd7766: OUTPUT«Method 'iterator' must be implemented by Iterable because it is required by a role␤  in any compose_method_table at gen/moar/m-Metamodel.nqp:2661␤  in any apply at gen/moar/m-Metamodel.nqp:2671␤  in any compose at gen/moar/m-Metamodel.nqp:2807␤  in…»
21:56 lucasb_ I don't know why it needs to create a class just to say it
21:57 bartolin leont: I believe that's RT #116220
21:57 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=116220
21:57 RabidGravy [Coke], yeah the one about a mile in <- direction from here ;-)
21:57 PerlJam lucasb_: roles aren't instantiable things.
21:57 leont bartolin: thanks!
21:58 bartolin yw :-)
21:58 RabidGravy PerlJam, no but you might want to that latter example
21:58 RabidGravy a role is avalid typeconstraint
21:58 lucasb_ PerlJam: I understand that, but they are auto-punnable
21:59 kmel m: class Human { has $!name; method new ($name) { self.bless(:$name); } }; my $john = Human.new(name => 'John'); say $john;
21:59 camelia rakudo-moar cd7766: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method new at /tmp/xa4BCi9iyS:1␤  in block <unit> at /tmp/xa4BCi9iyS:1␤␤»
21:59 RabidGravy i.e. some object that does the role
21:59 RabidGravy I use it quite a lot
21:59 kmel any idea what is wrong in my code?
22:00 RabidGravy no, :$name in the signature of new
22:01 kmel m: class Human { has $!name; method new (:$name) { self.bless(:$name); } }; my $john = Human.new(name => 'John'); say $john;
22:01 camelia rakudo-moar cd7766: OUTPUT«Human.new␤»
22:01 kmel ah! thanks  RabidGravy
22:01 PerlJam kmel: your original code would have worked witht my $john = Human.new("John");
22:02 RabidGravy you want has $.name to make sense though
22:02 kmel m: class Human { has $!name; method new ($name) { self.bless(:$name); } }; my $john = Human.new('John'); say $john;
22:02 camelia rakudo-moar cd7766: OUTPUT«Human.new␤»
22:03 RabidGravy m: class Human { has $.name; method new ($name) { self.bless(:$name); } }; my $john = Human.new('John'); say $john;
22:03 camelia rakudo-moar cd7766: OUTPUT«Human.new(name => "John")␤»
22:03 gfldex m: my \ain't-a-good-name = 1; dd ain't-a-good-name
22:03 camelia rakudo-moar cd7766: OUTPUT«Int $var = 1␤»
22:03 gfldex m: my \ain't-a-good-name = 1; say ain't-a-good-name.VAR.name
22:03 camelia rakudo-moar cd7766: OUTPUT«Method 'name' not found for invocant of class 'Int'␤  in block <unit> at /tmp/M1mevF40q6:1␤␤»
22:03 kmel PerlJam indeed! this is why i overrided new(). I got lost.
22:05 kmel RabidGravy yes $.name makes sense. I was just reading http://doc.perl6.org/language/objects and trying to understand how OO works in perl 6
22:06 kmel i was trying to see if blessing new works for both ! and .
22:07 RabidGravy it won't show you the attribute in .perl for a "private" attribute
22:08 kmel why does it say that it is not a good practice to bless new() ?
22:08 RabidGravy because you typically don't need to
22:08 pmurias_ joined #perl6
22:08 pmurias joined #perl6
22:09 kmel "However this is considered poor practice, because it makes correct initialization of objects from subclasses harder"
22:09 RabidGravy yes
22:09 pmurias konobi: what time do you tend to hang out on #perl6?
22:09 gfldex i found rakudo tends to be smarter then i am. So i let it do as much automaticly as i can.
22:10 RabidGravy for the most part you can provide a "submethod BUILD"
22:10 kmel I didn't reach subclasses yet so i'll have to take it as it is :)
22:10 RabidGravy to do the initialisation
22:11 RabidGravy you don't need to provide a new() at all, though typical reasons might include providing multi candidates for different kinds of arguments
22:11 dalek nqp: b26314e | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
22:11 dalek nqp: [js] Implement if $expr -> $value {...} and similiar.
22:11 dalek nqp: review: https://github.com/perl6/nqp/commit/b26314e92f
22:11 dalek nqp: cfcf500 | (Pawel Murias)++ | t/nqp/88-more-if-tests.t:
22:11 dalek nqp: Test if/unless with passing an argument to the block.
22:11 dalek nqp: review: https://github.com/perl6/nqp/commit/cfcf500b7d
22:11 dalek nqp: 3de27a4 | (Pawel Murias)++ | src/vm/js/nqp-runtime/reprs.js:
22:11 dalek nqp: [js] make compose support associative and positional delegates.
22:11 dalek nqp: review: https://github.com/perl6/nqp/commit/3de27a4fc7
22:11 dalek nqp: 8cfb66e | (Pawel Murias)++ | src/vm/js/nqp-runtime/code-ref.js:
22:11 dalek nqp: [js] make code refs boolify to 1
22:11 dalek nqp: review: https://github.com/perl6/nqp/commit/8cfb66e7f5
22:11 dalek nqp: b5b9064 | (Pawel Murias)++ | tools/missing-js-tests:
22:11 dalek nqp: [js] update tools/missing-js-tests
22:11 dalek nqp: review: https://github.com/perl6/nqp/commit/b5b906443d
22:11 kmel so just to make it clear, blessing new() is not good practice or a constructor that accepts positional arguments is not good practice?
22:12 RabidGravy blessing new?
22:12 RabidGravy you mean self.bless ?
22:12 kmel yup self.bless
22:12 kmel sorry not used to the lingo yet
22:13 RabidGravy well, if I was to want to make a constructor with positionals I'd do something like "multi sub new($foo) { self.new(:$foo) }
22:13 RabidGravy "
22:14 RabidGravy which should just work
22:15 RabidGravy m: class B { has $.ff; multi method new($ff) { self.new(:$ff) } }; say B.new("rarr")
22:15 camelia rakudo-moar cd7766: OUTPUT«B.new(ff => "rarr")␤»
22:15 RabidGravy I meant multi *method* above
22:16 kmel aha ok
22:16 * pmurias find it strange that a lot of people want to define constructors with positionals
22:16 pmurias * finds
22:17 kmel and multi will not override the original constructor?
22:17 RabidGravy no, that's the point of multi
22:17 RabidGravy well as long as the signature is distinct
22:18 RabidGravy and then I think you would get an error if it can't determine which to dispatch to
22:19 kmel RabidGravy: thanks for your help
22:19 kmel i will go back to my playground now :)
22:20 RabidGravy pmurias, occasionally if one value is sufficiently distinct (such as a unique ID or something) to be unamibuous I might
22:21 kmel pmurias: i think it's easier that way
22:23 pmurias RabidGravy: with a single argument (especially for an object that is constructed a lot) it makes sense
22:23 Hor|zon joined #perl6
22:23 pmurias kmel: easier, you mean takes less typing to call the constructor?
22:25 kmel pmurias: yes. But don't rely too much on my answer. I am still learning how it works.
22:26 kmel pmurias: and apparently it is bad practice
22:26 RabidGravy well it's probab;y less typing to make the attributes "public" and not have to do anything at all
22:26 RabidGravy m: class B { has $.foo }; say B.new(foo => "bar);
22:26 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1sKE7vH3by␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/1sKE7vH3by:1␤------> 3B { has $.foo }; say B.new(foo => "bar);7⏏5<EOL>␤    expecting any of:␤        doub…»
22:26 RabidGravy m: class B { has $.foo }; say B.new(foo => "bar");
22:26 camelia rakudo-moar cd7766: OUTPUT«B.new(foo => "bar")␤»
22:27 geraud m: my Int:D $answer; say $answer;
22:27 camelia rakudo-moar cd7766: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QhKZiGOEyv␤Variable definition of type Int:D requires an initializer␤at /tmp/QhKZiGOEyv:1␤------> 3my Int:D $answer7⏏5; say $answer;␤    expecting any of:␤        constraint␤»
22:27 kmel RabidGravy: but even if you make them public $.var you still have to do self.bless
22:27 geraud my Int:D $answer=42; say $answer
22:27 RabidGravy no you don't as the above just showed
22:28 kmel m: class B { has $.foo }; say B.new("bar");
22:28 camelia rakudo-moar cd7766: OUTPUT«Default constructor for 'B' only takes named arguments␤  in block <unit> at /tmp/DrsX08q5Cw:1␤␤»
22:29 kmel see ^^
22:29 kmel if you want to pass positionals you have to do self.bless either private or public
22:29 RabidGravy right, but *if you don't use positionals* it's less typing
22:30 RabidGravy no, you don't
22:30 kmel no?
22:30 kmel i think i am a bit lost
22:31 RabidGravy you create a multi candidate of the new() which takes the positionals and pass that to the named candidate of new()
22:31 RabidGravy m: class B { has $.ff; multi method new($ff) { self.new(:$ff) } }; say B.new("rarr")
22:31 camelia rakudo-moar cd7766: OUTPUT«B.new(ff => "rarr")␤»
22:31 kmel ah yes yes yes the previous example
22:33 RabidGravy I mean if you really wanted to make *more* typing you could call the .CREATE, find the appropriate .BUILD and call that with the arguments (just like bless does)
22:33 RabidGravy but that would be silly
22:33 kmel RabidGravy: I definitely need to continue reading the docs.
22:34 kmel RabidGravy: Thanks :)
22:38 RabidGravy anyway I'm whacked, catch you all later
22:40 kmel see you later
22:43 espadrine joined #perl6
22:44 telex joined #perl6
22:44 dalek nqp: 1c943c5 | (Pawel Murias)++ | src/vm/js/ (24 files):
22:44 dalek nqp: [js] Remove the leftovers from the pre-rewrite nqp-js, at this point I'm not using that for inspiration anymore.
22:44 dalek nqp: review: https://github.com/perl6/nqp/commit/1c943c55c1
22:53 dalek ecosystem: 2bf2aae | (Matt Oates)++ | META.list:
22:53 dalek ecosystem: Added Text::Homoglyph
22:53 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/2bf2aae570
22:54 Ulti :P
22:55 * Ulti is playing with doing some steganography with the ^ above
23:03 dalek rakudo-star-daily: 4e4b147 | coke++ | log/ (8 files):
23:03 dalek rakudo-star-daily: today (automated commit)
23:03 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/4e4b147d0d
23:14 ab6tract joined #perl6
23:15 ab6tract kmel: you can think of new as a class-specific constructor space
23:16 ab6tract there is a submethod BUILD where you put constructor stuff that you want to get run regardless if the constructor is in an inherited class or not
23:16 ab6tract it sounds bit crazy, but that seems to be the practical distinction
23:17 ab6tract another way to look at it is: when you write a .new method you have access to any constructor parameters *before* binding
23:21 ab6tract which is usually enough: munge them in some small way and then send them as named arguments to self.bless . which calls submethod BUILD from the top to bottom of the class hierarchy. the 'original' BUILD, so to speak, which is always called during self.bless, will automatically assign the value of a named argument to the instance variable of the same name
23:21 ab6tract . o ( do we use the term 'instance variable' when discussing Perl 6? or is that Rubyism? )
23:23 ab6tract kmel: I hope that's at least somewhat useful
23:24 Hor|zon joined #perl6
23:24 virtualsue_ joined #perl6
23:25 psch ab6tract: afaiu, all Attributes are instance variables
23:25 yakudza joined #perl6
23:25 ab6tract right, 'attributes'
23:26 ab6tract thanks psch
23:38 gfldex review of the following is very welcome: http://rosettacode.org/wiki/Create_an_object/Native_demonstration#Perl_6
23:43 Alina-malina joined #perl6
23:43 tokuhirom joined #perl6
23:44 ShimmerFairy gfldex: looks like you accidentally forgot to close the last code box, unless you meant to have wikimarkup for Python in there :)
23:45 gfldex well spotted of what was just fixed
23:45 gfldex i should have scrolled a little further :)
23:48 ShimmerFairy gfldex: aside from that, I like the use of delegation and FALLBACK, though I'm not entirely sure how the FALLBACK example relates to the problem description as I understand it :)
23:51 lizmat joined #perl6
23:52 TEttinger joined #perl6
23:53 gfldex ShimmerFairy: Magic Methods are methods that appear out of nowhere. That's at least how I understand it.
23:54 * lizmat is back from EuroOSCON, AmsterdamX and social meeting :-)
23:54 lizmat I will try to get the P6W out before going to bed

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

Perl 6 | Reference Documentation | Rakudo