Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-06-25

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:02 Xliff Is self defined by the time method new() is executed?
00:04 Xliff Durrr... prolly not.
00:06 jjido joined #perl6
00:07 Zoffix left #perl6
00:08 timotimo nope, only if you call .new on an instance
00:08 timotimo like "Foobar".new
00:09 timotimo then self will obviously be "Foobar"
00:10 sortiz joined #perl6
00:10 sno joined #perl6
00:19 huggable joined #perl6
00:20 cdg joined #perl6
00:22 [Sno] joined #perl6
00:31 timotimo oh no, what's happening to hack now
00:32 timotimo oh, it collected itself again
00:45 BenGoldberg joined #perl6
00:47 Ben_Goldberg joined #perl6
01:12 rgrinberg joined #perl6
01:21 kalkin-_ joined #perl6
01:42 Zoffix joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:12 Herby_ joined #perl6
02:12 Herby_ Evening, everyone!
02:12 Herby_ o/
02:12 sortiz \o Herby_
02:16 noganex_ joined #perl6
02:25 sno joined #perl6
02:34 cyphase joined #perl6
02:34 dalek ecosystem: 22d5ba4 | (Zoffix Znet)++ | META.list:
02:34 dalek ecosystem: Add ווו to the ecosystem
02:34 dalek ecosystem:
02:34 dalek ecosystem: 666th module in the Perl 6 Ecosystem is properly Evil!
02:34 dalek ecosystem:
02:34 dalek ecosystem: https://github.com/zoffixznet/perl6-666
02:34 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/22d5ba4ea8
02:35 * Zoffix chortles
02:37 kanishka joined #perl6
02:38 Zoffix I also may have found issues with having unicode in module names. It was giving me "use of unitialized value" or something when I had `unit module ווו;` though I'm unsure if that was just clashing with the sub named ווו ¯\_(ツ)_/¯
02:40 raydiak .u ו
02:40 yoleaux U+05D5 HEBREW LETTER VAV [Lo] (ו)
02:40 skids joined #perl6
02:40 raydiak clever :)
02:46 cyphase joined #perl6
02:59 cyphase joined #perl6
03:01 cognominal joined #perl6
03:06 telex joined #perl6
03:08 Zoffix :(    "Cannot access '$_' through CALLER, because it is not declared as dynamic"
03:08 Zoffix Is this feature new? This is on 2016.04 and I'm sure my Pretty::Topic worked before :/
03:14 Zoffix m: package Foo { class Bar {} }; import Foo; Bar.new
03:14 camelia rakudo-moar 9b579d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Bar used at line 1. Did you mean 'Bag'?␤␤»
03:14 Zoffix m: module Foo { class Bar {} }; import Foo; Bar.new
03:14 camelia rakudo-moar 9b579d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    Bar used at line 1. Did you mean 'Bag'?␤␤»
03:14 Zoffix *sigh*
03:14 cyphase joined #perl6
03:16 Zoffix m: module Foo { sub term:<♥> { $CALLER::_ }; say ♥ for ^4; class Bar { method update { say ♥ for ^4}} }; import Foo; Foo::Bar.new.update
03:16 camelia rakudo-moar 9b579d: OUTPUT«0␤1␤2␤3␤0␤1␤2␤3␤»
03:16 mohae joined #perl6
03:16 paraboli` joined #perl6
03:16 Timbus joined #perl6
03:16 Zoffix Oh gee... another precompilation bug.
03:16 Zoffix (╯°□°)╯︵ ┻━┻
03:17 kid51 joined #perl6
03:17 Zoffix And this is after downgrading to 2016.04 to avoid a different precomp bug ~_~
03:19 Zoffix Production ready my ass
03:19 Zoffix left #perl6
03:31 ssotka joined #perl6
03:49 cyphase joined #perl6
04:19 huggable joined #perl6
04:20 Xliff_ joined #perl6
04:23 Util Memory fails me... Do we have an `if defined` control structure?
04:23 Util I want to collapse this nested block:
04:23 Util given $foo<bar><baz> -> $quux { if $quux.defined { ... } }
04:23 Util into this single block:
04:23 Util ifdefined $foo<bar><baz> -> $quux { ...  }
04:23 Util with some control statement or keyword meaning "ifdefined".
04:24 konobi Util: damian's talk had an example
04:24 konobi done as an infix operator
04:25 sftp joined #perl6
04:25 Util konobi: Thanks, but could you be more specific? Damian gave 6 talks.
04:25 Util ( 3 paid classes , a keynote, and 2 secret talks where someone else gave the first half, I thing)
04:25 Util s/thing/think/
04:25 konobi on the backs of giants
04:26 Util Ah, the keynote! I was there, but distracted. I will review it in the morning. Thanks!
04:27 TimToady Util: that's with/orwith/else
04:28 TimToady tests for defined and also topicalizes
04:28 * TimToady goes to be himownself...
04:29 Util TimToady: I see it now in [S04] `=head2 The C<with> and C<without> statements` and Roast/S04-statements/with.t .
04:29 Util So much to keep up with :)  Thanks!
04:57 cognominal m: my $a = 1; say $a.^roles
04:57 camelia rakudo-moar 9b579d: OUTPUT«((Real) (Numeric))␤»
04:57 cognominal m: my $a = 1 but False; say $a.^roles
04:57 camelia rakudo-moar 9b579d: OUTPUT«((<anon|74632384>) (Real) (Numeric))␤»
04:58 cognominal m: my $a = 1.1; say $a.^roles
04:58 camelia rakudo-moar 9b579d: OUTPUT«Cannot unbox a type object␤  in block <unit> at <tmp> line 1␤␤»
04:58 cognominal m: my Int $a = 1 but False; say $a.^roles
04:58 camelia rakudo-moar 9b579d: OUTPUT«((<anon|78530416>) (Real) (Numeric))␤»
04:59 Cabanossi joined #perl6
05:02 cognominal m: my int $i = 1 but False; say ?$i
05:02 camelia rakudo-moar 9b579d: OUTPUT«True␤»
05:03 cognominal should not be a warning that assigning to a native gives a value stripped from any rule ?
05:07 cognominal m: 1.1.^roles
05:07 camelia rakudo-moar 9b579d: ( no output )
05:07 cognominal m: say 1.1.^roles
05:07 camelia rakudo-moar 9b579d: OUTPUT«Cannot unbox a type object␤  in block <unit> at <tmp> line 1␤␤»
05:09 geekosaur m: say Num.^roles
05:09 camelia rakudo-moar 9b579d: OUTPUT«((Real) (Numeric))␤»
05:09 geekosaur m: say 1.1.WHAT
05:09 camelia rakudo-moar 9b579d: OUTPUT«(Rat)␤»
05:09 geekosaur m: say Rat.^roles
05:09 camelia rakudo-moar 9b579d: OUTPUT«Cannot unbox a type object␤  in block <unit> at <tmp> line 1␤␤»
05:09 sortiz m: say $_.perl for 1.1.^roles; # Rational[Int,Int] fails .gist;
05:09 camelia rakudo-moar 9b579d: OUTPUT«Rational[Int,Int]␤Real␤Numeric␤»
05:09 geekosaur Rat has a rat in its roles...
05:12 sortiz geekosaur, nop, the problem is 'Rational[Int,Int].gist', see:
05:12 sortiz m: say Rational[Int,Int];
05:12 camelia rakudo-moar 9b579d: OUTPUT«Cannot unbox a type object␤  in block <unit> at <tmp> line 1␤␤»
05:15 sortiz .oO( Oh, a rat, ya. :-) )
05:26 Woodi m: my @w = <a b c>; print "{@w.pick}\n" xx 3;
05:26 camelia rakudo-moar 9b579d: OUTPUT«c␤ a␤ c␤»
05:26 Woodi how to get rid of spaces there ?
05:29 cyphase joined #perl6
05:32 sortiz m: my @w = <a b c>; print join '', "{@w.pick}\n" xx 3; # xx produces a List.
05:32 camelia rakudo-moar 9b579d: OUTPUT«a␤a␤b␤»
05:34 dupek joined #perl6
05:43 dupek I would better learn Perl :D
05:43 dupek than Perl6
05:47 Woodi dupek: it's XXI century, learn many languages :)
05:48 * sortiz learn Perl is always a good idea.
05:48 dupek yeah, but writing my own framework in Perl6 is going so slow since I think I would change my job soon
05:49 dupek brutal life :(
05:50 cognominal m: (1|2).WHAT
05:50 camelia rakudo-moar 9b579d: ( no output )
05:50 cognominal m: say (1|2).WHAT
05:50 camelia rakudo-moar 9b579d: OUTPUT«(Junction)␤»
05:51 Woodi dupek: generally Perl6 isn't yet ready for "commercial" project... but for making a sketch of functionalities/design discovery it's very nice
05:51 dupek Woodi, that's true
05:51 Woodi sortiz: thanx
05:52 cognominal in the REPL   (1|2).WHAT crashes it
05:52 dupek Woodi, I think people should focus on to create something similar to perl6 maven tutorial
05:53 dupek but it is okay
05:53 dupek =)
05:56 Woodi cognominal: cognominal don't crashes for me, 2016.05
05:56 Woodi er, I mean *example* don't crash... :)
06:01 Woodi Zoffix: so, basically, you hacked say twice ? :)  so same story for: npm, Docker, buildroot, Vagrant, ... ;)
06:05 sortiz cognominal, seems new REPL needs a few explicit Mu in some signatures.
06:07 sortiz In particular input-incomplete and repl-print methods.
06:07 cognominal I guess I fit the TimToady's characterization of testers as nasty people. :( but he used some euphemism instead
06:08 cognominal Woodi, I use the most recent git version.
06:09 cognominal I think I am more like people who disassemble clocks with no clue how to put it them back together.
06:10 cognominal But this gives some appreciation for the work of people who designed the clock in the firt place.
06:11 Woodi cognominal: I imagine testers just operate on hacking instinct drug :) just like eg. jurnalists
06:11 cognominal > (1|2).WHAT
06:11 cognominal ===SORRY!===
06:11 cognominal Type check failed in binding $value; expected Any but got Junction (Junction)
06:14 CIAvash joined #perl6
06:19 cpage_ joined #perl6
06:21 sortiz cognominal, I just made a PR: https://github.com/rakudo/rakudo/pull/802
06:25 cognominal sorry, I am too busy finishing slides
06:48 wamba joined #perl6
06:53 domidumont joined #perl6
06:54 domidumont joined #perl6
06:59 domidumont joined #perl6
07:15 darutoko joined #perl6
07:26 cognominal class A { has $.a }; A.^attributes
07:26 cognominal m: class A { has $.a }; A.^attributes
07:26 camelia rakudo-moar a8aa18: ( no output )
07:27 cognominal m: class A { has $.a }; say A.^attributes
07:27 camelia rakudo-moar a8aa18: OUTPUT«(Mu $!a)␤»
07:27 cognominal m: my $a; say $a.WHAT
07:27 camelia rakudo-moar a8aa18: OUTPUT«(Any)␤»
07:28 cognominal m: class A { has $.a }; say A.new.WHAT
07:28 camelia rakudo-moar a8aa18: OUTPUT«(A)␤»
07:28 psch m: class A { has $.a }; my $a = A.new(a => 1&2); say $a.perl
07:28 camelia rakudo-moar a8aa18: OUTPUT«A.new(a => all(1, 2))␤»
07:28 cognominal m: class A { has $.a }; say A.new.a.WHAT
07:28 camelia rakudo-moar a8aa18: OUTPUT«(Any)␤»
07:29 cognominal Mu because it can contain Junction
07:30 psch right.  i don't think having my example generate a superposition of two As, one with :1a, one with :2a, would what most people expect
07:30 psch +be
07:30 dalek Inline-Perl5: 313aa77 | wamba++ | lib/Inline/Perl5.pm6:
07:31 dalek Inline-Perl5: Bug #65 solution
07:31 dalek Inline-Perl5:
07:31 dalek Inline-Perl5: I think, the change solve bug #65. Test argv.t is success. Switches for Perl 5 one-liner must be written behind '--'.
07:31 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/313aa77732
07:31 dalek Inline-Perl5: 9499d69 | niner++ | lib/Inline/Perl5.pm6:
07:31 dalek Inline-Perl5: Merge pull request #66 from wambash/patch-1
07:31 dalek Inline-Perl5:
07:31 dalek Inline-Perl5: Bug #65 solution
07:31 dalek Inline-Perl5:
07:31 dalek Inline-Perl5: Many thanks to wambash++! This would have been so hard to fix when you don't know that there is in fact an easy fix.
07:31 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/9499d690ae
07:37 rindolf joined #perl6
07:54 lizmat joined #perl6
07:54 hankache joined #perl6
07:54 hankache hola #perl6
07:56 wtw joined #perl6
07:56 kerframil joined #perl6
08:02 AlexDaniel joined #perl6
08:09 sortiz hola hankache
08:09 hankache hi sortiz
08:13 cognominal salut hankache
08:13 hankache bonjour cognominal
08:19 huggable joined #perl6
08:27 firstdayonthejob joined #perl6
08:32 cyphase joined #perl6
08:34 timotimo http://hack.p6c.org/~timo/  -  i meant to stop fuzzing when the light gray shaded area hits the dark gray shaded area's upper bound ... and then it goes and does *that*
08:35 psch heh
08:36 wtw joined #perl6
08:36 dalek DBIish: 275f496 | (Salvador Ortiz)++ | / (2 files):
08:36 dalek DBIish: Oracle: connect now accepts named argument 'user'
08:36 dalek DBIish:
08:36 dalek DBIish: To be consistent with other drivers and documentation.
08:36 dalek DBIish: review: https://github.com/perl6/DBIish/commit/275f496efd
08:36 dalek DBIish: 945f572 | (Salvador Ortiz)++ | / (2 files):
08:36 dalek DBIish: For panda's/zef's users, now v0.5.9
08:36 dalek DBIish: review: https://github.com/perl6/DBIish/commit/945f5725eb
08:45 hankache m: sub squared3 ($num) returns Int { return (say 'blablabla').WHAT.say; }; say "7 to squared is equal to " ~ squared3(7);
08:45 camelia rakudo-moar 6afd0b: OUTPUT«blablabla␤(Bool)␤7 to squared is equal to True␤»
08:45 hankache hmmmm. Shouldn't this fail ^^
08:46 brrt joined #perl6
08:46 sortiz m: say so Bool ~~ Int;
08:46 camelia rakudo-moar 6afd0b: OUTPUT«True␤»
08:47 timotimo yeah, say returns True
08:48 psch m: my Int $x = True
08:48 camelia rakudo-moar 6afd0b: ( no output )
08:48 brrt do we still have LoL in perl6
08:48 brrt and the Cat type
08:48 hankache say returns true but i expected the return trait to complain about bool
08:48 psch brrt: Cat never was implemented, but LoL is just gone i think
08:48 psch hankache: but Bool isa Int
08:49 brrt that is too bad
08:49 sortiz And in general any simple enum isa Int
08:49 hankache ok
08:49 brrt no role LolCat for me
08:50 cyphase joined #perl6
08:50 hankache m: sub squared ($num) returns Int:D { }; say squared(2);
08:50 camelia rakudo-moar 6afd0b: OUTPUT«Nil␤»
08:51 hankache shouldn't the :D complain in this case ^^ ?
08:51 psch m: my Int:D $x = Nil
08:51 camelia rakudo-moar 6afd0b: ( no output )
08:51 psch m: my Int:D $x = Nil; say $x.WHAT
08:51 camelia rakudo-moar 6afd0b: OUTPUT«(Int:D)␤»
08:52 psch ...that's kind of amazing
08:52 sortiz hankache, Nil and Failure are exempt for returns constraints.
08:52 psch m: my Int:D $x = Nil; say $x.defined
08:52 camelia rakudo-moar 6afd0b: OUTPUT«False␤»
08:53 hankache sortiz but then what's the purpose of :D?
08:53 psch m: sub squared ($num) returns Int:D { Int }; say squared(2);
08:53 camelia rakudo-moar 6afd0b: OUTPUT«Type check failed for return value; expected Int but got Int␤  in block <unit> at <tmp> line 1␤␤»
08:54 sortiz m: sub squared ($num) returns Int:D { Int }; say squared(2);
08:54 timotimo i think our variables with :D just straight up don't work properly with regards to default values
08:54 camelia rakudo-moar 6afd0b: OUTPUT«Type check failed for return value; expected Int but got Int␤  in block <unit> at <tmp> line 1␤␤»
08:54 timotimo as in, no default value specified
08:54 hankache and this is a LTA: "expected Int but got Int"
08:55 sortiz Yep, indeed LTA, but Nil and Failure are special cased.
08:57 hankache Well i was trying to see how to prevent a sub from returning nothing
08:57 hankache :D doesn't help since it doesn't catch Nil
08:57 hankache any alternatives?
08:59 FROGGS joined #perl6
08:59 xtreak joined #perl6
09:07 timotimo you don't "catch" nil when assigning to variables
09:07 timotimo assigning Nil will reset the default value
09:07 timotimo if you don't have a sensible default value, you'll be in trouble
09:08 lichtkind_ joined #perl6
09:08 psch fwiw, with implicit return i find you have to actually go out of your way to accidentally return Nil
09:09 timotimo yeah
09:09 timotimo you need to find something that returns Nil for you
09:09 timotimo or --> Nil :)
09:10 psch right, but the latter is pretty explicit :)
09:10 timotimo it's still "return at the end of the last block", though :)
09:11 hankache joined #perl6
09:11 hankache thanks
09:13 [Sno] joined #perl6
09:15 hankache m: sub squared ($num) returns Int:D { my Int $x = $num; $x = Nil; return $x}; say squared(2);
09:15 camelia rakudo-moar 6afd0b: OUTPUT«Type check failed for return value; expected Int but got Int␤  in sub squared at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
09:15 hankache so this is an example
09:16 psch yeah, you're purposefully reseting $x to Int
09:16 spider-mario joined #perl6
09:17 hankache yes
09:17 psch m: sub squared ($num) returns Int:D { my Int $x is default(-1) = $num; $x = Nil; return $x}; say squared(2);
09:17 camelia rakudo-moar 6afd0b: OUTPUT«-1␤»
09:17 psch is one solution
09:17 psch i suppose
09:17 timotimo and the output doesn't mention it expected Int:D
09:17 sortiz m: sub squared ($num) { POST { die unless .DEFINITE; True }; 4 }; say squared(2); # Check for :D
09:17 camelia rakudo-moar 6afd0b: OUTPUT«4␤»
09:17 sortiz m: sub squared ($num) { POST { die unless .DEFINITE; True }; Int }; say squared(2); # Check for :D
09:17 camelia rakudo-moar 6afd0b: OUTPUT«Died␤  in sub squared at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
09:19 * psch .oO( CORE::.keys.grep(/^'&'/)>>.can​didates>>.^add_phaser('POST', { die unless .DEFINITE; True }) )
09:19 CIAvash joined #perl6
09:21 psch i mean, i don't know that dealing with the absence of a value should always be completely automatic
09:21 hankache thanks
09:22 sortiz yw
09:22 psch so, assuming the "= Nil" is a placeholder for a routine that could return Nil, i'd probably do "//= that-sub()" vOv
09:22 psch instead of phasers or defaults
09:22 psch ah, no, that's wronng
09:23 psch "= that-sub // $fallback"
09:28 psch m: my $x = "foo"; $x //[R=] Nil; say $x # heh
09:28 camelia rakudo-moar 6afd0b: OUTPUT«foo␤»
09:28 psch m: my $x = "foo"; $x //[R=] 5; say $x
09:28 camelia rakudo-moar 6afd0b: OUTPUT«foo␤»
09:28 psch aww
09:29 psch oh, bad bracket b^Hplacement
09:29 psch m: my $x = "foo"; $x [//R]= 5; say $x
09:29 camelia rakudo-moar 6afd0b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in bracketed infix; couldn't find final ']' ␤at <tmp>:1␤------> 3my $x = "foo"; $x [//7⏏5R]= 5; say $x␤»
09:29 psch m: my $x = "foo"; $x [R//]= 5; say $x
09:29 camelia rakudo-moar 6afd0b: OUTPUT«5␤»
09:29 psch that i like
09:29 psch m: my $x = "foo"; $x [R//]= Nil; say $x
09:29 camelia rakudo-moar 6afd0b: OUTPUT«foo␤»
09:31 hankache so :D and :I are called smilies, but do they have a formal name?
09:32 psch i think 'type smilies' is the formal name
09:32 hankache lol ok
09:32 psch although could be made for 'definedness constraint colonpair' or so as more formal
09:32 psch +a case
09:33 hankache type constraint
09:33 dalek DBIish: 3195890 | (Salvador Ortiz)++ | README.pod:
09:33 dalek DBIish: Add Oracle to README.pod
09:33 dalek DBIish: review: https://github.com/perl6/DBIish/commit/31958905a2
09:34 psch right, yeah, they're a constraint on the type so that's probably it
09:34 sortiz rest time, #perl6 o/
09:35 hankache ciao sortiz
09:35 dalek doc: f3d933e | (Jan-Olof Hendig)++ | doc/Type/Map.pod:
09:35 dalek doc: Added docs for Map.Bool
09:35 dalek doc: review: https://github.com/perl6/doc/commit/f3d933e5a1
09:35 RabidGravy joined #perl6
09:42 domidumont joined #perl6
09:47 DrForr_ Everybody made it back okay?
09:54 spider-mario joined #perl6
09:54 gnull` joined #perl6
09:55 jjido joined #perl6
10:04 ranguard joined #perl6
10:11 timotimo https://en.wikipedia.org/w​iki/Fortune%27s_algorithm  -  someone want to implement this in p6? :3
10:12 * timotimo is reading through http://www-cs-students.stanford.edu/~amitp​/game-programming/polygon-map-generation/
10:14 rgrinberg joined #perl6
10:16 * TimToady sitting at gate at MCO
10:26 llfourn m: my &code = *.split("\n"); code("foo\nbar").^name.say # :/
10:26 camelia rakudo-moar 6afd0b: OUTPUT«BOOTArray␤»
10:26 pecastro joined #perl6
10:27 Ulti joined #perl6
10:33 timotimo m: (*.split("\n"))("foo\nbar").WHAT.say
10:33 camelia rakudo-moar 6afd0b: OUTPUT«Cannot find method 'say': no method cache and no .^find_method␤  in block <unit> at <tmp> line 1␤␤»
10:33 timotimo m: (*.split("\n"))("foo\nbar").WHAT.^name.say
10:33 camelia rakudo-moar 6afd0b: OUTPUT«BOOTArray␤»
10:33 timotimo that's strange, yeah
10:33 psch # since most of data structures are built already, there is little
10:33 psch # point in making this a lazy iterator here
10:34 psch src/core/Str.pm:2194
10:34 psch and $matches is the result of nqp::split
10:34 jjido joined #perl6
10:34 psch curious that the whatever curry brings that out though
10:35 psch soo maybe it's not exactly the right spot to look :|
10:36 timotimo oh, it might be skipping a hllize
10:37 psch yeah, but why would that only happen if it's bound to a whatever?
10:37 llfourn m: { .split("\n") }.("a\nb").^name.say
10:37 camelia rakudo-moar 6afd0b: OUTPUT«List␤»
10:37 llfourn m: (*.split("\n") ).("a\nb").^name.say
10:37 camelia rakudo-moar 6afd0b: OUTPUT«BOOTArray␤»
10:38 timotimo well, generating whatevercode code is different from building just any regular old block
10:39 kalkin- Hmm $=data<Foo> is not implemented, any work around for that?
10:40 kalkin- besides just iteration through $=pod and picking the things one need
10:42 kalkin- Or can i declare somehow my own pod variables? For example $=foo?
10:42 timotimo it you don't declare them, they just pick up whatever =foo you have in your pod
10:42 timotimo at least i think so
10:44 kalkin- If I use anthing besides $=pod after the $= sigil i get Pod variable $=foo not yet implemented. Sorry
10:45 llfourn I think there is $=finish or something as well?
10:45 timotimo oh
10:48 kalkin- i.c
10:49 kalkin- But i can't declare arbitrary data in POD, and later access that in code? (Besides iterating through =pod and picking the things I need)
10:49 llfourn I'm not 100% but I think that's what ppl use $=finish for
10:50 llfourn there maybe a better NYI way
10:50 timotimo yeah, NYI is the problem here
10:50 timotimo lots of things are speculated in the speculations
10:50 dupek joined #perl6
10:50 kalkin- Hmm say $=finish just returns (Mu) for me
10:51 kalkin- how can i use it?
10:52 timotimo https://i.imgur.com/flkNNWv.png
10:52 psch m: $=finish.perl.say ␤=finish␤bar baz␤=end finish␤
10:52 camelia rakudo-moar 6afd0b: OUTPUT«"bar baz\n=end finish\n"␤»
10:52 timotimo there is no =end finish
10:52 llfourn timotimo++ # image examples
10:52 psch yeah, i see that now :S
10:52 timotimo :D
10:52 timotimo finish is already the end of everything!
10:52 psch it's the end of ambient blocks at least :P
10:53 psch (that's an almost-quote, too)
10:53 tbrowder left #perl6
10:53 _mg_ joined #perl6
10:53 psch C<=finish>          No ambient blocks after this point
10:54 kalkin- I see. Thank you.
10:55 kalkin- I will experiment if I can reuse it
10:58 timotimo for better re-use i should have put more interesting data in than "what even is this\n"
10:59 hahainternet timotimo: your font is weird :)
10:59 kalkin- it's to tiny :)
10:59 timotimo monaco regular 10
10:59 hahainternet the kerning is so tight, and there's no antialiasing :o
10:59 timotimo it's big to me
10:59 kalkin- no tiny is wrong word, it's narrow :)
11:00 hahainternet it looks ok in the non bold, although the bar of the t is way low
11:00 kalkin- ic
11:00 hahainternet and it looks slightly disjointed to me
11:00 timotimo *shrug*
11:01 hahainternet https://i.imgur.com/oxiTDm6.png
11:01 hahainternet dejavu sans mono for me i think, in 8 or 9
11:01 timotimo that's uncomfortable to look at on my monitor
11:02 hahainternet interesting
11:02 hahainternet i find it quite nice
11:02 timotimo maybe it's the wrong subpixel alignment
11:02 hahainternet i think it might be hinted, and it'll be RGBA
11:02 hahainternet RGB*
11:02 * kalkin- recommends Fira Mono
11:02 hahainternet but maybe you use a pentile monitor or similar
11:02 hahainternet i'm on an IPS with standard order
11:04 timotimo i have an IPS in front of me, too
11:05 hahainternet odd :o
11:05 hahainternet the thing that matters to me most is the clear distinction between characters and the consistent letter height
11:10 kalkin- So i ended up just doing for $=pod -> $f { filter things i need }. This is fine with me. I just want p6pod doesn't show the word data from =begin data
11:10 kalkin- I want to assign it an alternative title, is it possible?
11:10 kalkin- searching through S26 doesn't yield anything intersting
11:15 jjido joined #perl6
11:44 _mg_ joined #perl6
11:51 kid51 joined #perl6
11:52 tbrowder joined #perl6
11:58 dalek doc: 50b13a5 | (Jan-Olof Hendig)++ | doc/Type/Map.pod:
11:58 dalek doc: Added doc for methods Int and Numeric in Map
11:58 dalek doc: review: https://github.com/perl6/doc/commit/50b13a5c2f
12:02 kalkin- I can't markup in POD that something needs to be centered?
12:07 tbrowder docs: please consider PR: https://github.com/perl6/doc/pull/635
12:09 moritz kalkin-: POD is semantic markup, not styling markup
12:12 jjido joined #perl6
12:19 moritz tbrowder: I've added two comments on the pull request
12:19 huggable joined #perl6
12:33 tbrowder moritz: I've replied...
12:34 domidumont joined #perl6
12:35 grondilu m: my @a = [1, 2]; my @b = 1, 2; dd @a; dd @b;
12:35 camelia rakudo-moar 6afd0b: OUTPUT«Array @a = [1, 2]␤Array @b = [1, 2]␤»
12:35 grondilu ^there's no difference at all, is there?
12:36 jnthn grondilu: Nope, thsoe two are the same (due to the single argument rule)
12:42 moritz tbrowder: I think the docs should say thing about whitespace not allowed before the parens
12:43 moritz tbrowder: though not the way you approached it
12:43 tbrowder okay. I'll work on another version--thanks!
12:44 Tushar joined #perl6
12:44 moritz and I feel really uncomfortable rejecting the first version
12:46 Tushar Hello, how can I specify type of array which has been passed to sub as argument? I tried sub testFunc (Int @a) { ... }, but I am getting error while running the code.
12:47 Tushar The error I am getting is: Type check failed in binding @a1; expected Positional[Int] but got Array ($[1, 2, 3, 4, 5])   in sub multiply at arrayMultiplication.p6 line 7   in block <unit> at arrayMultiplication.p6 line 11
12:50 CIAvash m: sub f (Int @a) { say @a }; f(Array[Int].new: 1,2,3)
12:50 camelia rakudo-moar 6afd0b: OUTPUT«[1 2 3]␤»
12:52 tbrowder moritz: please don't be uncomfortable! I appreciate the critique.
12:59 moritz Tushar: if you say (Int @a), it restricts to an Array[Int], which means you also have to pass in an Array[Int], not just an array that happens to contain integers
12:59 moritz Tushar: there is no declarative sytanx for "array that happens to contain only integers"
13:04 Tushar mortiz: that make sense. Do I have to check each element of array separately in order to check whether all of them are integer or not?
13:06 kurahaupo joined #perl6
13:07 dupek joined #perl6
13:08 moritz m: sub f(@x where { all(@x) ~~ Int }) { say @x.perl }; my @a = 1..3; my @b = 'foo'; f @a; f @b; # for Tushar
13:08 camelia rakudo-moar 6afd0b: OUTPUT«[1, 2, 3]␤Constraint type check failed for parameter '@x'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:08 kurahaupo_ joined #perl6
13:09 moritz m: sub f(@x where { all(@x) ~~ Int or fail "Not all elements are integers." }) { say @x.perl }; my @a = 1..3; my @b = 'foo'; f @a; f @b; # for Tushar
13:09 camelia rakudo-moar 6afd0b: OUTPUT«[1, 2, 3]␤Not all elements are integers.␤  in any  at /home/camelia/rakudo-m-inst-2/share​/perl6/runtime/CORE.setting.moarvm line 1␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:10 CIAvash m: sub f (@a where { .all ~~ Int }) { say @a }; f [1,2,3]
13:10 camelia rakudo-moar 6afd0b: OUTPUT«[1 2 3]␤»
13:11 iH2O joined #perl6
13:11 jjido joined #perl6
13:11 Tushar mortiz: thanks for your help. What if two arrays or multiple arrays are passed?
13:13 moritz Tushar: what about it?
13:13 kurahaupo joined #perl6
13:14 kurahaupo` joined #perl6
13:14 gfldex m: subset ArrayContainingInts of List where { .all ~~ Int }; sub f(ArrayContainingInts $a, ArrayContainingInts $b) { say 'fein' }; f([1,2,3],[4,5,6]);
13:14 camelia rakudo-moar 6afd0b: OUTPUT«fein␤»
13:15 Tushar mortiz: if we pass two arrays or multiple arrays as arguments can we check the type check in once or do we have to check all them separately?
13:16 psch m: sub f(@ [@a where { .all ~~ Int }, @b where { .all ~~ Int }]) { }; f [[1,2,3],[4,5,6]]
13:16 camelia rakudo-moar 6afd0b: ( no output )
13:17 gfldex m: sub f(*@all [ @a, @b]) { say 'fein' }; f((1,2,3),(4,5,6));
13:17 camelia rakudo-moar 6afd0b: OUTPUT«cannot stringify this␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:17 psch m: sub f(+@all [ @a, @b]) { say 'fein' }; f((1,2,3),(4,5,6));
13:17 camelia rakudo-moar 6afd0b: OUTPUT«fein␤»
13:18 psch m: sub f(**@all [ @a, @b]) { say 'fein' }; f((1,2,3),(4,5,6));
13:18 camelia rakudo-moar 6afd0b: OUTPUT«fein␤»
13:18 gfldex m: sub f(+@all [ @a, @b] where { .all.all ~~ Int }) { say 'fein' }; f((1,2,3),(4,5,6));
13:18 camelia rakudo-moar 6afd0b: OUTPUT«fein␤»
13:18 gfldex m: sub f(+@all [ @a, @b] where { .all.all ~~ Int }) { say 'fein' }; f((1,2,'drei'),(4,5,6));
13:18 camelia rakudo-moar 6afd0b: OUTPUT«Constraint type check failed for parameter '@all'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:19 DrForr_ Hrm. todo() seems to be partially implemented - It prints the 'TODO $message' but doesn't skip the next test as advertised.
13:19 moritz Tushar: if you want the result to be a single array, you can declare it to be slurpy, and do just one check
13:19 DrForr_ (sorry, Test::todo() - A bit ambiguous there.)
13:20 psch DrForr_: todo doesn't skip, skip skips
13:20 psch DrForr_: todo is really just for TAP parsers as i understand it
13:20 zakharyas joined #perl6
13:20 moritz m: sub f(*@x where { all(@x) ~~ Int }) { say @x }; my @a = 1, 2; my @b = 3, 4; f @a, @b;
13:20 camelia rakudo-moar 6afd0b: OUTPUT«[1 2 3 4]␤»
13:20 moritz psch: that's my understanding as well
13:20 DrForr_ Then the documentation needs fixing. /me looks for his repo.
13:20 dogbert17 o/ #perl6
13:21 moritz todo() just says "look, I know the next test is gonna fail, don't worry about it"
13:21 moritz \o dogbert17
13:21 dogbert17 hello moritz
13:21 dogbert17 grrr, there is still some kind of precompilation problem with the docs
13:22 dogbert17 today I have made two commits to Map.pod, the first is on thw web but the second is not
13:23 DrForr_ Ah, I didn't look closely enough at the example. My fault.
13:23 Tushar mortiz: yes I can use slurpy. but then how can i seperate the slurpy array into original arrays because I want to do element wise multiplication. I hope this make sense.
13:24 iH2O "grrr" isnt that nick already in use?
13:25 gfldex Tushar: please note that type checks happen at runtime. All you do is moving error messages around. That can be very useful ofc.
13:25 moritz Tushar: well, if you want them separate, don't use slurpies
13:25 moritz Tushar: also, please look again at how my name is spelled :-)
13:26 iH2O grrroritz
13:26 iH2O :)
13:26 dogbert17 iH20: I wouldn't be surprised
13:26 gfldex Tushar: also there is likely an operator for what you want to do
13:27 Tushar Sorry moritz. Thanks for your help.
13:27 nine ugexe: ping
13:30 dogbert17 I have tried to debug the precomp problem a bit, can anyone take a look at https://gist.github.com/dogbert17​/7b3fc5bfe95fb3926fc82cabc3f8bbd9
13:32 dogbert17 if I read the printout correctly it seems to figure out that the precomped file is too old ...
13:32 DrForr_ Might there be a use-case for sub skip-subtest {} # Skips whatever subtests are inside? Useful if you want to report that you're not going to run test code just *yet*.
13:32 dogbert17 but when prcompiling it comes to the conclusion that it is not necessary to precompile and loads the old file instead
13:33 dogbert17 or I have misunderstood just about everything
13:33 DrForr_ Specifically sub skip-subtest( &sub, $message ) { skip $message }
13:36 El_Che DrForr_: How was yapc::na? I heard you gave a talk
13:36 DrForr_ Three actually.
13:36 El_Che busy bee
13:36 El_Che grammars?
13:37 DrForr_ One keynote (well, 10 minutes of one), one regex and one web framework.
13:37 El_Che I have watched a few talks on youtube, but yours wasn't there yet
13:37 DrForr_ They both were there last time I looked, let me check.
13:38 El_Che I have the url, so I'll look, no worries
13:38 keix joined #perl6
13:38 DrForr_ They're not in the 'Uploads' portion of the site, that apparently still only has things pre-2016... odd, that.
13:39 novavis joined #perl6
13:41 DrForr_ https://www.youtube.com/watch?v=W1iTkACkbcM and https://www.youtube.com/watch?v=KxnRc0hbuBI
13:41 El_Che Did liz give a talk?
13:43 DrForr_ Not this time that I recall, though I could have just missed her in the schedule.
13:44 stevieb9 joined #perl6
13:44 dogbert2 joined #perl6
13:45 TreyHarris joined #perl6
13:45 john51_ joined #perl6
13:45 Gruber joined #perl6
13:45 maddingu1 joined #perl6
13:45 dogbert2 left #perl6
13:46 d4l3k_ joined #perl6
13:46 peteretep_ joined #perl6
13:47 clkao_ joined #perl6
13:47 tbrowder_ joined #perl6
13:47 PotatoGim_ joined #perl6
13:47 Spot___ joined #perl6
13:47 chansen__ joined #perl6
13:47 avalenn_ joined #perl6
13:47 pnu__ joined #perl6
13:47 ggherdov_ joined #perl6
13:47 spidermario joined #perl6
13:48 a3r0_ joined #perl6
13:48 diakopte1 joined #perl6
13:48 Some-body_ joined #perl6
13:48 BinGOs_ joined #perl6
13:48 ilbelkyr_ joined #perl6
13:48 torbjorn_ joined #perl6
13:48 integral_ joined #perl6
13:48 integral_ joined #perl6
13:48 tharkun_ joined #perl6
13:49 Hor|zon joined #perl6
13:49 _notbenh joined #perl6
13:49 erdic_ joined #perl6
13:51 nebg joined #perl6
13:51 gensym joined #perl6
13:51 lizmat No, I haven't given a talk, but I do have a sore throat from answering questions to people in the Hallway track  :-)
13:52 retupmoca joined #perl6
13:52 b2gills joined #perl6
13:53 nchambers joined #perl6
13:53 hoelzro joined #perl6
13:55 novavis joined #perl6
13:56 DrForr_ lizmat: Same here :/ And the dry air on the planes didn't help...
13:57 dogbert17 joined #perl6
14:00 nebg can nowadays perl6 be used to do anything ? or it's still in a phase which additional development is needed... i mean can i do system programming of GUI programs ?
14:00 nebg or web app ?
14:01 nebg hello camelia !!
14:01 nebg you are the butterfly right ?
14:01 gfldex nebg: there are still bugs and it's a tad slow, but beside that, there is no reason not to use it
14:02 nebg gfldex, which are the bugs  ?
14:02 nebg gfldex, ok so it has bindings for various widget toolkits like tk or wxwidgets or qt or gtk  ? right ?
14:03 * dogbert17 believes that he's managed to identify the doc precomp problem, working on PR
14:03 moritz nebg: https://rt.perl.org/ has all the bugs
14:04 gfldex nebg: there are bindings to gtk, qt will be a tricky tho
14:07 bjz joined #perl6
14:08 kurahaupo joined #perl6
14:09 Actualeyes joined #perl6
14:16 nebg gfldex, why ?
14:17 nebg so what perl6 can be used for now ?
14:18 nebg i mean which is the main application ?
14:18 gfldex nebg: see https://en.wikipedia.org/wiki/Name_mangling
14:18 kaare__ joined #perl6
14:19 DrForr_ nebg: It's a programming language. You can use it for whatever you like.
14:19 nebg DrForr_, ok
14:20 nebg but some programming language are more suited for some fields
14:21 dalek doc/fix-for-issue-545: 780b2b3 | (Jan-Olof Hendig)++ | htmlify.p6:
14:21 dalek doc/fix-for-issue-545: Fix for issue https://github.com/perl6/doc/issues/545
14:21 dalek doc/fix-for-issue-545:
14:21 dalek doc/fix-for-issue-545: In order to speed up the doc generation the program precompiles pod files
14:21 dalek doc/fix-for-issue-545: into the directory precompiled. The code in the sub extract-pod loads the
14:21 dalek doc/fix-for-issue-545: precompiled files but if it detects that a pod file has been changed it
14:21 dalek doc/fix-for-issue-545: calls the method precompile in CompUnit::PrecompilationRepository. The
14:21 dalek doc/fix-for-issue-545: problem is that the precompile method checks if the file, that it is being
14:21 dalek doc/fix-for-issue-545: asked to recompile, exists in the repo, and if it does it won't recompile
14:21 dalek doc/fix-for-issue-545: it unless the named parameter :force is set to True. My suggested
14:21 dalek doc/fix-for-issue-545: change is that we set :force => True when calling the precompile method.
14:21 dalek doc/fix-for-issue-545: review: https://github.com/perl6/doc/commit/780b2b3d51
14:22 novavis left #perl6
14:22 kaare_ joined #perl6
14:23 * dogbert17 my first code PR - https://github.com/perl6/doc/pull/636
14:24 DrForr_ nebg: That may be the case, but perl6 has been out in the wild for just over 6 months and doesn't have Apple or Google splattering its name everywhere. We've got web platforms, asynch and multicore processing, easy native library bindings, GUIs like Gtk, surely there's something that interests you.
14:24 nebg ok thanks DrForr_
14:24 gfldex nebg: if you would tell us why you asked those questions, we may be able to use that context to guess what you mean.
14:24 nebg !camelia
14:24 nebg is it a bot ?
14:25 gfldex m: say "I'm a bot!";
14:25 camelia rakudo-moar 6afd0b: OUTPUT«I'm a bot!␤»
14:25 nebg wow great !
14:25 Tushar joined #perl6
14:25 Tushar left #perl6
14:30 kurahaupo_ joined #perl6
14:34 travis-ci joined #perl6
14:34 travis-ci Doc build passed. Jan-Olof Hendig 'Fix for issue https://github.com/perl6/doc/issues/545
14:35 travis-ci https://travis-ci.org/perl6/doc/builds/140222273 https://github.com/perl6/doc/commit/780b2b3d51d9
14:35 travis-ci left #perl6
14:39 Util timotimo: (in re: Fortune's_algorithm) You could translate Math::Geometry::Voronoi, which is in Perl 5, XS, and raw C language.
14:44 Util m: say "!tob a llits m'I".flip;
14:44 camelia rakudo-moar 6afd0b: OUTPUT«I'm still a bot!␤»
14:46 pmurias joined #perl6
14:53 nine ugexe: Getting really, really close now: https://github.com/rakudo/rakudo/commit/​21eff9ea20b0bae376ab1aaf31c18338c3e26520
14:55 nine ugexe: bootstrapping panda works with that, but installation of Inline::Perl5 fails because it cannot find its resources
14:59 dalek doc/fix-for-issue-545: 627fa39 | (Jan-Olof Hendig)++ | htmlify.p6:
14:59 dalek doc/fix-for-issue-545: Make change more canonical. zoffix++
14:59 dalek doc/fix-for-issue-545: review: https://github.com/perl6/doc/commit/627fa39cb2
15:05 ugexe nine: Indeed, I added pretty much that same deprecation bit to zef's Distribution object and it has been working perfectly (including Inline::Perl5). The only other things I changed was A) passing in a relative IO path object for sources (so it would stringify to the relative path when written to the meta but grab the correct file when accessed via IO methods) and B) prefixing `resources/` to the keys of what
15:05 ugexe was being passed in to the %resources hash (but again as an IO object)
15:06 ugexe nine: can you gist the dist file that gets written for you for Inline::Perl5?
15:08 nine ugexe: https://gist.github.com/niner/1​bf758f7252202ccb5741136d3ab3e5e
15:09 ugexe hmm i wonder if panda passes in the resources as an absolute path
15:11 nine Don't see anything about that in the source
15:12 nine But....it's quite hot in here. Brane refuses to operate at capacity...
15:13 ugexe nope it passes a relative path object. so maybe the CWD of it changes... will need to look. I've been explicit with it instead of relying on chdir: IO::Path.new($_.value.IO.relative($!path), :CWD($!path))
15:14 * nine likes explicitness
15:14 ugexe annoyingly verbose but I think there was a good reason
15:17 girafe joined #perl6
15:23 firstdayonthejob joined #perl6
15:24 lizmat joined #perl6
15:32 pmurias_ joined #perl6
15:32 jjido joined #perl6
15:34 woolfy joined #perl6
15:34 iH2O joined #perl6
15:37 tinita joined #perl6
15:40 skids joined #perl6
15:47 dalek doc: 780b2b3 | (Jan-Olof Hendig)++ | htmlify.p6:
15:47 dalek doc: Fix for issue https://github.com/perl6/doc/issues/545
15:47 dalek doc:
15:47 dalek doc: In order to speed up the doc generation the program precompiles pod files
15:47 dalek doc: into the directory precompiled. The code in the sub extract-pod loads the
15:47 dalek doc: precompiled files but if it detects that a pod file has been changed it
15:47 dalek doc: calls the method precompile in CompUnit::PrecompilationRepository. The
15:47 dalek doc: problem is that the precompile method checks if the file, that it is being
15:47 dalek doc: asked to recompile, exists in the repo, and if it does it won't recompile
15:47 dalek doc: it unless the named parameter :force is set to True. My suggested
15:47 dalek doc: change is that we set :force => True when calling the precompile method.
15:47 dalek doc: review: https://github.com/perl6/doc/commit/780b2b3d51
15:47 dalek doc: 627fa39 | (Jan-Olof Hendig)++ | htmlify.p6:
15:47 dalek doc: Make change more canonical. zoffix++
15:47 dalek doc: review: https://github.com/perl6/doc/commit/627fa39cb2
15:47 dalek doc: 9e8455b | (Zoffix Znet)++ | htmlify.p6:
15:47 dalek doc: Merge pull request #636 from perl6/fix-for-issue-545
15:47 dalek doc:
15:47 dalek doc: Fix for issue https://github.com/perl6/doc/issues/545
15:47 dalek doc: review: https://github.com/perl6/doc/commit/9e8455b3cc
15:50 ugexe nine: is there a way to make the back compat shim work for both of these cases?
15:51 ugexe m: role Foo { submethod new(*%_) {class :: { has $.bar; }.new(|%_)} }; say Foo.new(bar => 1).bar; class Foo2 is Foo {}; say Foo2.new(bar => 2).bar
15:51 camelia rakudo-moar 0e4a64: OUTPUT«1␤Method 'bar' not found for invocant of class 'Foo2'␤  in block <unit> at <tmp> line 1␤␤»
15:54 telex joined #perl6
15:58 domidumont joined #perl6
16:04 iH2O left #perl6
16:05 El_Che joined #perl6
16:09 Woodi what is reverse of push ?
16:09 huf pop?
16:10 dupek joined #perl6
16:10 _mg_ joined #perl6
16:10 Woodi huf: works, thanx :)
16:10 ugexe I'm not sure its worth putting a backwards compat shim there if its not backwards compat in all common cases. Distribution.new is covered, but anything that originally inherited from Distribution will still be broke
16:11 ugexe that COMPOSE { } phaser would come in handy about now
16:11 daxim joined #perl6
16:13 lizmat ugexe: don't we have the functional equivalent of that already ?
16:13 lizmat forget what it was exactly...
16:13 _mg_ joined #perl6
16:14 ugexe from what I remember trying you can just put such code into the body of the role, but that doesn't help if its a role being punned into a class and you don't want that code to run *unless* its being composed as a role
16:15 Woodi so, pop is faster then @a = @a[^11] and that is faster then splice(@a,*-1). but probably it should be that way
16:19 huggable joined #perl6
16:20 _mg_ joined #perl6
16:26 timotimo yeah, pop is very cheap. especially since our arrays don't shrink, only grow
16:28 Guest97449 joined #perl6
16:28 ugexe if being fully backwards compat is a concern it may be better to rename the distribution interface to Distribution::Installable, and leave the old Distribution as is but with a `also does Distribution::Installable; also does Distribution::Locally; method meta { self.hash; };`
16:29 pmurias_ jnthn: do you think implementing 'use oo :final, :closed' for nqp-js is a sane approach?
16:30 molaf joined #perl6
16:38 hankache joined #perl6
16:38 khw joined #perl6
16:38 jnthn pmurias: I'm not sure. It depends if it is to be interpreted as having hint or enforcement semantics. I'm also somewhat doubtful about whether it's worth it on Moar, and similar may be true of the JVM too.
16:40 espadrine joined #perl6
16:41 jnthn pmurias: In terms of my architectural vision for things, it's likely that Rakudo will do *less* compile time inlining in the future; probably only inlining of native-y things will survive.
16:41 jnthn pmurias: It just works out better to leave it to the VM, which can do it in the hot places and stands a better chance of preserving stack traces etc.
16:42 jnthn Do you have particular benefits in mind?
16:50 dupek joined #perl6
16:52 kalkin- m: subset Year of UInt | Dateish | Range; my Year $y = 2001..2015;
16:52 camelia rakudo-moar da5278: OUTPUT«WARNINGS for <tmp>:␤Useless use of "|" in expression "subset Year of UInt | Dateish | Range" in sink context (line 1)␤Type check failed in assignment to $y; expected Year but got Range (2001..2015)␤  in block <unit> at <tmp> line 1␤␤»
16:53 kalkin- I don't understand the error.
16:53 kalkin- Am I using | wrong?
16:53 kalkin- what is a sink context?
16:57 Zoffix joined #perl6
16:57 Zoffix kalkin-, it means the value wasn't used anywhere
16:57 Zoffix m: 2
16:57 camelia rakudo-moar da5278: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 2 in sink context (line 1)␤»
16:57 aries_liuxueyang joined #perl6
16:57 rindolf joined #perl6
16:57 Zoffix kalkin-, I'm not even sure what that subset is supposed to be. Any of those values?
16:57 kalkin- Zoffix: yes
16:57 Zoffix m: subset Year of Any where UInt | Dateish | Range; my Year $y = 2001..2015;
16:57 camelia rakudo-moar da5278: ( no output )
16:57 kalkin- I "fixed it" by replacing '|' with '||'
16:58 Zoffix hm
16:58 Zoffix m: subset Year UInt || Dateish || Range; my Year $y = 2001..2015;
16:58 camelia rakudo-moar da5278: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3subset Year7⏏5 UInt || Dateish || Range; my Year $y = ␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement e…»
16:58 Zoffix m: subset Year of UInt || Dateish || Range; my Year $y = 2001..2015;
16:58 camelia rakudo-moar da5278: OUTPUT«Type check failed in assignment to $y; expected Year but got Range (2001..2015)␤  in block <unit> at <tmp> line 1␤␤»
16:58 Zoffix Doesn't seem fixed :)
16:58 jnthn That parses as (subset Year of UInt) || Dateish || Range
16:59 Zoffix Thought so :)
16:59 jnthn subset Year where UInt | Dateish | Range; is the right way
16:59 Zoffix You don't need even need an of?
16:59 kalkin- Hmm actually my code looks a lttile bit different Dateish and Range are custom subsets which are defined like YearRnage of Range where ...
16:59 jnthn No, defaults to `of Any`
16:59 _mg_ joined #perl6
17:00 Zoffix Oh, TIL. jnthn++
17:00 Zoffix kalkin-, should still work
17:00 firstdayonthejob joined #perl6
17:00 Zoffix ( FWIW http://perl6.party/post/Per​l-6-Types--Made-for-Humans )
17:00 Zoffix left #perl6
17:01 kalkin- jnthn, Zoffix thanks
17:03 jjido joined #perl6
17:06 pmurias jnthn: I intend to use do it only for the JavaScript backend, MoarVM can optimize stuff at runtime, when you have the access to the types of things
17:06 pmurias jnthn: on js I don't really have controll how the V8 JIT optimizes things
17:07 _mg_ joined #perl6
17:08 pmurias jnthn: my plan is that if I can finalize and close nqp classes combined with the relatively simple (compared to Perl 6) semantics of NQP I could make rakudo.js and nqp.js compile code really fast
17:11 jjido joined #perl6
17:14 jnthn pmurias: Only thing is, it's an application level pragma, meaning that you'd need some way to have it take effect in modules loaded by that top-level application...
17:14 jnthn (So it's not a legal thing to write into a module, really)
17:15 jnthn (Which can be dealt with of course, but it's a complication)
17:17 pmurias yes, I would have to have too passes over everything
17:17 pmurias s/too/2
17:17 hankache m: say Bool ~~ Int
17:17 camelia rakudo-moar da5278: OUTPUT«True␤»
17:17 hankache what is the rationale behind this?
17:18 hankache why is Bool an Int?
17:18 mst because lots of stuff uses 0/1 for booleans
17:19 hankache ok
17:20 hankache m: sub x returns Int {return True}; x;
17:20 camelia rakudo-moar da5278: ( no output )
17:20 hankache m: sub x returns Int {return True}; say x;
17:20 camelia rakudo-moar da5278: OUTPUT«True␤»
17:21 jnthn Also because Bool is an enum, and enums are (by default) Ints endowed with extra powers
17:21 hankache can I somehow force the type constraint to be only Int?
17:23 hankache so that the above code fails
17:23 pmurias joined #perl6
17:24 jnthn Could try something like: subset OnlyInt where .WHAT === Int
17:24 jjido joined #perl6
17:24 hankache thanks
17:24 gfldex m: subset OnlyInt of Int where .WHAT === Int; sub x(\c) returns OnlyInt {return c}; say Int; say True;
17:24 camelia rakudo-moar da5278: OUTPUT«(Int)␤True␤»
17:25 gfldex m: say True.WHAT === Int;
17:25 camelia rakudo-moar da5278: OUTPUT«False␤»
17:26 hankache m: subset OnlyInt of Int where .WHAT === Int; sub x returns OnlyInt {return True}; say x;
17:26 camelia rakudo-moar da5278: OUTPUT«Type check failed for return value; expected OnlyInt but got Bool (Bool::True)␤  in sub x at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
17:26 hankache great! thanks everyone
17:28 jnthn gfldex: Did you mean those to be `say x(Int); say x(True);`? :)
17:29 jnthn Dinner time &
17:31 gfldex i did
17:48 daxim joined #perl6
17:53 CIAvash `where` topicalizes without a block?
17:55 psch m: my Int $x where .say = 5
17:55 camelia rakudo-moar da5278: OUTPUT«5␤»
18:12 daxim joined #perl6
18:14 kalkin- So as far as I understand subset Foo where A | B | C is same as subset F where * ~~ any(A|B|C) ?
18:15 gfldex yes
18:15 gfldex well, the consequence is the same
18:15 kalkin- ok if so what is subset Bar _of_ B?
18:16 kalkin- Because previously i tried to do subset Foo of A | B | C, which was wrong
18:17 gfldex NYI
18:17 gfldex maybe after next christmas
18:17 kalkin- gfldex: ok NYI, but what does this mean in Perl6?
18:17 kalkin- i mean the _of_ not NYI
18:17 gfldex in fact sub(A|B $x){} would be nice to have
18:19 jnthn We can't really have it though, 'cus it's ambiguous with the capture syntax in signatures
18:19 gfldex think of `of B` as a superclass of A without introducing a complete new class
18:19 kalkin- m: subset Foo of Int, Str;
18:19 camelia rakudo-moar da5278: ( no output )
18:20 kalkin- m: subset Foo of Int, Str; my Foo $f = 'asd';
18:20 camelia rakudo-moar da5278: OUTPUT«Type check failed in assignment to $f; expected Foo but got Str ("asd")␤  in block <unit> at <tmp> line 1␤␤»
18:20 jnthn A subset type is a refinement type. `of` has to be followed by the name of the type you wish to refine (default is Any); where is followed by the condition.
18:20 jnthn Note that after `of` we parse preceisely one type name, *not* an expression
18:20 kalkin- So i can't refine multiple types at once, which kind of makes sense. I see…
18:20 jnthn So subset Foo of A | B means (subset Foo of A) | B (e.g. the B has nothing to do with the subset type).
18:21 jnthn Which I think warned... I'm a little said that the comma case didn't warn, we should be able to catch that also
18:21 TimToady comma should distribute the sink
18:21 kalkin- jnthn: in case of '|' the warning is more confusing, then helpful
18:22 TimToady m: 42, Str
18:22 camelia rakudo-moar da5278: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (lines 1, 1)␤»
18:22 TimToady m: Str, 42
18:22 jnthn kalkin-: How so? It tells you something didn't get used.
18:22 camelia rakudo-moar da5278: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (lines 1, 1)␤»
18:22 TimToady looks like it's skipping the Str
18:22 kalkin- m: subset Foo of Int | Str;
18:22 camelia rakudo-moar da5278: OUTPUT«WARNINGS for <tmp>:␤Useless use of "|" in expression "subset Foo of Int | Str" in sink context (line 1)␤»
18:22 kalkin- m: subset Foo of Int , Str;
18:22 camelia rakudo-moar da5278: ( no output )
18:22 jnthn If it didn't warn it'd silently do the wrong thing...
18:22 jnthn As the , case does
18:22 TimToady m: subset Foo of Int, 42
18:22 camelia rakudo-moar da5278: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (lines 1, 1)␤»
18:22 jnthn TimToady: Hmm. I think you know that bit of the code better than I do these days ;)
18:23 TimToady I fear so :)
18:23 kalkin- so theoretically something like might be possible some day: multi subset Foo of A; multi subset Foo of B; ?
18:23 TimToady what the heck would it mean?
18:23 dupek joined #perl6
18:23 jjido joined #perl6
18:24 kalkin- TimToady: the same i tried to achieve with subset Foo of A | B; It would mean that Foo has two superclasses.
18:24 gfldex m: subset Foo of any(A,B);
18:24 camelia rakudo-moar da5278: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'any'. Did you mean 'Any'?␤at <tmp>:1␤------> 3subset Foo of any7⏏5(A,B);␤»
18:24 kalkin- TimToady: or may be i', just talking bs
18:24 TimToady and my Foo $object .= new instantiates itself how?
18:25 kalkin- TimToady: hmm how does it work in case of subset Foo where (A|B) ? (might be I misunderstand some thing basic)
18:25 TimToady generally you should be mixing roles together like this, not classes
18:25 TimToady in that case, it uses the (single) of type
18:26 gfldex subset creates a new type object. That can be used as a type contraint, but there are other uses as well.
18:26 kalkin- TimToady: but as far as I understand there is no my Foo $object .=new in case of subset Foo where (A|B), or is there?
18:26 gfldex having a junction would break the other uses
18:26 TimToady m: say (subset Foo where Int | Str).of
18:26 camelia rakudo-moar da5278: OUTPUT«Method 'of' not found for invocant of class 'Foo'␤  in block <unit> at <tmp> line 1␤␤»
18:27 TimToady m: subset Foo where Int | Str; my Foo $x .= new; say $x.WHAT
18:27 camelia rakudo-moar da5278: OUTPUT«You cannot create an instance of this type (Foo)␤  in block <unit> at <tmp> line 1␤␤»
18:27 jnthn The key thing to note is that the `where` part is just used to smartmatch against; it's opaque to the type system
18:27 TimToady seems like it could instantiate the of type as a base type
18:27 jnthn Whereas the `of` part is used in things like candidate sorting
18:28 TimToady m: say (subset Foo of Cool where Int | Str).of
18:28 camelia rakudo-moar da5278: OUTPUT«Method 'of' not found for invocant of class 'Foo'␤  in block <unit> at <tmp> line 1␤␤»
18:28 TimToady m: say (subset Foo of Cool where Int | Str).^of
18:28 camelia rakudo-moar da5278: OUTPUT«Method 'of' not found for invocant of class 'Perl6::Metamodel::SubsetHOW'␤  in block <unit> at <tmp> line 1␤␤»
18:28 TimToady m: say (subset Foo of Cool where Int | Str).^methods
18:28 camelia rakudo-moar da5278: OUTPUT«Method 'methods' not found for invocant of class 'Perl6::Metamodel::SubsetHOW'␤  in block <unit> at <tmp> line 1␤␤»
18:28 jnthn Not meta enough ;)
18:28 jnthn m: say (subset Foo of Cool where Int | Str).HOW.^methods
18:28 camelia rakudo-moar da5278: OUTPUT«Method 'gist' not found for invocant of class 'NQPRoutine'␤  in block <unit> at <tmp> line 1␤␤»
18:28 jnthn Aww
18:29 jnthn Not meta-circular enough :P
18:29 jnthn m: say (subset Foo of Cool where Int | Str).HOW.^method_table.keys
18:29 camelia rakudo-moar da5278: OUTPUT«(add_stash name set_name accepts_type nominalize BUILD set_why WHY set_shortname refinee set_of shortname type_check find_method refinement new new_type archetypes)␤»
18:29 TimToady you'd think you could .of somethin' with an 'of'
18:29 jnthn TimToady: That'd mean putting the `of` up in Mu, no?
18:30 psch m: subset Foo of Int; Foo.^refinee.say
18:30 camelia rakudo-moar da5278: OUTPUT«(Int)␤»
18:30 jnthn I think it's right at the meta-level, though .^of and .^where would be welcome aliases of .^refinee and .^refinement
18:30 psch +1
18:30 grondilu in HN today there was a mention of "parsing with derivatives".  I did not know about that so I looked it up.  Found myself watching a Standford video about it and got surprised as the speaker mentioned Perl 6.  His name is Matthew Might.  Is he hanging around here?  https://www.youtube.com/watch?v=ZzsK8Am6dKU
18:31 jnthn Anyway, example of what I meant on the multi thing
18:31 jnthn m: subset Foo where 42; multi x(Int) { 'a' }; multi x(Foo) { 'b' }; say x(42)
18:31 camelia rakudo-moar da5278: OUTPUT«a␤»
18:31 jnthn m: subset Foo of Int where 42; multi x(Int) { 'a' }; multi x(Foo) { 'b' }; say x(42)
18:31 camelia rakudo-moar da5278: OUTPUT«b␤»
18:32 * TimToady should probably not be let anywhere near a computer today, after getting only a couple hours of sleep
18:32 grondilu (Perl 6 is mentioned at around 20:45)
18:32 TimToady we got up at 4 to catch an airplane, which broke, and delayed us 3 hours
18:32 jnthn Hope it managed to break while you were still on the ground?
18:33 TimToady yes, but they eventually put us onto a different plane
18:33 jnthn Phew :)
18:33 TimToady and gave that plane to the people flying to Philadelphia
18:34 jnthn I'm sure they were thrilled...
18:35 * jnthn is mostly tired from the unreasonably hot weather
18:36 jnthn It broke a couple of records yesterday
18:36 jnthn (Of the "hottest 24th June in location X" style)
18:37 dalek doc: c3de8f2 | (Jan-Olof Hendig)++ | doc/Type/Instant.pod:
18:37 dalek doc: Added docs for Instant.Date
18:37 dalek doc: review: https://github.com/perl6/doc/commit/c3de8f21fd
18:37 gfldex jnthn: the rain has arived here in south eastern germany about 20min ago. Will be with you shortly. :)
18:38 jnthn \o/
18:38 nine jnthn: still so hot up there? There's been massive thunderstorms north of the Chech border already a couple hours ago
18:38 Zoffix joined #perl6
18:38 jnthn We had about 10 minutes worth of hail earlier. Still waiting on the real rain that was forecast to show up.
18:40 jjido joined #perl6
18:40 Zoffix kalkin-, subset Foo where Bar | Moo | Meow; is the same as subset Foo of Any where Bar | Moo | Meow; is the same as subset Foo of Any where * ~~ Bar | Moo | Meow; is the same as subset Foo of Any where { $_ ~~ Bar | Moo | Meow }; is the same as subset Foo of Any where { $_ ~~ any(Bar, Moo, Meow) };. The reason your subset Foo of Bar|Moo|Meow wasn't working is because you were applying the `of` to the constraints rather than the type you wanted to
18:40 Zoffix constrain.
18:41 kalkin- Zoffix: Huge thanks for the elaborate explanation.
18:45 Actualeyes left #perl6
18:45 nine jnthn: looks like the pre-frontal wave missed you barely. The cold front is now at the German/Chech border and will probably reach you in 2-3 hours.
18:49 jnthn I'll look forward to the...uh...full-frontal???...wave then I, guess. :P
18:50 jnthn Grr, it's still too warm to get this blog post written.
18:51 nine jnthn: maybe watching Portugal - Croatia is just the better idea right now ;)
18:51 * jnthn gives up for now in favor of icecream and seeing if Croatia can put Ronaldo in a bad mood again...
18:51 jnthn Heh :)
18:51 ssotka joined #perl6
18:57 raiph joined #perl6
18:58 kerframil joined #perl6
18:59 raiph bisect: use experimental :macros; macro polo ($ast) { quasi { say 42; say {{{ $ast }}} } }; polo 11
18:59 bisectable raiph: no build for such “bad” revision. Right now the build process is in action, please try again later or specify some older “bad” commit (e.g. bad=HEAD~40)
19:03 pmurias_ joined #perl6
19:03 BinGOs joined #perl6
19:04 AlexDaniel bisect: bad=HEAD~10 use experimental :macros; macro polo ($ast) { quasi { say 42; say {{{ $ast }}} } }; polo 11
19:04 bisectable AlexDaniel: on both starting points the exit code is 0 and the output is identical as well
19:04 AlexDaniel bisect: use experimental :macros; macro polo ($ast) { quasi { say 42; say {{{ $ast }}} } }; polo 11
19:04 bisectable AlexDaniel: on both starting points the exit code is 0 and the output is identical as well
19:05 AlexDaniel raiph: I was wondering who would be the first one to stumble upon this error message :)
19:05 colomon joined #perl6
19:07 AlexDaniel Zoffix: “Perl 5 didn't have types” – I'm not sure if that is true…
19:08 nine Perl 5 does have a couple of types. They're just not as fine grained.
19:09 geekosaur perl5's types are certainly much weaker
19:10 AlexDaniel sure-sure, but there's a huge leap from that to “perl 5 does not have types”
19:11 raiph AlexDaniel++ # bisectable
19:14 Zoffix AlexDaniel, what is that from?
19:15 AlexDaniel Zoffix: http://perl6.party/post/Per​l-6-Types--Made-for-Humans
19:15 Zoffix AlexDaniel, what types does Perl 5 have?
19:16 AlexDaniel Zoffix: well, perldata and perlintro claim that there are scalars, arrays and hashes
19:16 Zoffix :/
19:17 * Zoffix ignores this conversation and returns to hacking
19:17 AlexDaniel huggable: dunno
19:17 huggable AlexDaniel, ¯\_(ツ)_/¯
19:26 jjido joined #perl6
19:31 raiph bisect: use experimental :macros; macro a { quasi {{{ 42 }}} }; a
19:31 bisectable raiph: on both starting points the exit code is 0 and the output is identical as well
19:31 raiph m: use experimental :macros; macro a { quasi {{{ 42 }}} }; a
19:31 camelia rakudo-moar d4a0e0: OUTPUT«Weird node visited: QAST::BVal␤»
19:39 japhb joined #perl6
20:04 AlexDaniel raiph: this is only 2015.12..HEAD, perhaps you're looking for earlier changes?
20:05 raiph AlexDaniel: I just wondered if it had ever worked. I searched RT for a matching bug and didn't find one.
20:05 raiph Well, worked without the warning I mean
20:06 _mg_ joined #perl6
20:07 lichtkind__ joined #perl6
20:10 Xliff joined #perl6
20:11 japhb joined #perl6
20:13 mr-foobar joined #perl6
20:19 jjido joined #perl6
20:25 kalkin- Say i have a class Foo in lib/Foo.pm6 and class Bar is Foo in lib/Foo/Bar.pm6 now i want to get all the classes existing in namespace Foo::, how do I do that?
20:25 kalkin- I already tried Foo::.keys() but this doesn't return me the class
20:26 moritz m: class Foo::Bar { }; say Foo.HOW.keys
20:26 camelia rakudo-moar d4a0e0: OUTPUT«0..0␤»
20:26 moritz m: class Foo::Bar { }; say Foo.WHO.keys
20:26 camelia rakudo-moar d4a0e0: OUTPUT«(Bar)␤»
20:27 moritz m: class Foo::Bar { }; say Foo.WHO.values
20:27 camelia rakudo-moar d4a0e0: OUTPUT«((Bar))␤»
20:27 moritz m: class Foo::Bar { }; say Foo::.values
20:27 camelia rakudo-moar d4a0e0: OUTPUT«((Bar))␤»
20:27 moritz kalkin-: .keys will return the names, not the type objects
20:27 kalkin- moritz: Hmm here locally it doesn't return the class
20:28 moritz kalkin-: what does it return?
20:28 kalkin- Two other classes which don't inherite from Foo
20:28 moritz kalkin-: well, it gives you everything in the Foo:: namespace
20:28 moritz independently of where it comes from, and of inheritance
20:29 kalkin- I do: Foo; class Foo::Bar is Foo {} in lib/Foo/Bar.pm. so it should be in Foo namespace shouldn't it?
20:30 kalkin- or is Foo not a namespace because it's also the class name?
20:30 dupek joined #perl6
20:35 moritz it should be, yes
20:35 moritz but using Foo; doesn't autoamtically import Foo::Bar
20:36 moritz you have to explicitly "use Foo::Bar" when Foo::Bar is in Foo/Bar.pm
20:45 kalkin- here example where it doesn't work https://github.com/kalkin/Foo.git
20:45 domidumont joined #perl6
20:45 kalkin- The test.pm6 only returns Buz
20:45 kalkin- but no Bar
20:45 rindolf joined #perl6
20:46 domidumont joined #perl6
20:46 Zoffix looks like .htaccess fix for LE didn't take.
20:46 Zoffix on docs.perl6.org
20:49 moritz seems I forget to create a cron job for let's encrypt :(
20:49 moritz running it manually now
20:49 moritz slooooow
20:50 moritz (the official client at least)
20:50 moritz I should switch to simp_le, which works a bit smoother on another server I use
20:51 moritz Zoffix: certificate renewed
20:53 Zoffix moritz++
20:56 kalkin- Ok i think i found my problem. To extend Bar with Foo, i need to do use Foo; in lib/Foo/Bar.pm6, but then i can not have use Foo::Bar in lib/Foo.pm6--which would it make visible for Foo::.keys()-because it creates a circular dependency.
20:56 DG_ joined #perl6
21:01 _mg_ joined #perl6
21:04 TEttinger joined #perl6
21:07 aries_liuxueyang joined #perl6
21:11 dogbert17 The owner of doc.perl6.org has configured their website improperly. To protect your information from being stolen, Firefox has not connected to this website.
21:12 moritz dogbert17: I've just renewed the certificate
21:12 dogbert17 moritz: will it take some time for Firefox to pick it up?
21:12 moritz dogbert17: a reload should be enough
21:13 dogbert17 all my browsers complain, IE, FF and Chrome
21:13 Zoffix dogbert17, try pressing CTRL+F5
21:14 moritz dogbert17: check your system clock
21:14 Zoffix oh :D
21:14 moritz Valid from Sat, 25 Jun 2016 19:50:00 UTC
21:14 moritz if your clock is half an our off, it might not be valid yet for you :-)
21:15 moritz (or time zone wrongly configured, or something like that)
21:15 dogbert17 must be Win 7 playing ticks on me, time is 23:15
21:15 jjido joined #perl6
21:15 dogbert17 s/ticks/tricks/
21:15 mst FF on win10 is totally happy
21:15 dogbert17 it works i my Virtualbox
21:15 moritz https://www.ssllabs.com/ssltest/analyze.​html?d=doc.perl6.org&amp;hideResults=on is happy too
21:16 dogbert17 ok, so the fault is with me then :(
21:20 moritz dogbert17: I guess it'll work again tomorrow
21:20 moritz if not, worth inestigating further
21:25 dogbert17 moritz: you're probably right. I can still view the site if I ignore the browser complaints
21:27 Exodist joined #perl6
21:29 Xliff m: class A { ... }; sub f(A $n) { $n.data = 1 }; class A { has $.data is rw; method new { f(self) } }; say A.new.data
21:29 camelia rakudo-moar d4a0e0: OUTPUT«Cannot look up attributes in a type object␤  in method new at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
21:29 Xliff Is self not defined in new()?
21:30 Xliff If so, how can I call an initializing routine on an object at creation time?
21:30 Zoffix m: class Foo { method new { say self } }; Foo.new
21:30 camelia rakudo-moar d4a0e0: OUTPUT«(Foo)␤»
21:30 Zoffix Xliff, it's a type, not the object yet. You need bless
21:32 Exodist joined #perl6
21:32 Xliff m: class A { ... }; sub f(A $n) { $n.data = 1 }; class A { has $.data is rw; method new { f(self.bless) } }; say A.new.data
21:32 camelia rakudo-moar d4a0e0: OUTPUT«Method 'data' not found for invocant of class 'Int'␤  in block <unit> at <tmp> line 1␤␤»
21:34 Zoffix You need to return the object from .new. Right now you're returning 1 :)
21:34 Zoffix (the object being what .bless gives you)
21:35 Zoffix m: class A { ... }; sub f(A $n) { $n.data = 1; }; class A { has $.data is rw; method new { given self.bless { f $_; $_ }} }; say A.new.data
21:35 camelia rakudo-moar d4a0e0: OUTPUT«1␤»
21:36 Zoffix m: class A { ... }; sub f(A $n) { $n.data = 42; }; class A { has $.data is rw; submethod BUILD { f self } }; say A.new.data
21:36 camelia rakudo-moar d4a0e0: OUTPUT«42␤»
21:43 _dolmen_ joined #perl6
21:44 firstdayonthejob joined #perl6
22:15 Xliff Hrm. I'm running into a chicken and egg problem.
22:16 cdg joined #perl6
22:24 TakinOver joined #perl6
22:35 Xliff (╯°□°)╯︵ ┻━┻
22:35 Zoffix (╯°□°)╯︵ ┻━┻(╯°□°)╯︵ ┻━┻(╯°□°)╯︵ ┻━┻(╯°□°)╯︵ ┻━┻(╯°□°)╯︵ ┻━┻(╯°□°)╯︵ ┻━┻
22:36 Zoffix Xliff, https://github.com/zoffixznet/perl6-Acme-GiveUp
22:39 Xliff HAHAHAHA!
22:39 Xliff Yeah. I'm close to that.
22:40 Xliff This "self.bless(xmlNewText($text.Str))" is giving me this: "Too many positionals passed; expected 1 argument but got 2"
22:40 Xliff WTF?
22:40 Xliff m: say 1234.Str
22:40 camelia rakudo-moar d4a0e0: OUTPUT«1234␤»
22:41 Xliff m: say 1234.Str.WHAT
22:41 camelia rakudo-moar d4a0e0: OUTPUT«(Str)␤»
22:41 aries_liuxueyang joined #perl6
22:51 Xliff :S
22:51 Xliff I didn't need self.bless -- LOL!
22:54 Zoffix heh
22:54 Zoffix m: class Foo { method new { 31337 } }; say Foo.new.is-prime # .new doesn't return a Foo then tho
22:54 camelia rakudo-moar d4a0e0: OUTPUT«True␤»
22:55 Zoffix m: class Foo { method new { 31337 } }; say Foo.new.^name
22:55 camelia rakudo-moar d4a0e0: OUTPUT«Int␤»
22:55 Xliff How do you specify multiple conditions for a "when" statement?
22:56 Xliff m: given 42 { when any(^31) { say "Heave" }; when 42 { say "Ho" } }
22:56 camelia rakudo-moar d4a0e0: OUTPUT«Ho␤»
22:56 Xliff m: given 42 { when any(42, 31, 0) { say "Heave" }; when 1 { say "Ho" } }
22:56 camelia rakudo-moar d4a0e0: OUTPUT«Heave␤»
22:57 Xliff m: given 42 { when [42, 31, 0] { say "Heave" }; when 1 { say "Ho" } }
22:57 camelia rakudo-moar d4a0e0: ( no output )
22:57 Xliff m: given 42 { when 42|31|0 { say "Heave" }; when 1 { say "Ho" } }
22:57 camelia rakudo-moar d4a0e0: OUTPUT«Heave␤»
22:57 Xliff Hrm.
22:58 Zoffix m: given 42 { when 42 or 32 { say "Heave" }; when 1 { say "Ho" } } # also works
22:58 camelia rakudo-moar d4a0e0: OUTPUT«Heave␤»
23:00 tbrowder docs: please check another attempt PR: https://github.com/perl6/doc/pull/637
23:01 Zoffix m: given 42 { when $_ == 42 or $_ == 3  { say "Heave" }; when 1 { say "Ho" } } # also works
23:01 camelia rakudo-moar d4a0e0: OUTPUT«Heave␤»
23:03 Zoffix tbrowder, what are the actual changes of this happening? https://github.com/perl6/doc/pull/637/files​#diff-d6f804343590cb98d5bbbd4b15e4d3cbR295
23:03 Zoffix Seems this doesn't belong in the docs.
23:04 Zoffix s/changes/chances/;
23:06 Zoffix Such a change would literally break every piece of Perl 6 code I ever wrote. The benefits would have to be enormous for such a change to make it into the language.
23:11 zakharyas joined #perl6
23:15 tbrowder First, such a change would not be a catastrophe IMHO (and I don't write decls with a space).  Next, I'm approximately paraphrasing TimToady when he acknowledged the problem with the space after the function name in the call (he may not have meant the decl would change).  At this time I don't think it's too early to toss in a warning about the chance of such
23:15 tbrowder a change.  Finally, if it ever happens, I assume that there may be a way to not break existing code by some kind of environment variable, or pragma, or some such.
23:15 Xliff \o/
23:16 cdg joined #perl6
23:16 Xliff OK. Now I can take a bit of a break. BBL.
23:20 Zoffix There's no change. I don't understand why we need warnings or even think about pragmas and environmental variables.
23:21 Zoffix tbrowder, did the conversation with TimToady happen here or in person?
23:22 Zoffix This is just a good way to start a rumor that sub foo () {} is a bad idea and the next thing you know it's in a style guide because TimToady said there's a problem "with the space after a function call and he may not have meant the decl would change"
23:27 tbrowder Zoffix: in person (in a hall conversation), and he will probably smack me if he ever sees me again, but that's what I heard; however, if this causes such turmoil I will certainly remove it. (But you don't ever expect to see deprecations over the life of P6?)
23:30 Zoffix tbrowder, I don't expect us to plan for removal of an essential syntax of the language for no apparent reason. There's no problem I'm aware of with a space before parameters.
23:31 * Zoffix runs a grep to see how much code would break
23:31 tbrowder Okay.
23:34 tbrowder Zoffix, please check the PR now and see if that will fly.
23:34 Zoffix tbrowder, looks good, thanks.
23:35 tbrowder My pleasure!
23:39 Zoffix Based on the May 3rd snapshot of the ecosystem, such a change would break 280 distributions.
23:40 huggable joined #perl6
23:40 Zoffix huggable, grep ecosystem :is: How many dists use `foo`: Change the grep regex for what you're looking for: cd $(mktemp -d); git clone https://github.com/moritz/perl6-all-modules .; grep -REl '(method|sub|multi)\s+\S+\s+\(' . | perl -nE 'say join "/", (split "/")[1,2]' | sort | uniq | wc -l
23:40 huggable Zoffix, Added grep ecosystem as How many dists use `foo`: Change the grep regex for what you're looking for: cd $(mktemp -d); git clone https://github.com/moritz/perl6-all-modules .; grep -REl '(method|sub|multi)\s+\S+\s+\(' . | perl -nE 'say join "/", (split "/")[1,2]' | sort | uniq | wc -l
23:52 Zoffix left #perl6
23:54 tbrowder Zoffix: how did you get Wendy's brochure?  It's great to put in the docs repo--can we get the pdf version linked on the docs home page?
23:54 parabolize tbrowder: https://github.com/wendyga/Perl6Brochure
23:56 tbrowder yes, I know the source, but IMHO it needs to be mention on the docs home page (shall I make a PR?)
23:58 mscha joined #perl6
23:59 mscha m: my @a = 4,5,6; my @b = (1,2,3, flat @a); say @b;
23:59 camelia rakudo-moar d4a0e0: OUTPUT«[1 2 3 (4 5 6)]␤»
23:59 parabolize I think Zoffix got brochure from the source and made a pdf of it
23:59 mscha How do I fix this?  (I want [1 2 3 4 5 6])

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

Perl 6 | Reference Documentation | Rakudo