Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-07-24

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:00 TimToady m: constant $i = 42; my $foo:bar«$i»;
00:00 camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤QAST::Var with scope '' NYI␤»
00:01 TimToady m: constant $i = 42; my $foo:bar[$i];
00:01 camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤QAST::Var with scope '' NYI␤»
00:01 TimToady m: constant $i = 42; my $foo:bar($i)
00:01 camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤QAST::Var with scope '' NYI␤»
00:01 TimToady well, it's consistent anyway
00:02 mniip joined #perl6
00:02 s34n TimToady: how did we get a multi here?
00:02 TimToady dunno why the scope is '' though, should be 'my'
00:03 TimToady a proto rule automatically forces its subrules to be multi, you don't have to say 'multi' explicitly
00:04 s34n how did we get subrules?
00:04 TimToady I mean the candidate rules that match the name of the proto
00:04 TimToady (on the front)
00:05 s34n so mult-operator would become a subrule of mult-op?
00:06 s34n because the name mult-op doesn't match mult-op:sym<times> to me
00:06 TimToady well, subrule is probably the wrong name for a candidate, since usually we mean something called directly via <foo> when we say "subrule"
00:06 TimToady the multies are called indirectly through the proto
00:07 s34n how does mult-op:sym<times> get connected to mult-op?
00:07 s34n how are they associated with each other?
00:07 TimToady when the grammar calls <infix>, all the infix:sym<*> are really just alternate definitions that the proto knows about, and it arranges to call the candidates in order of which ones matched the longest token
00:08 geekosaur oh, it does do that
00:08 TimToady LTM just gives an ordering to call the candidates, but the first candidate must still match entirely, or it bombs out and goes to the next candidate, and so on
00:10 s34n again, how are mult-op and mult-op:sym<times> associated with each other?
00:11 ShimmerFairy s34n: via an explicit proto token mult-op {*} definition in the grammar
00:11 s34n given any identifier, how can I find all identifiers of the same name appended with a pair?
00:12 ShimmerFairy I'm not sure, actually. Most likely via methods in the MOP somewhere, though it may likely be difficult.
00:12 s34n $foo and $foo:bar<baz> can be associated somehow?
00:12 TimToady you don't have to worry about that, and shouldn't
00:12 TimToady it'd be like a parent class trying to determine all the possible methods of its derived classes
00:13 TimToady the whole point is that it's extensible by child classes
00:13 geekosaur joined #perl6
00:13 s34n TimToady: yes. i have to worry about with my current lack of understanding. I have to know if mult-operation will be associated with mult-op
00:13 dalek doc: a27516d | (Wenzel P. P. Peppmeyer)++ | doc/Language/syntax.pod6:
00:13 dalek doc: doc colon pair as part of identifier
00:13 dalek doc: review: https://github.com/perl6/doc/commit/a27516d01f
00:13 dalek doc: f1bf208 | (Wenzel P. P. Peppmeyer)++ | htmlify.p6:
00:13 dalek doc: remove workaround for Failure eating await
00:13 dalek doc: review: https://github.com/perl6/doc/commit/f1bf208f8a
00:13 TimToady you mean because "mult-operation" starts with "mult-op"?
00:13 TimToady no
00:14 TimToady it must match everything before the :sym
00:15 TimToady accidental prefixes won't accidentally trigger any inadvertent behaviors
00:15 s34n so the fact that there's a pair included in the identifier makes a difference?
00:15 ShimmerFairy TimToady: Now I wonder what $a:b<c> provides for variables (I know why grammar rules make use of it, but don't see how that extends to variable names).
00:16 TimToady yes, it's a requirement for candidate tokens
00:16 s34n TimToady: what about mult-op:times ?
00:16 TimToady with variables, it only lets you sneak non-ident chars into the identity
00:16 s34n :times isn't a pair, so it doesn't count?
00:16 TimToady yes, that's a pair
00:17 TimToady it just defaults the value to True
00:17 dalek doc: d9a6d8e | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6:
00:17 dalek doc: index S and R meta ops
00:17 dalek doc: review: https://github.com/perl6/doc/commit/d9a6d8ebc3
00:17 ShimmerFairy All pairs written like  :times  defaults to a value of True, fwiw. (And :!times would be a False pair.)
00:17 TimToady m: dd :foo
00:17 camelia rakudo-moar 32c08b: OUTPUT«block <unit>␤»
00:17 TimToady m: dd (:foo)
00:17 camelia rakudo-moar 32c08b: OUTPUT«:foo␤»
00:18 TimToady m: print :foo
00:18 camelia rakudo-moar 32c08b: OUTPUT«Unexpected named parameter 'foo' passed␤  in block <unit> at <tmp> line 1␤␤»
00:18 TimToady m: print (:foo)
00:18 camelia rakudo-moar 32c08b: OUTPUT«foo  True»
00:18 TimToady m: print (:!foo)
00:18 camelia rakudo-moar 32c08b: OUTPUT«foo  False»
00:18 TimToady m: print (:42foo)
00:18 camelia rakudo-moar 32c08b: OUTPUT«foo  42»
00:19 kurahaupo joined #perl6
00:19 TimToady m: my $foo = 42; print (:$foo)
00:19 camelia rakudo-moar 32c08b: OUTPUT«foo  42»
00:19 s34n m: my $foo:bar<baz> = 42; says $foo:bar[baz];
00:19 camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null; VMNull)␤»
00:19 s34n m: my $foo:bar<baz> = 42; say $foo:bar[baz];
00:19 camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null; VMNull)␤»
00:20 zacts joined #perl6
00:20 TimToady m: my $foo:bar<baz> = 42; say $foo:bar('baz');
00:20 camelia rakudo-moar 32c08b: OUTPUT«42␤»
00:20 TimToady [] does not quote
00:21 s34n :43foo is a pair?
00:21 TimToady as special form
00:21 TimToady mostly useful for s:2nd/foo/bar/
00:21 TimToady change the 2nd foo to bar
00:21 maddingue joined #perl6
00:22 TimToady but also used for .later(:3days) and such
00:22 s34n m: my $foo:bar<baz> = 42; say $foo:bar{baz};
00:22 camelia rakudo-moar 32c08b: OUTPUT«Block object coerced to string (please use .gist or .perl to do that)  in any canonicalize_pair at src/Perl6/World.nqp line 4351␤Block object coerced to string (please use .gist or .perl to do that)  in any canonicalize_pair at src/Perl6/World.nqp line 4…»
00:22 TimToady {} doesn't autoquote either
00:22 kurahaupo joined #perl6
00:23 TimToady but you can't just throw [] or {} in there in place of () anyway
00:23 s34n m: my $foo:bar<baz> = 42; say $foo:bar«baz»;
00:23 camelia rakudo-moar 32c08b: OUTPUT«42␤»
00:23 TimToady [] makes arrays, and {} makes blocks
00:25 s34n m: 'foofoo' ~~ s:2nd/foo/bar/;
00:25 camelia rakudo-moar 32c08b: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at <tmp> line 1␤␤»
00:25 s34n m: 'foofoo' =~ s:2nd/foo/bar/;
00:25 camelia rakudo-moar 32c08b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~␤at <tmp>:1␤------> 3'foofoo' =~7⏏5 s:2nd/foo/bar/;␤»
00:26 TimToady in all the bracketed forms, :foo(...) means the same as foo => (...), :foo[...] means foo => [...], :foo{...} means foo => {...}
00:26 TimToady and :foo<bar baz> means the same as foo => <bar baz>
00:27 TimToady m: $_ = 'foofoo'; s:2nd/foo/bar; .say
00:27 camelia rakudo-moar 32c08b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed replacement part; couldn't find final /␤at <tmp>:1␤------> 3$_ = 'foofoo'; s:2nd/foo/bar; .say7⏏5<EOL>␤    expecting any of:␤        infix stopper␤»
00:27 TimToady m: $_ = 'foofoo'; s:2nd/foo/bar/; .say
00:27 camelia rakudo-moar 32c08b: OUTPUT«foobar␤»
00:27 s34n I get that. Now I'm trying to understand your special :42foo
00:28 s34n and the substitution baffles me
00:28 TimToady in what way?
00:28 TimToady m: $_ = 'foofoo'; s :2nd /foo/bar/; .say
00:28 camelia rakudo-moar 32c08b: OUTPUT«foobar␤»
00:28 s34n :2nd/foo/ becomes a pair, no?
00:29 TimToady m: $_ = 'foofoo'; s :nd(2) /foo/bar/; .say
00:29 camelia rakudo-moar 32c08b: OUTPUT«foobar␤»
00:29 s34n ah
00:29 TimToady the s/// operator looks specially for a subset of adverbs there
00:29 TimToady again, a special form, but based on a recurring pattern
00:29 TimToady as masak++ puts it, "Strangely Consistent"
00:30 s34n m: say :2nd;
00:30 camelia rakudo-moar 32c08b: OUTPUT«Unexpected named parameter 'nd' passed␤  in block <unit> at <tmp> line 1␤␤»
00:30 TimToady m: say (:2nd)
00:30 camelia rakudo-moar 32c08b: OUTPUT«nd => 2␤»
00:31 s34n m: say (:nd2);
00:31 camelia rakudo-moar 32c08b: OUTPUT«nd2 => True␤»
00:31 s34n m: say (:'this'try);
00:31 camelia rakudo-moar 32c08b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus statement␤at <tmp>:1␤------> 3say (:7⏏5'this'try);␤    expecting any of:␤        colon pair␤»
00:31 TimToady notice it has to distinguish :16<deadbeef> from :16deadbeef
00:31 dalek bisectbot: e0be906 | (Daniel Green)++ | Perl6IRCBotable.pm:
00:31 dalek bisectbot: Show any output even if the code segfaults
00:31 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/e0be906f44
00:32 s34n m: say(:16<deadbeef>)
00:32 camelia rakudo-moar 32c08b: OUTPUT«3735928559␤»
00:32 ShimmerFairy s34n: it's just a funny form so you could write a :2nd adverb that's otherwise against the identifier rules. It also works out nice for DateTime, e.g. :5days
00:32 ShimmerFairy m: $_ = 'foofoofoo'; s :3st /foo/bar/; .say
00:32 camelia rakudo-moar 32c08b: OUTPUT«foofoobar␤»
00:33 TimToady yes, you can abuse it
00:33 AlexDaniel MasterDuke: timeouts you mean :)
00:34 Actualeyes left #perl6
00:34 MasterDuke AlexDaniel: hmm, should do either i think
00:35 dalek doc: 066b3ba | (Wenzel P. P. Peppmeyer)++ | doc/ (4 files):
00:35 dalek doc: index \ in 4 different spots
00:35 dalek doc: review: https://github.com/perl6/doc/commit/066b3bab08
00:37 zacts what optimization work is being done for rakudo?
00:37 zacts and what progress has happened since last christmas?
00:39 AlexDaniel .seen huggable
00:39 yoleaux I saw huggable 22 Jul 2016 18:09Z in #perl6: <huggable> unmatched}, Added speed is as Some speed stats: http://tux.nl/Talks/CSV6/speed4.html
00:39 AlexDaniel zacts: take a look at this link ↑
00:39 s34n zacts: Larry Wall recently stated that rakudo has become twice as fast since Christmas
00:39 TimToady well, it depends on what you're actually doing, of course
00:40 zacts cool! thanks
00:40 zacts nice progress!
00:40 gfldex Pod::To::BigPage (what avoids class as hard as possible) is nearly 3x as fast these days
00:41 gfldex atually it's more then 3x because the docs have grown quite a bit too
00:43 s34n TimToady: so the pair in the identifier somehow makes the token subordinate to the proto?
00:46 TimToady precisely :)
00:46 s34n TimToady: but it has to be a pair. there's no other trigger?
00:47 TimToady correct, as currently implemented
00:47 TimToady doubtless there's some ways by sneaking in at the meta level to add other candidates, but we don't support that at the language level
00:48 TimToady and if you try to, we'll be sure to break it in the future :)
00:53 * zacts installs perl6
00:56 s34n what does ~ mean inside a regex?
00:56 ShimmerFairy It's a way to group open/close delimiters together visually
00:57 ShimmerFairy e.g.  / '(' ~ ')' <inner-stuff> /  vs.  / '(' <inner-stuff> ')' / . The specs claim improved diagnostics as another plus, but I don't know if that's actually implemented in reality.
01:05 TimToady m: say [ "stuff"
01:05 camelia rakudo-moar 32c08b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in array composer; couldn't find final ']' ␤at <tmp>:1␤------> 3say [ "stuff"7⏏5<EOL>␤    expecting any of:␤        statement end␤        statement modifier␤     …»
01:06 TimToady there's an example of it
01:06 Juerd How would you get a similar diagnostic from a simple regex match?
01:06 TimToady you have to define FAILGOAL to get a diagnostic instead of backtracking
01:07 TimToady it always used to fail immediately, but last year it was argued that backtracking was a more expected default
01:09 gfldex zacts: if you installed Perl 6 from any distro package please make sure it's not halve a year old.
01:09 zacts gfldex: I'm going to not use the distro version
01:09 zacts I'm installing the latest via the perlbrew clone for p6 (I forget the name)
01:09 Juerd failgoal doesn't seem to be documented :(
01:09 zacts give me 15 min or so to finish up another project I'm working on
01:09 zacts :-)
01:10 abruanese joined #perl6
01:11 AlexDaniel gfldex: actually, I see no problem with 6-month old rakudo
01:11 Juerd I like the ToC at the side in doc.perl6.org
01:11 Juerd Gives the whole site a much cleaner appearance
01:11 AlexDaniel maybe a bit slower, but otherwise OK
01:11 gfldex AlexDaniel: if you enjoy stepping in up to 6 month old bugs, you wont have anything to worry about
01:12 zacts regardless, I'm going to follow the latest rakudo
01:12 gfldex i'm quite happy to not have segfaults anymore just because i use `do await start`
01:12 AlexDaniel gfldex: oh, it was improved? :)
01:12 AlexDaniel if so, then you're right
01:14 gfldex and most of the speed up (that I see) came with the bugfix that made the inliner inline things
01:16 zacts ok I'm using rakudobrew
01:17 infina joined #perl6
01:17 infina joined #perl6
01:23 gfldex m: subset FilledStr of Str where * ne ""; my FilledStr @a; @a.push("abc").push("");;
01:23 camelia rakudo-moar 32c08b: OUTPUT«Type check failed in assignment to @a; expected FilledStr but got Str ("")␤  in block <unit> at <tmp> line 1␤␤»
01:24 gfldex m: sub niler{Nil}; subset FilledStr of Str where * ne ""; my FilledStr @a; @a.push("abc").push(Nil); say @a;
01:24 camelia rakudo-moar 32c08b: OUTPUT«[abc (FilledStr)]␤»
01:24 gfldex m: sub niler{Nil}; subset FilledStr of Str where * ne ""; my FilledStr @a; @a.push("abc").push(Nil); put @a;
01:24 camelia rakudo-moar 32c08b: OUTPUT«Use of uninitialized value @a of type FilledStr in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at <tmp> line 1␤abc ␤»
01:25 zacts which of panda or zef should a newbie like myself use?
01:25 gfldex zef
01:25 zacts ok
01:26 molaf joined #perl6
01:30 zacts so .pl6 for the filename extension?
01:30 zacts or is it now .p6?
01:30 zacts I'm following the Perl6 Introduction guide
01:31 gfldex most use .p6 and .pm6
01:31 zacts I just want to make sure it's still up-to-date
01:31 zacts ok
01:31 zacts perhaps this guide should be updated?
01:31 gfldex and .pod6 for pure pod stuff
01:31 gfldex IIRC there was communication with github folk to make github understand our files
01:32 AlexDaniel I've seen .pl6 several times but it looks weird
01:33 AlexDaniel gfldex: https://github.com/perl6/doc/issues/167
01:33 zacts should I patch the guide?
01:33 gfldex zacts: it only matters for windows as they don't got a magic file. But the msi doesn't register the file ending, so there is no harm done for now.
01:33 AlexDaniel it feels like it is not going anywhere: https://github.com/github/markup/issues/907
01:33 gfldex zacts: it would help to be consistent to allow us registering the extension on windows
01:33 FROGGS joined #perl6
01:33 zacts ok
01:34 gfldex m: my $a := Nil; say "$a"; say "alive";
01:34 camelia rakudo-moar 32c08b: OUTPUT«Use of Nil in string context  in block <unit> at <tmp> line 1␤␤alive␤»
01:35 gfldex m: my $a := Nil; spurt("$a.html"); say "alive";
01:35 camelia rakudo-moar 32c08b: OUTPUT«Use of Nil in string context  in block <unit> at <tmp> line 1␤spurt is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub spurt at src/RESTRICTED.setting line 17␤  in block <unit> at <tmp> line 1␤␤»
01:35 zacts cool, I executed my first: say "hello, world!"; # script
01:35 zacts so I have it installed, I'll have a look at the tutorials soon. Thanks
01:36 gfldex that's where I believe those 4 .html come from htmlify.p6 tries to create.
01:37 gfldex since Nil is so slippery, I have no idea how to catch it.
01:37 gfldex m: use Fatal; my $a := Nil; spurt("$a.html"); say "alive";
01:37 camelia rakudo-moar 32c08b: OUTPUT«===SORRY!===␤Could not find Fatal at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::Reposit…»
01:37 gfldex m: use fatal; my $a := Nil; spurt("$a.html"); say "alive";
01:37 camelia rakudo-moar 32c08b: OUTPUT«Use of Nil in string context  in block <unit> at <tmp> line 1␤spurt is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub spurt at src/RESTRICTED.setting line 17␤  in block <unit> at <tmp> line 1␤␤»
01:38 gfldex `use fatal` works
01:39 gfldex sadly I don't get a stacktrace to see where that Nil actually comes from.
01:46 dalek doc: bf4874a | (Zoffix Znet)++ | doc/Language/containers.pod6:
01:46 dalek doc: Close unclosed X<> token
01:46 dalek doc: review: https://github.com/perl6/doc/commit/bf4874a711
01:46 kalkin-_ joined #perl6
01:49 gfldex there may be another problem that has killed the search on docs.perl6.org. Working on it.
01:49 Actualeyes joined #perl6
01:51 gfldex i was mistaken use fatal doesn't work to catch interpolation of Nil
01:51 gfldex is there anything else in the general area of use fatal that will turn Nil interpolation into somethign CATCHable?
01:58 dalek bisectbot: 6341f19 | (Daniel Green)++ | / (4 files):
01:58 dalek bisectbot: Better handling of exit codes and signals
01:58 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/6341f19243
02:07 gfldex m: sub niler{Nil}; my Str:D $a = niler() // Failure.new('got nil'); spurt("$a.html"); say "alive";
02:07 camelia rakudo-moar 32c08b: OUTPUT«Earlier failure:␤ got nil␤␤Final error:␤ Type check failed in assignment to $a; expected Str:D but got Failure (Failure.new(exception...)␤  in block <unit> at <tmp> line 1␤␤»
02:07 gfldex finally!
02:09 danaj joined #perl6
02:10 committabletest joined #perl6
02:12 dalek doc: 4223e85 | (Wenzel P. P. Peppmeyer)++ | doc/ (4 files):
02:12 dalek doc: better index entries for \
02:12 dalek doc: review: https://github.com/perl6/doc/commit/4223e85545
02:19 User12222 joined #perl6
02:19 User12222 http://earnwithinvite.com/index.php?ref=150359
02:20 AlexDaniel spam ↑
02:22 Xliff \o
02:23 User12222 was kicked by geekosaur: User12222
02:25 skids joined #perl6
02:43 skrshn_ joined #perl6
02:43 AlexDaniel gfldex: https://github.com/perl6/doc/is​sues/746#issuecomment-234752825 ← it looks like &nbsp; turned into actual non-breaking space
02:44 AlexDaniel making the comment almost impossible to understand :)
02:44 noganex_ joined #perl6
02:45 gfldex AlexDaniel: proving my point :->
02:45 AlexDaniel not sure what was proven there
02:46 gfldex i would give much for smart quotes that read my mind
02:48 gfldex AlexDaniel: that's not hearsay btw. I have seen that quite a few time at http://www.zerohedge.com/ (don't believe anything they write there). There are plenty of bloggers that enjoy some good copypasta-via-multiple-proxies.
02:49 AlexDaniel I see, but I don't think that it's something we are supposed to solve on our end
02:49 gfldex if you copypasta from one blog engine to another often enough, html-entities will get messed up eventually
03:14 labster joined #perl6
03:16 zacts joined #perl6
03:20 cdg joined #perl6
03:21 canopus joined #perl6
03:25 zacts hello
03:26 zacts am I banned? or was that a different message?
03:26 geekosaur that was me removing a temporary ban on a spammer from about an hour ago
03:26 zacts ah ok
03:26 zacts cool
03:27 BenGoldberg m: my @x; @x.VAR.WHAT.say
03:27 camelia rakudo-moar 32c08b: OUTPUT«(Array)␤»
03:27 BenGoldberg m: my @x; @x.VAR.say
03:27 camelia rakudo-moar 32c08b: OUTPUT«[]␤»
03:38 TEttinger zacts has been baneed for being too wonderful
03:38 TEttinger making us all look bad
03:38 TEttinger banned even
03:39 TEttinger it is good that you brought up the file ending thing before even writing your first script, that's helpful!
03:51 dalek bisectbot: 73a6a1a | (Aleks-Daniel Jakimenko-Aleksejev)++ | committable.pl:
03:51 dalek bisectbot: Spell out the signal name
03:51 dalek bisectbot:
03:51 dalek bisectbot: Now it will say this:
03:51 dalek bisectbot: «exit signal = SEGV (11)»
03:51 dalek bisectbot: instead of just:
03:51 dalek bisectbot: «exit signal = 11»
03:51 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/73a6a1a2ea
03:58 committabletest joined #perl6
04:09 zacts TEttinger: lol
04:20 dalek bisectbot: 465f84e | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (4 files):
04:20 dalek bisectbot: Less utf8 encode/decode (just decode immediately)
04:20 dalek bisectbot:
04:20 dalek bisectbot: Better than it was, but there are still ways to improve the code.
04:20 dalek bisectbot: For example, currently it may throw up on non-UTF8 data, which is less than
04:20 dalek bisectbot: awesome for git bisect (we do not want to care if it is correct UTF-8 or not,
04:20 dalek bisectbot: we just want to bisect).
04:20 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/465f84e2d7
04:25 benchable joined #perl6
04:25 committable joined #perl6
04:26 bisectable joined #perl6
04:28 s34n in a grammar, tokens can take arguments, right?
04:29 s34n Is there a way to validate a token's argument?
04:53 Cabanossi joined #perl6
04:56 cibs joined #perl6
05:01 cooper joined #perl6
05:11 llfourn s34n: tokens can be declared with a signature
05:11 llfourn the signature is a form of validation
05:12 llfourn token foo(Int $a) { ... }
05:12 CIAvash joined #perl6
05:21 konobi why did my mind suddenly jump to the idea of pki signatures for tokens instead of the proper signatures... o.O
05:29 cibs joined #perl6
05:29 geekosaur "validation" :p
05:32 konobi ah
05:37 s34n I was thinking, for lack of a better way to express it, of something like token foo(<$a=someothertoken>) { ... $a ... }
05:38 Woodi hi #perl6 :)
05:39 geekosaur not sure conflating the regex slang with signatures is a great idea
05:39 Woodi I have problem with matching \s\n after \w+ % \s ... is it OK ?  http://pastebin.com/P1B1SzUR
05:40 s34n geekosaur: no. it isn't. (I made a clumsy excuse before doing so)
05:41 s34n at any rate I figured out the proper way of doing it (I think)
05:42 s34n I was just playing around with defining a markup tag. I want the beginning tag and ending tag to have the same name...
05:43 * geekosaur wonders how relevant it is that n matches s
05:46 s34n so I have token btag { '<' <name=identifier> blah blah '>' }; token etag($name) { '<' '/' $name '>' }; token tag { (<btag>) ~ <etag($1[name])> [blah blah] }
05:47 * s34n knows $1[name] needs cleaned up
05:48 konobi well, tokens are objects just like any other, no?
05:48 s34n maybe $0[$<name>]  ?
05:49 s34n I want to invoke etag with the 'name' capture from the preceding btag
05:50 konobi s34n: maybe look at "terms"
05:51 s34n named captures are still numbered, no?
05:52 s34n I've read about nested numbered captures here: https://docs.perl6.org/languag​e/regexes.html#Capture_numbers
05:53 s34n but the next section on named captures doesn't discuss nesting
05:53 s34n oops. yes it does
05:55 geekosaur wouldn't that last be something like: token tag { <btag> ~ <etag($<btag>)> ... }
05:55 s34n geekosaur: no. it needs to match just the $<name> from $<btag>
05:56 s34n can you backreference $<btag> like that within the regex?
05:57 geekosaur $<btag><name> perhaps, then? I think you can backref like that, yes; named shoul be no different from numbered in that respect
05:57 s34n ok. yes. I see you can
05:57 s34n yeah. <etag($<btag><name>)>
06:00 s34n so a naive markup language can be defined in <20 sloc, very readable
06:01 konobi can't you recurse with the tokens so that you can see upwards and downwards?
06:03 s34n konobi: ?
06:03 s34n https://gist.github.com/anonymous​/c4a468029e0a137fbe53c08ee0a9b6b5
06:06 konobi wouldn't the etag name be it's own token?
06:07 s34n the etag is its own token. the etag name?
06:07 konobi the $name aspect
06:09 s34n the name is just an identifier. what am I missing in your question?
06:09 konobi since you're just tokenizing at this point
06:11 s34n konobi: I'm not sure I understand your question. please explain it to me
06:13 konobi in a variable '$foo' there are 2 tokens... <sigil> and <identifier> so your identifier like the variable, is just a token.
06:13 s34n konobi: feel free to fork that gist if it helps
06:15 Tonik joined #perl6
06:18 s34n konobi: how would you change that gist?
06:19 konobi not sure... got a migraine, so i'm just not grokking properly
06:20 konobi $nome -> <name> ?
06:26 wamba joined #perl6
06:43 holyghost joined #perl6
06:44 holyghost gm
06:44 telex joined #perl6
06:46 kaare__ joined #perl6
06:52 cibs joined #perl6
07:05 domidumont joined #perl6
07:07 hwcomcn joined #perl6
07:10 domidumont joined #perl6
07:14 darutoko joined #perl6
07:18 hwcomcn joined #perl6
07:20 hwcomcn joined #perl6
07:23 hwcomcn joined #perl6
07:27 hwcomcn joined #perl6
07:28 rupert160 joined #perl6
07:28 rupert160 hello team can I discuss a (maybe) bug here?
07:29 TEttinger yep, it's a bit sleepy right now though
07:30 TEttinger might take a bit for someone (who has perl 6 experience, so not me) to answer
07:30 rupert160 It might be my code. so I was wanting to validate before I submit a bug
07:30 TEttinger good plan
07:30 rupert160 I'm learning perl6
07:31 rupert160 so I can't be sure.
07:31 rupert160 my $p1 = start {say "one"; sleep 3; say "three"}
07:31 rupert160 my $p2 = start {say "two"; sleep 4: say "four"}
07:31 rupert160 await $p2;
07:31 rupert160 await $p1;
07:32 rupert160 running that code isn't happy. but running it without "await $p2" is fine
07:32 rupert160 So it's a "promise" question.
07:33 psch m: my $p1 = start { say "a"; sleep 3; say "b" }; my $p2 = start { say "c"; sleep 4; say "d" }; await $p2; await $p1
07:33 camelia rakudo-moar 32c08b: OUTPUT«a␤c␤b␤d␤»
07:34 psch well, i suppose i did the distribution of letters wrong :)
07:34 psch rupert160: what's your local rakudo version?
07:35 rupert160 Interesting that one works fine.
07:35 rupert160 Rakudo version 2016.06-80-g2f00261
07:35 rupert160 is mine
07:35 rupert160 thanks psch.
07:35 nine joined #perl6
07:35 rupert160 if yours works it must be my compiler.
07:35 psch m: say $*PERL.compiler
07:35 camelia rakudo-moar 32c08b: OUTPUT«rakudo (2016.07.1.39.g.32.c.08.b.1)␤»
07:35 hwcomcn joined #perl6
07:36 psch yeah, you're a bit behind, i'd suggest getting at least 2016.07.1
07:36 espadrine joined #perl6
07:36 rupert160 2016.06.80.g.2.f.00261
07:36 rupert160 agreed
07:36 rupert160 I'll upgrade and run again
07:36 rupert160 thanks
07:37 hwcomcn joined #perl6
07:54 CIAvash nine: ping
07:55 nine CIAvash: pong
07:57 CIAvash nine: someone who uses rakudo star 2016-07 on Windows tried to install my module and ran into some issues. https://gist.github.com/CIAvash/​b56b1c23a9d057b382f3516e020ed563
07:58 CIAvash at Testing WebService::FootballData some test files give some errors, Failed to rename file: operation not permitted
07:59 kurahaupo joined #perl6
07:59 GNUYawk joined #perl6
07:59 CIAvash do you know what's going on?
08:00 nine The rename is this one: https://github.com/rakudo/rakudo/blob/nom/src/​core/CompUnit/PrecompilationStore/File.pm#L177
08:00 nine It renames the .tmp file over the existing file.
08:01 nine As far as I could find out when implementing that, this should work on Windows just as well. But I have no way of testing that.
08:02 nine It's been that way for 2 months without anyone reporting an issue. So I wonder if we just have almost no Windows users or if it is a machine specific issue.
08:03 rindolf joined #perl6
08:05 CIAvash For this specific case the problem was solved by skipping tests, because the problem only occurs on some test files
08:07 rupert160 have updated my raduko version anyway
08:07 nine It could be that the rename fails if the file in question is still open
08:07 nine By some other process that is. Maybe even by some antivirus software.
08:16 finanalyst joined #perl6
08:33 cyphase joined #perl6
08:35 colomon joined #perl6
08:35 Woodi here is very nice functional propaganda :)  https://www.youtube.com/watch?v=7Zlp9rKHGD4  now I *want* to do functional programming however still no idea how...
08:37 konobi anyone know of any examples of trying to implement 'observables' in perl6?
08:41 setty1 joined #perl6
08:46 holyghost konobi : Do you mean JDK observables ?
08:47 konobi like rxjs
08:49 CIAvash nine: I tried to reinstall WebService::FootballData on my Linux(Rakudo 2016.07.01), it passed the tests but with the same warnings as Windows. It seems this happens only for this module and for specific files(11-team.t, 16-league.t and 17-footballdata.t) https://gist.github.com/CIAvash/​be1932aa0adc8eeb0972812e1366df28
08:49 holyghost konobi: As I thought, try wikipedia
08:50 holyghost There's Java examples there
08:50 holyghost The only thing you do is polling a list
08:50 holyghost You can also build futures into that
08:51 nine CIAvash: those warnings could be because some issue with the meta data. Can you run such a test with --ll-exception?
08:51 holyghost "do you want to be observed?", "no later" and so on
08:51 holyghost "no later, I don't know for sure
08:51 holyghost such things
08:51 holyghost afk
08:54 gfldex m: my $p1 = start { say "a"; sleep 3; say "b" }; my $p2 = start { say "c"; sleep 4; say "d" }; await $p1, $p2;
08:54 camelia rakudo-moar f1f750: OUTPUT«a␤c␤b␤d␤»
08:56 RabidGravy joined #perl6
08:57 gfldex rupert160: ^^^ please note that Promise provides a wide range of methods to say exactly how long (the implict) await should block. If you use more then one await, you can introduce a deadlock quite easyly.
08:57 konobi holyghost: oh yeah, i get it... i was just wondering if there were any examples of the concept being applied in perl6
08:59 spider-mario joined #perl6
09:01 CIAvash nine: It doesn't have any effect
09:02 CIAvash nine: and here's the code https://gitlab.com/CIAvash/WebSe​rvice-FootballData/tree/master/t
09:03 girafe joined #perl6
09:14 iH2O joined #perl6
09:16 iH2O left #perl6
09:19 pmqs joined #perl6
09:20 holyghost konobi: no, roles and subclass actors or something
09:21 holyghost joined #perl6
09:22 holyghost konobi: https://docs.perl6.org/language/objects
09:23 holyghost It's not Java AFAIK
09:24 holyghost You have to implement the pattern
09:26 konobi holyghost: you could also think of observables as a way to declare consumers/producers on a message bus, much like the one in the linux kernel, kdbus. kdbus is zero copy and fastest ipc mechanism available.
09:34 holyghost coolnes
09:35 kurahaupo joined #perl6
09:35 holyghost I am not into busses these days :-)
09:51 jnthn konobi: Supplies are observables, very much in the rxjs sense (though in reality more was borrowed from the original Rx, which is what I'm familiar with).
09:52 jnthn If you look through the set of Rx methods, you'll find Perl 6 equivalents of many of them :)
09:54 jnthn Supply.interval(0.5).tap(*.say); sleep 3 # Perl 6 for Observable.Interval(TimeSpan.FromSecon​ds(0.5)).Subscribe(Console.WriteLine); Thread.Sleep(3000); in Rx.NET :)
09:55 jnthn Though interval is one of the relatively few cases where we did take the name verbatim :)
09:57 konobi jnthn: oh... awesome
09:57 konobi jnthn: could they use kdbus?
09:58 jnthn konobi: Depends what you mean by "use". Certainly supplies have been used already in modules to expose things like message queues.
09:59 jnthn konobi: Note that neither supplies nor Rx involve a message bus in the traditional sense.
10:00 konobi jnthn: well, if they were to all have some sort of bus, you could dynamically add things like an auditing observer
10:01 konobi or forking some off for multiprocessing
10:02 trnh joined #perl6
10:04 konobi heh... distributed supply filters =0)
10:05 jnthn I suspect that's the kind of thing you could build on top of supplies. Really, they're just a chain of callbacks with a nice API for termination and errors, a bunch of useful combinators and - in Perl 6 - some syntactic support so you don't have to think in callbacks (react/suppl/whenever blocks).
10:05 jnthn They're really our ascynrhonous Seq
10:06 jnthn A Seq is a means of consuming values that you pull. Doesn't matter if they're lines from a file, rows from a database, etc.
10:06 konobi yup
10:06 jnthn Supply is a means of receiving values as they're produced. Doesn't matter if they're messages of a queue, ticks of a timer, file system notifications, incoming socket connections, etc.
10:07 konobi could also be a way to layer authorization checks against tainted inputs
10:08 * jnthn back later
10:22 gfldex m: sub niler{Nil}; my $a = Str; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ };
10:22 camelia rakudo-moar f1f750: OUTPUT«Use of uninitialized value $a of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.␤  in block <unit> at <tmp> line 1␤␤»
10:22 perlawhirl joined #perl6
10:33 holyghost m: sub niler{Any} my $a = Str; say("$a.html", "sometext"); say  "alive"; CONTROL { die $_ };
10:33 camelia rakudo-moar f1f750: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3sub niler{Any}7⏏5 my $a = Str; say("$a.html", "sometext")␤    expecting any of:␤        infix␤        infix stopper…»
10:34 colomon joined #perl6
10:34 holyghost m: sub{Any}; my $a = Str; say("$a.html", "sometext"); say  "alive"; CONTROL { die $_ };
10:34 camelia rakudo-moar f1f750: OUTPUT«Use of uninitialized value $a of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.␤  in block <unit> at <tmp> line 1␤␤»
10:35 woolfy left #perl6
10:37 cyphase joined #perl6
10:38 holyghost sub{Any};my $a = "123"; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ };
10:38 holyghost m: sub{Any};my $a = "123"; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ };
10:38 camelia rakudo-moar f1f750: OUTPUT«123.htmlsometext␤alive␤»
10:39 holyghost easy if I understand
10:41 holyghost m: sub{Any};my $a = 123; say("$a.html", "sometext"); say "alive"; CONTROL { die $_ };
10:41 camelia rakudo-moar f1f750: OUTPUT«123.htmlsometext␤alive␤»
10:43 CIAvash nine: running test with --ll-exception on Windows https://gist.github.com/CIAvash/​bf28a0c820602c4408d68f203f5b6a9f
10:46 colomon joined #perl6
10:50 colomon joined #perl6
10:56 holyghost http://userfriendly.org
11:05 colomon joined #perl6
11:19 darutoko joined #perl6
11:20 colomon joined #perl6
11:34 konobi .tell pmurias finally got some time to look at the JS backend. see some good opportunities for improvement
11:34 yoleaux konobi: I'll pass your message to pmurias.
11:35 konobi btw, anyone know why nqp repo doesn't use git-subrepo (as posed to git-submodule) ?
11:46 BenGoldberg joined #perl6
11:51 nine CIAvash: the warnings are fixed in https://github.com/rakudo/rakudo/commit/43debec892
11:51 nine CIAvash: they were actually a symptom of a more important issue
11:52 nine CIAvash: there's a small chance, this even fixed the Windows issue
12:00 kaare__ joined #perl6
12:01 Sgeo joined #perl6
12:12 rindolf joined #perl6
12:17 trnh joined #perl6
12:17 colomon joined #perl6
12:32 kid51 joined #perl6
12:40 Jtf621 joined #perl6
12:43 Xliff Heya! What's the best way to see if an object has a specific attribute?
12:44 nine Xliff: define a role that makes the accessor mandatory and have all objects eligible do this role?
12:45 Xliff m: class A { has $.a1; has $.b1 }; my $a = A.new; say $a.can("a1")
12:45 camelia rakudo-moar 43debe: OUTPUT«(a1)␤»
12:45 Xliff m: class A { has $.a1; has $.b1 }; my $a = A.new; say $a.can("a2")
12:45 camelia rakudo-moar 43debe: OUTPUT«()␤»
12:46 Xliff nine: Yes. I was just thinking about that, but in some cases there are attributes that are common across all classes that I want to access in a general way.
12:46 psch m: class A { has $.a1; has $.b1 }; my $a = A.new; $a.^attributes.grep(*.name eq '$!a1').say
12:46 camelia rakudo-moar 43debe: OUTPUT«(Mu $!a1)␤»
12:46 Xliff What's wrong with using can() like I did above?
12:46 psch .can checks for methods
12:46 psch autogenerated accessors aren't real methods
12:46 Xliff So why did the test above, work?
12:47 psch oh
12:47 psch didn't see the first line
12:47 Xliff :)
12:47 psch well, they seem to show up there
12:47 psch so they are real enough for can
12:47 Xliff I *just* thought about it after that after I asked.
12:47 Xliff Previously, I was leaning toward your solution.
12:47 psch m: class A { has $!a1; has $.b1 }; my $a = A.new; say $a.can('a1'); $a.^attributes.grep(*.name eq '$!a1').say # this is what's wrong
12:47 camelia rakudo-moar 43debe: OUTPUT«()␤(Mu $!a1)␤»
12:47 psch well, it's really doing something different entirely
12:48 Xliff psch++ - That's true, but those attributes are private, so no public autogenerated accessors, right?
12:48 psch if you're asking with can you're asking for a method.  the fact that the method in this case is an autogen'd accessor and thus corresponds with the Attribute is expected, but not necessarily always true
12:48 Xliff m: class A { has $!a1; has $.b1 }; my $a = A.new; say $a.can('a1'); say $a.can("b1"); $a.^attributes.grep(*.name eq '$!a1').say # this is what's wrong
12:48 camelia rakudo-moar 43debe: OUTPUT«()␤(b1)␤(Mu $!a1)␤»
12:49 Xliff OK.
12:49 psch m: class A { has $!foo; method foo } # ... :)
12:49 camelia rakudo-moar 43debe: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3class A { has $!foo; method foo 7⏏5} # ... :)␤»
12:49 psch m: class A { has $!foo; method foo {} } # ... >_>
12:49 camelia rakudo-moar 43debe: ( no output )
12:49 psch it really depends on what you want to do, in any case
12:50 psch if you want to call a given method on a set of classes that might or might not have it i'd probably just use .?
12:50 Xliff Yeah. That's an insane use case, and I'm not that crazy ^_^
12:50 Xliff Yeah, but I need to do a .defined afterward. Not sure if .? would work.
12:51 Xliff So "$obj.maybe_not_attribute.defined"
12:52 Xliff So adding "$obj.can("maybe_not_attrubute") && …" would be an acceptable addition to the logic.
12:52 psch m: class A { has $.a = "foo" }; class B { }; my @a = A.new, B.new; @a [R//]= @a>>.?a; say @a.perl
12:52 camelia rakudo-moar 2b5687: OUTPUT«["foo", Any]␤»
12:53 psch hm, that Any suprises me a bit
12:53 Xliff Yeah. I'm getting a lot of Any values when I'm expecting nothing or Nil.
12:53 colomon joined #perl6
12:53 Xliff m: say Nil ~~ Any
12:53 camelia rakudo-moar 2b5687: OUTPUT«True␤»
12:54 psch oh
12:54 psch nah, that's fine in my case, it's list assignment
12:54 psch so of course the whole list gets the //
12:54 Xliff :D
12:54 psch m: class A { has $.a = "foo" }; class B { }; my @a = A.new, B.new; @a [Z[R//]=] @a>>.?a; say @a.perl
12:54 camelia rakudo-moar 2b5687: OUTPUT«["foo", B.new]␤»
12:54 Xliff OK. So back to my crazy code. Thanks nine++. Thanks psch++
12:54 psch more metaops to the rescue :)
12:54 Xliff BTW -- R//?
12:55 psch m: say "foo" // "bar"; say Nil // "bar"; say "bar" R// Nil
12:55 camelia rakudo-moar 2b5687: OUTPUT«foo␤bar␤bar␤»
12:55 Xliff Hmmm... will have to read up on that. Is it documented anywhere?
12:55 psch R is just the reverse metaop
12:55 psch m: 5 R= my $x; say $x
12:55 Xliff O I C
12:55 camelia rakudo-moar 2b5687: OUTPUT«5␤»
12:56 Xliff LOL!
12:56 Xliff Great for folks who come from native languages that read R-> L
12:56 Juerd I feel it was specially crafted for use in obfuscation contests :)
12:57 Juerd Where's the RPN meta-op? 4 2 RPN+
13:00 Juerd m: my $op = "+"; say $op; &infix:<<$op>>(4, 2)
13:00 camelia rakudo-moar 2b5687: OUTPUT«Use of uninitialized value $op of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in code  at <tmp> line 1␤5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    infix:<> u…»
13:00 Juerd Why is $op seen as unitialized?
13:00 psch because the sub call needs the value of $x at compile time
13:00 pecastro joined #perl6
13:00 psch m: constant $op = "+"; say $op; &infix:<<$op>>(4, 2)
13:00 camelia rakudo-moar 2b5687: OUTPUT«+␤»
13:00 Juerd Ah
13:00 psch m: constant $op = "+"; say $op; &infix:<<$op>>(4, 2).say
13:00 camelia rakudo-moar 2b5687: OUTPUT«+␤6␤»
13:01 Juerd Is there a way to do it during runtime? Or, how do symbolic references work with operators?
13:01 psch m: constant $op = "+"; say $op; ::("&[$op]")(4, 2).say
13:01 camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing infix inside []␤at <tmp>:1␤------> 3constant $op = "+"; say $op; ::("&[7⏏5$op]")(4, 2).say␤    expecting any of:␤        double quotes␤        infix␤        infix noun␤        inf…»
13:02 psch well, lookup like that is weird, and lookup via the foofix longname is hard to decanonicalize :/
13:02 psch m: constant $op = "+"; say $op; ::('&infix:<\qq[$op]>')(4, 2).say
13:02 camelia rakudo-moar 2b5687: OUTPUT«+␤6␤»
13:02 Juerd Wow :)
13:02 psch it works in this case, but e.g. &infix:['<'] obviously doesn't work with < >
13:03 psch +delimiters for the longname
13:03 psch m: my $op = "+"; say $op; ::('&infix:<\qq[$op]>')(4, 2).say # un-constant'ed
13:03 camelia rakudo-moar 2b5687: OUTPUT«+␤6␤»
13:03 psch the &[] form is a grammar trick, the name doesn't exist as camelia says vOv
13:04 psch FSDO of "grammar trick", it's been a while since i looked at exactly how we do that
13:05 BenGoldberg m: (&::).say
13:05 camelia rakudo-moar 2b5687: OUTPUT«Nil␤»
13:05 BenGoldberg ?
13:05 BenGoldberg Is :: a subroutine or isn't it?
13:05 psch it's not
13:07 psch https://design.perl6.org/S02.​html#Interpolating_into_names
13:07 psch not sure if it's documented yet
13:07 BenGoldberg m: (&::)();
13:07 camelia rakudo-moar 2b5687: OUTPUT«Cannot find method 'Nil' on object of type List␤  in block <unit> at <tmp> line 1␤␤»
13:08 BenGoldberg So it's just a syntactical thingy?
13:09 psch i'd say so.  it's the same :: as in MY:: or SomePackage::
13:14 moritz m: say &::.^name
13:14 camelia rakudo-moar 2b5687: OUTPUT«Nil␤»
13:15 moritz m: my &:: = { say 42 }; &::()
13:15 camelia rakudo-moar 2b5687: OUTPUT«Cannot find method 'Nil' on object of type List␤  in block <unit> at <tmp> line 1␤␤»
13:22 BenGoldberg That's a less than awesome error message :)
13:24 BenGoldberg m: sub postfix::<add>($a, $b) { $a + $b }; say 2, 3 add;
13:24 camelia rakudo-moar 2b5687: OUTPUT«===SORRY!===␤Name postfix:: ends with '::' and cannot be used as a sub declaration␤»
13:24 BenGoldberg m: sub postfix:<add>($a, $b) { $a + $b }; say 2, 3 add;
13:24 camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3tfix:<add>($a, $b) { $a + $b }; say 2, 37⏏5 add;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤ …»
13:25 psch m: sub postfix:<add>([$a, $b]) { $a + $b }; say (2, 3)add;
13:25 camelia rakudo-moar 2b5687: OUTPUT«5␤»
13:26 psch a postfix can't really take more than one argument
13:26 psch same for prefix
13:27 BenGoldberg So no reverse polish notation?
13:27 moritz m: sub prefix:<foo>(|c) is looser(&infix:<,>) { say c.perl }; foo 1, 2
13:27 camelia rakudo-moar 2b5687: OUTPUT«\((1, 2))␤»
13:27 psch oh, right, looser than infix:<,> is how
13:27 psch moritz++
13:28 moritz well, it's still just one argument, that happens to be a list though :-)
13:28 moritz m: sub prefix:<foo>(|c) is looser(&infix:<,>) { say c[0].perl }; foo 1, 2
13:28 camelia rakudo-moar 2b5687: OUTPUT«(1, 2)␤»
13:28 psch ah
13:28 BenGoldberg m: prefix:<add>([$a, $b]) { $a + $b }; say add 1, 3;
13:28 camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3prefix:<add>([7⏏5$a, $b]) { $a + $b }; say add 1, 3;␤»
13:28 BenGoldberg m: prefix:<add>([$a, $b]) is looser<,> { $a + $b }; say add 1, 3;
13:28 camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3prefix:<add>([7⏏5$a, $b]) is looser<,> { $a + $b }; say a␤»
13:29 BenGoldberg m: sub prefix:<add>([$a, $b]) is looser<,> { $a + $b }; say add 1, 3;
13:29 camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot find method 'EXISTS-KEY': no method cache and no .^find_method␤at <tmp>:1␤»
13:29 psch sub
13:29 moritz I don't think is looser<,> works that way
13:29 psch i we had that at one point
13:29 moritz m: sub prefix:<foo>(|c) is looser(&[,]) { say c[0].perl }; foo 1, 2
13:29 camelia rakudo-moar 2b5687: OUTPUT«(1, 2)␤»
13:29 psch jnthn wasn't happy about it
13:30 psch i don't know if we removed it either
13:30 BenGoldberg m: sub prefix:<add>([$a, $b]) is looser<&[,]> { $a + $b }; say add 1, 3;
13:30 camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot find method 'EXISTS-KEY': no method cache and no .^find_method␤at <tmp>:1␤»
13:30 moritz IMHO looser(&[,]) is consise enough
13:30 BenGoldberg Why that error message?
13:30 moritz BenGoldberg: because you use <...> as a postfix
13:31 moritz which is hash-access operation, but at compile time, where errors are weirder occasionally
13:31 BenGoldberg m: sub prefix:<add>(|c) is looser<&[,]> { join ",", c[0] }; say add 1, 3;
13:31 camelia rakudo-moar 2b5687: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot find method 'EXISTS-KEY': no method cache and no .^find_method␤at <tmp>:1␤»
13:31 psch moritz: yeah, i agree.  the <> form is also somewhat finicky with lookup
13:31 psch it's on src/core/operators.pm:638ff fwiw :)
13:31 holyghost joined #perl6
13:31 BenGoldberg m: sub prefix:<foo>(|c) is looser(&[,]) { say c[0].perl }; foo 1, 2
13:31 camelia rakudo-moar 2b5687: OUTPUT«(1, 2)␤»
13:31 BenGoldberg m: sub prefix:<foo>(|c) is looser(&[,]) { say flat c[0] }; foo 1, 2
13:31 camelia rakudo-moar 2b5687: OUTPUT«(1 2)␤»
13:32 BenGoldberg m: sub prefix:<foo>(|c) is looser(&[,]) { my ($a, $b) = c[0]; say "$a, $b" }; foo 1, 2
13:32 camelia rakudo-moar 2b5687: OUTPUT«1, 2␤»
13:32 BenGoldberg m: sub prefix:<add>(|c) is looser(&[,]) { my ($a, $b) = c[0]; $a + $b }; say add 1, 2
13:32 camelia rakudo-moar 2b5687: OUTPUT«3␤»
13:34 konobi .tell pmurias I've got a few implementation questions for you... i think there's some definite wins available i believe
13:34 yoleaux konobi: I'll pass your message to pmurias.
13:40 pecastro joined #perl6
13:42 Tonik joined #perl6
13:47 BenGoldberg m: ‚↗’.say
13:47 camelia rakudo-moar 2b5687: OUTPUT«↗␤»
13:57 kurahaupo joined #perl6
13:58 tbrowder left #perl6
14:00 smash joined #perl6
14:01 smash joined #perl6
14:08 dakkar joined #perl6
14:14 BenGoldberg m: say so 0e0
14:14 camelia rakudo-moar 478671: OUTPUT«False␤»
14:14 BenGoldberg m: say so "0e0"
14:14 camelia rakudo-moar 478671: OUTPUT«True␤»
14:14 BenGoldberg m: say so +"0e0"
14:14 camelia rakudo-moar 478671: OUTPUT«False␤»
14:17 Ven joined #perl6
14:19 kurahaupo_ joined #perl6
14:27 CIAvash nine++ the Windows issue is fixed too
14:30 rindolf joined #perl6
14:32 nine Yeah :)
14:34 khw joined #perl6
14:37 CIAvash :)
14:41 zakharyas joined #perl6
14:42 xinming joined #perl6
14:46 avenj joined #perl6
14:47 kalkin-_ Is there something like super in Perl6? I want to basically do: class B is A { method f () { say "asd"; super.f() } }
14:47 timotimo you'll usually be able to go via "nextsame" and friends
14:48 timotimo if not, you can still type out the class name
14:48 timotimo self.A::f(...)
14:48 kalkin-_ ahh nextsame is the keyword I was searching. timotimo thanks
15:04 iH2O joined #perl6
15:11 skids joined #perl6
15:13 skrshn joined #perl6
15:14 skrshn async programming question: Is this (https://gist.github.com/skrisna/2​3ee95f857b346aad2b39a682735838e) supposed to run on single thread or multiple?
15:14 iH2O left #perl6
15:16 timotimo huh. for some reason github wants me to 2fa
15:16 timotimo i don't seem to have any 2fa keys on my phone any more :o
15:17 gfldex the only thing you got from 2fa is that two deviced you don't really own are getting a rootkit you don't know about
15:18 timotimo right
15:22 moritz timotimo: they could send you a 2fa key by SMS :-)
15:22 canopus joined #perl6
15:23 timotimo right
15:24 timotimo but i don't think i have my phone number in their thingie
15:24 timotimo i did print out the 2fa recovery keys on a sheet of paper
15:24 timotimo however ... where the F did i put that :D
15:25 girafe joined #perl6
15:26 timotimo well, goodbye github account, i guess
15:32 awwaiid skrshn: I think start { ... } starts ONE new thread, the contents of that aren't parallelized
15:33 skrshn awwaiid: thanks. does grep spawn more threads?
15:34 skrshn awwaiid: I guess you already answered the question "contents of that aren't parallelized"
15:35 awwaiid skrshn: it does if it is mapping over a stream (whatever those are called). This was broken last time I tried, but you should be able to do like ^1000.race.map{...}, the .race takes some params to set the batch size and thread count
15:37 moritz timotimo: iirc there's a way to recover a github account as long as you still have access to an SSH key
15:38 moritz timotimo: https://medium.com/@kaumac/how-to-recover-​your-github-account-if-you-lost-your-2fa-c​redentials-and-recovery-codes-d171b2bb87f0#.ojx0w386c
15:39 moritz timotimo: https://help.github.com/articles/recovering-y​our-account-if-you-lost-your-2fa-credentials/ seems to be more to the point
15:39 skrshn awwaiid: thanks. that answers my question.
15:39 moritz erm nope
15:39 parabolize supplies are the grep-able stream thingies
15:41 gfldex skrshn: start creates a Promise, not a thread. It's not that easy.
15:41 psch m: await start { say $*THREAD }; say $*THREAD
15:41 camelia rakudo-moar 478671: OUTPUT«Thread #3␤Thread #1 (Initial thread)␤»
15:41 awwaiid m: say (^10).race(batch => 1, degree => 10).map({ sleep(rand); $^a ** 2 }).list
15:41 camelia rakudo-moar 478671: OUTPUT«(36 4 64 1 25 9 81 16 0 49)␤»
15:42 psch it's true though, start doesn't create the thread, the scheduler just shoves the promise's code into a thread
15:42 gfldex skrshn: calling .result will block and get the Promise scheduled.
15:43 gfldex skrshn: see: https://github.com/rakudo/rakudo/​blob/nom/src/core/Promise.pm#L105
15:43 skrshn gfldex: thanks. So the thread is spawned when I do .result
15:44 awwaiid m: say (^10).race(batch => 1, degree => 4).map({ say $*THREAD; $^a ** 2 }).list.reduce(* + *) # map-reduce, the .list collapses
15:44 camelia rakudo-moar 478671: OUTPUT«Thread #3␤Thread #4␤Thread #5␤Thread #3␤Thread #5␤Thread #3␤Thread #5␤Thread #5␤Thread #6␤Thread #3␤285␤»
15:44 gfldex skrshn: it may or may not spawn a thread, it does not depend on the Promise if that happens.
15:45 gfldex skrshn: in fact it depends on the vm, and I don't speak moar.
15:46 psch skrshn: my advice is "stop thinking about threads".  promises as an abstraction exist explicitily so you don't have to worry about what happens
15:46 awwaiid actually you can take out the .list in my example. So you can do .race.map({...}).reduce({...})
15:46 psch skrshn: that is, as long as you don't want to work on better async support on moar... :)
15:48 gfldex jnthn: is $*THREAD the OS level threadid or some interal id that scheduled to be mapped?
15:51 psch gfldex: child_tc->thread_id = 1 + MVM_incr(&tc->instance->next_user_thread_id); # MoarVM/src/core/threads.c:27, which underlies nqp::newthread
15:53 colomon joined #perl6
15:53 timotimo thanks! :)
15:54 skrshn thanks everyone!
15:57 pmurias joined #perl6
15:57 pmurias konobi: great
15:57 yoleaux 11:34Z <konobi> pmurias: finally got some time to look at the JS backend. see some good opportunities for improvement
15:57 yoleaux 13:34Z <konobi> pmurias: I've got a few implementation questions for you... i think there's some definite wins available i believe
15:57 pmurias konobi: feel free to ask any questions you want
16:00 sena_kun joined #perl6
16:08 AlexDaniel joined #perl6
16:09 sena_kun Are there any docs about precompilation usage?
16:10 gfldex sena_kun: it's transparent. If you want to precompile by hand, there is no proper API for that but we got code examples if you feel adventurous.
16:12 sena_kun gfldex, I feel like nobody will accept my simple version of docs caching, so I'm going to investigate existing precompilation code in htmlify. At least some little insight about how it works will be good, I suppose.
16:13 gfldex sena_kun: see https://github.com/gfldex/perl6-pod-to-​bigpage/blob/master/bin/pod2onepage#L63
16:13 RabidGravy joined #perl6
16:13 timotimo if we had a different method than "eval the code concatenated with '$=POD' at the end" for getting the pod contents, it'd be possible to pre-compile, i feel like
16:13 BenGoldberg If I ask camelia to run some code from a gist, twice, does the compiled version get cached?
16:13 gfldex timotimo: we already precompile the docs
16:13 timotimo we ... we do?
16:14 gfldex did you not notice how fast the html is delivered these days? :->
16:15 timotimo i actually never rendered the docs myself, nor followed the time between doc changes and website updates :(
16:15 timotimo well, not never, but not in the last months
16:15 timotimo which just means that both those things are so good & pleasant, that i don't notice them at all
16:16 timotimo good job, doc tech team :D
16:17 pmurias joined #perl6
16:18 BenGoldberg Docs are one of those things where it doesn't make much sense to htmlify on the fly.
16:18 timotimo well, that was never part of the design, anyway
16:18 sena_kun gfldex, but precompilation is slightly different from caching, isn't it? Or https://github.com/perl6/doc/issues/717 can be closed? Or I'm missing something important with this discussion.
16:19 gfldex BigPage needs 21s with 2 threads with hot caches to produce all the html minus the /routine/ stuff.
16:20 gfldex it may actually be reasonable to produce html from parsed pod files directly. But there are more pressing issues right now.
16:21 gfldex sena_kun: it
16:21 gfldex sena_kun: it's something completely different (and mostrous)
16:22 sena_kun gfldex, I thought so.
16:23 gfldex sena_kun: if you want to work on the build process and create something cool, you could take the output of BigPage under html/perl6.xhtml and try to produce xmldiffs, that are also xhtml-fragments, and combine them to something presentable. That would allow us to produce diffs of the docs between Rakudo Star releases.
16:24 sena_kun gfldex, I just want to close doc issues. (:
16:26 AlexDaniel sena_kun: oh, really? I have something for you
16:26 sena_kun But it seems a bit interesting, maybe I'll try to do this. Thanks for advice.
16:26 AlexDaniel sena_kun: https://github.com/perl6/doc/issues/679
16:27 sena_kun AlexDaniel, isn't is for Zoffix more than for anyone else?
16:28 AlexDaniel sena_kun: why? Zoffix just moved this issue from RT to docs repo
16:28 sena_kun AlexDaniel, actual fix is already there. And I can't do actual writing, so only search/build issues, I suppose.
16:29 AlexDaniel sena_kun: so you may say that it's for zefram, but in reality anyone who does a proper review can close anything :)
16:33 sena_kun AlexDaniel, I sure can say that. (: Judging by your commit, it can be closed. Same as https://github.com/perl6/doc/issues/362, for example.
16:40 AlexDaniel sena_kun: I have closed both
16:41 sena_kun AlexDaniel, thanks. Also, can you take a look at https://github.com/perl6/doc/pull/725, please?
16:48 AlexDaniel sena_kun: sure
16:57 zakharyas joined #perl6
17:03 timotimo huh. github no longer supports FreeOTP?
17:04 trnh joined #perl6
17:06 timotimo oh
17:06 timotimo it shows me a barcode that neither FreeOTP nor the ZXCrossing barcode reader can recognize
17:26 domidumont joined #perl6
17:31 GNUYawk joined #perl6
17:33 rindolf joined #perl6
17:35 gfldex i iz propagandacat i tellz troof! https://gfldex.wordpress.com/2016/07/​24/nil-statement-considered-harmful/
17:37 zakharyas1 joined #perl6
17:42 zakharyas1 joined #perl6
17:43 Xliff m: class A {}; class B {}; class C {}; my $c = C.new; given $c { when A {}; when B | C { say $_.^name }; }
17:43 camelia rakudo-moar 478671: OUTPUT«C␤»
17:50 ufobat joined #perl6
17:50 ufobat oi :)
17:52 timotimo hey
17:54 jnthn gfldex: fwiw, psch' answer was right: $*THREAD certainly represents an OS thread, but its ID is an internal one.
17:55 gfldex jnthn: does that mean changes to $*THREAD may or may not indicate that two different or the same function run in different threads?
17:58 GNUYawk joined #perl6
18:02 timotimo changing $*THREAD will do fuck all :)
18:02 timotimo oh, you mean seeing that $*THREAD has changed
18:02 gfldex in the sense of watching that change, yes
18:03 gfldex so threads are basicly: "What do I know."
18:05 ugexe i thought the same $*THREAD.id could represent 2 different threads over the course of a long running process, and that comparing to $*THREAD itself was the only way to know if it was the same thread
18:08 jnthn Right, if you want to compare if you have the same thread, comparing $*THREAD is the safe way.
18:09 jnthn Though if you know they're all thread pool threads that are for the application lifetime then looking at the ID is a good enough approximation
18:13 arnsholt pmurias++ # Obsoleting all the Parrot NQP bugs
18:16 parabolize joined #perl6
18:16 sena_kun pod2onepage: command not found
18:17 sena_kun Okay, so how we build docs now?
18:17 gfldex sena_kun: rakudobrew, panda or zef don't add the site/bin/ dir to your PATH
18:18 gfldex sena_kun: see https://github.com/perl6/doc/commit/0c​09e85f447a533881abd98e4d79c6061f998be8
18:18 sena_kun gfldex, thanks.
18:18 gfldex sena_kun: the location of site/bin/ may vary
18:29 cdg joined #perl6
18:30 cdg joined #perl6
18:32 sena_kun By the way, in the readme we point to already missing WANTED file. Is this sentence version - http://pastie.org/private/dk0zxn8xmaaxtcwhkbtu6g good?
18:32 cyphase joined #perl6
18:36 cdg joined #perl6
18:42 rindolf joined #perl6
18:43 pyrimidine joined #perl6
18:48 dalek doc: fc5b370 | Altai-man++ | README.md:
18:48 dalek doc: We don't have WANTED file anymore
18:48 dalek doc: review: https://github.com/perl6/doc/commit/fc5b370bf2
18:55 AlexDaniel sena_kun: README also says “Do a `git grep TODO` in this repository” but we do not have TODO file anymore
18:55 sena_kun AlexDaniel, it has different meaning.
18:55 AlexDaniel ahhh
18:56 AlexDaniel oops then ;)
18:56 sena_kun AlexDaniel, git grep TODO will give you TODO from all documentation, not just one file.
18:57 AlexDaniel though one might argue that we should create an issue for every such TODO…
18:58 gfldex AlexDaniel: you may want to grep first before you make such plans :->
18:58 AlexDaniel sena_kun: anyway, so I looked at #725 and have some questions
18:58 AlexDaniel gfldex: I did, there are not too many
18:58 sena_kun AlexDaniel, go ahead.
18:59 gfldex AlexDaniel: you also have to look for any Z<...> or =comment because they may not contain TODO
18:59 pyrimidine joined #perl6
19:00 AlexDaniel sena_kun: you do 「slurp $cache-filename;」 in 「process-pod-dir」, which means that it will be slurped several times per run. Any reason not to pull it somewhere higher?
19:02 AlexDaniel sure it's not critical at all, but it kinda adds up to the weirdness of the whole htmlify code
19:03 gfldex AlexDaniel: that's needs to be rewritten in a separat module anyway because we would do much better to generate .pod instead of .html for /routine/* and listings. That would allow us to share that work with different renderes including LaTeX, what leads to pdfs and properly printable docs.
19:03 sena_kun AlexDaniel, hmm. It can be done, I think. I didn't want to make MAIN harder to read and was trying to tie problem in just one function.
19:04 AlexDaniel sena_kun: then, you have 「if $content ~~ m/$file ': ' (.+?)\n/ {」 to find a hash for some file. Which works, sure, but again it's not pretty. Instead, just use a hash. Therefore I recommend to hashes.info into hashes.json, will make life much easier
19:04 AlexDaniel .oO(a hash of hashes, great)
19:05 AlexDaniel % I mean
19:05 gfldex you could add caching via wrapping of slurp
19:06 gfldex actually, is it actually slurps pod files, it's not using precomp what is wrong.
19:06 sena_kun AlexDaniel, it's true, but I wanted to use plain text, because plain text is always a plain text. Yes, it can be rewrited with something better than just file to go through every time.
19:06 AlexDaniel gfldex: if so, perhaps you can write a comment on #725?
19:06 gfldex s/is/if/
19:11 sena_kun If precomp in Pod::To::BigTable already does all the work, then PR can sure be closed, since it's very rough solution.
19:19 pmurias re https://github.com/perl6/nqp/issues/85 , what would be an error message that is awesome enough?
19:19 timotimo something that doesn't say anything about compiler internals
19:20 timotimo rakudo often says things like "cannot use binding with this LHS/RHS"
19:20 moritz "Sorry, list binding is not supported in NQP"
19:20 moritz though IMHO the error message currently isn't that bad
19:21 pmurias s/awesome/acceptable/, there a lot of different types of list bindings, and I'm not special casing every one
19:22 timotimo "nqp can only bind single variables on the LHS"
19:22 nebuchadnezzar joined #perl6
19:22 pmurias nqp-m: my %hash; %hash<foo> := 123;
19:22 camelia nqp-moarvm: ( no output )
19:22 pmurias nqp-m: my %hash; %hash<foo> := 123; nqp::say(%hash<foo>)
19:22 camelia nqp-moarvm: OUTPUT«123␤»
19:23 moritz pmurias: if I were you, I wouldn't put too much energy into that issue
19:23 timotimo ah, hmm.
19:25 * pmurias is too tired to come up with awesome error messages
19:28 edehont joined #perl6
19:34 dalek doc: f17bc21 | (Wenzel P. P. Peppmeyer)++ | doc/Language/quoting.pod6:
19:34 dalek doc: tell that undefined values raise control exceptions in interpolations
19:34 dalek doc: review: https://github.com/perl6/doc/commit/f17bc21dec
19:36 labster joined #perl6
19:36 Hotkeys why does this happen? http://i.imgur.com/oVj4OA2.png
19:36 Hotkeys oops, didn't intend the rounded corners on that, oh well it still shows the issue
19:36 timotimo the REPL doesn't know about different-sized native variables yet
19:37 Hotkeys I see
19:37 Hotkeys neither do the docs apparently :p
19:38 timotimo hmm
19:42 tbrowder joined #perl6
19:43 tbrowder m: use MONKEY-SEE-NO-EVAL; EVAL "say { 5 + 5 }"
19:43 camelia rakudo-moar 478671: OUTPUT«10␤»
19:49 AlexDaniel tbrowder: note that { 5 + 5 } is evaluated before eval
19:50 AlexDaniel m: say "say { 5 + 5 }"
19:50 camelia rakudo-moar 478671: OUTPUT«say 10␤»
19:53 tbrowder I'm just trying to use the example in the docs (which shows no result at all)--I have no idea how it works or what is correct, but i could not get a non-error result in the perl6 REPL on my local host.
19:54 gfldex tbrowder: the REPL is lacking in general
19:55 tbrowder ok, good to know, but will it be fixed someday?
19:57 gfldex tbrowder: i'm very happy to fill the docs free of charge. Predictions howeverare booked under Consulting and as such are rather pricy.
19:59 gfldex joking aside, I personally would not invest time in a REPL because whenever I press F1 in vim, the current files is written do disk and executed.
19:59 Zoffix joined #perl6
20:00 * Zoffix waves
20:00 * moritz particles
20:01 * gfldex heisenbergs
20:01 Zoffix 39 GitHub notifications :o
20:01 gfldex we where busy while you where not looking
20:02 Zoffix we++ then :)
20:02 Zoffix stmuk, yes, it's "Zoffix" :) and I hang on #perl6-dev more often than here. The alt nicks are in use only when I'm away from home and in hiding. Why? What did you want to .tell? RE: <stmuk> hmmm is there a .tell $zoffix-last-nick ?
20:03 colomon joined #perl6
20:03 Zoffix AlexDaniel, if it works, why fix it? :) RE 「"source-url": "…"」 in META6.json
20:05 tbrowder Zoffix: did you get my msg via .tell masked}?
20:05 Zoffix AlexDaniel, some sneak preview of the examples of new IRC::Client design. It's coming out surprisingly sexy: https://gist.github.com/zoffixznet​/ae146b8fc8fc1f153ba75da5d52e25b2
20:05 Zoffix tbrowder, I saw it when I grepped the channel log.
20:05 AlexDaniel MasterDuke: ↑
20:06 Zoffix I got a 4000-word blog post on it already. Just finishing off filters, promise support, and docs and I think it'll be ready to roll.
20:07 AlexDaniel Zoffix: cool. While you are at it, perhaps you can run it on the background and see what happens in like 10 hours?
20:10 unmatched} .
20:10 yoleaux 22 Jul 2016 23:35Z <AlexDaniel> unmatched}: maybe this should be fixed, take a look: http://irclog.perlgeek.de/p​erl6/2016-07-22#i_12892188
20:10 yoleaux 23 Jul 2016 15:51Z <tbrowder> unmatched}: is that you, Zoffix?
20:10 yoleaux 23 Jul 2016 15:56Z <tbrowder> unmatched}: I'm aware of the problem, and I hope to work on it after I get the basic table working and accepted first. At the moment I don't know if that will require grammar work or not. I don't have the knowledge or experience enough yet to dig into the grammar and actions, but ShimmerFairy does.  I will try an experiment later today which I hope will
20:11 Zoffix Huh, got this in the log: "0225        ◀▬▬ │ camelia (~p6eval@ns1.niner.name) has quit (Killed (Sigyn (Spam is off topic on freenode.)))"
20:11 arnsholt moritz++ # Axing Parrot entirely
20:12 cdg joined #perl6
20:13 geekosaur Zoffix, yes, sigyn went a bit nuts and nuked camelia and some of the people using it. this has been corrected
20:13 Zoffix Ah, ok :)
20:14 mohae joined #perl6
20:14 moritz arnsholt: if you support this motion, please give the pull request a thumbs up/+1/whatever
20:15 dalek doc: 92aa954 | (Tom Browder)++ | doc/Type/Cool.pod6:
20:15 dalek doc: add the result of the EVAL statement
20:15 dalek doc: review: https://github.com/perl6/doc/commit/92aa954301
20:16 moritz https://github.com/perl6/nqp/pull/298 # for reference, for those not in #perl6-dev
20:17 arnsholt Speaking of, I should probably join #perl6-dev
20:17 AlexDaniel Zoffix: do you recommend doing everything with plugins or are there any reasons to make a subclass of IRC::Client?
20:18 tbrowder ref
20:19 mohae_ joined #perl6
20:20 Zoffix AlexDaniel, everything as plugins, I think.
20:20 moritz Zoffix: does IRC::Client support automatic reconnecting on connection loss?
20:21 Zoffix moritz, it will when I release the new design. Should be sometime this week.
20:22 tbrowder ref docs and non-breaking space: does it work with pod docs in travis? if so, which unicode code point should be used (or is an html entity to be injected somehow in the htmlify process)?
20:22 TEttinger joined #perl6
20:22 Zoffix .u non-breaking space
20:22 yoleaux U+00A0 NO-BREAK SPACE [Zs] ( )
20:22 AlexDaniel Zoffix: is there any way to provide alternative nicks so that irc-to-me triggers on something else besides the current nickname?
20:23 AlexDaniel Zoffix: for example, bisectable has “bisect” as its alt nick, so it works with “bisect:” too
20:23 tbrowder thnx, Zoffix [TM, realname?]
20:24 colomon joined #perl6
20:24 pyrimidine joined #perl6
20:26 Zoffix AlexDaniel, no, since it's not a nick. You'd just subscribe to irc-privmsg-channel ($ where /^ 'bisect' 'able'? <[,:]+\s> \s* $<code>=.+/) { ... run code... }
20:28 AlexDaniel Zoffix: please consider it. That's what p5 Bot::BasicBot does, and I find it really useful
20:30 wamba joined #perl6
20:38 [Coke] Scrp;; emd
20:38 * [Coke] waves from the land of no air conditioning. :|
20:39 * lizmat wonders where that is
20:40 zacts joined #perl6
20:40 trnh joined #perl6
20:42 timotimo antarctica?
20:42 pyrimidine joined #perl6
20:42 mst oh. anybody got a suggestion for a grammar based JSON module that's easy to understand? I want something to read to learn
20:44 lizmat src/core/Rakudo/Internals/JSON.pm   ?
20:45 [Coke] lizmat: my house, unfortunately.
20:45 lizmat [Coke]: well, ours hasn't got airco either
20:45 [Coke] in a run of several days of 30C+ temps
20:45 [Coke] I haven't not had AC since I lived in texas. I'm melting. :)
20:46 trnh joined #perl6
20:48 timotimo mst: i think JSON::Tiny is a good place to start
20:48 Zoffix mst, pretty much the same as Internals/JSON, but also got support for newer JS spec: https://github.com/moritz/js​on/tree/master/lib/JSON/Tiny
20:49 Zoffix mst, and those two classes are used here: https://github.com/moritz/json/b​lob/master/lib/JSON/Tiny.pm#L56
20:54 jdv79 joined #perl6
20:58 zacts joined #perl6
20:59 yqt joined #perl6
21:04 labster joined #perl6
21:08 timotimo seems like the hard drive consumption of the / partition of hack.p6c.org is getting better now that my fuzzing experiments have started more than 1 month ago
21:11 AlexDaniel http://www.xkcd.com/1700/ so true
21:16 espadrine joined #perl6
21:16 gfldex sena_kun: i'm playing with xmldiff atm. Right now I'm creating a 16GB swap file.
21:18 sena_kun gfldex, sorry, my only one laptop with 4 gb RAM and old hdd will be crushed for sure.
21:22 wamba joined #perl6
21:24 tbrowder left #perl6
21:24 kurahaupo joined #perl6
21:26 kurahaupo joined #perl6
21:28 djbkd joined #perl6
21:28 konobi pmurias: lo
21:30 pmurias konobi: hi
21:31 colomon_ joined #perl6
21:31 kurahaupo joined #perl6
21:34 pmurias konobi: have you seen docs/HACKING-js?
21:34 konobi ah... lemme look
21:37 gfldex joined #perl6
21:39 kurahaupo_ joined #perl6
21:46 timotimo NativeCall is confusing me
21:46 timotimo Native call expected return type with CArray representation, but got a CStruct (SDL_Rect)
21:47 timotimo however, the sub i'm trying to call there is annotated as "returns int32"
21:47 colomon joined #perl6
21:47 aries_liuxueyang joined #perl6
21:48 timotimo oh, of course
21:48 timotimo CArray of CStruct is not properly implemented yet
21:49 Zoffix left #perl6
21:56 cpage_ joined #perl6
21:59 cyphase joined #perl6
22:02 AlexDaniel is it possilbe to have multiple paragraphs in a table cell?
22:03 AlexDaniel asking because this table is broken: https://docs.perl6.org/languag​e/variables#Dynamic_variables
22:10 timotimo m: my int @foo = 1, 2, 3, 4; say +@foo;
22:10 camelia rakudo-moar 478671: OUTPUT«4␤»
22:11 timotimo m: class test { has int @!foo; method frob { say +@!foo } }; test.new.frob
22:11 camelia rakudo-moar 478671: OUTPUT«0␤»
22:11 timotimo m: class test { has int @!foo; method frob { say @!foo > 10 } }; test.new.frob
22:11 camelia rakudo-moar 478671: OUTPUT«Cannot resolve caller Real(array[int]: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in method frob at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
22:12 djbkd joined #perl6
22:12 timotimo m: my @foo; my @bar; say @foo > @bar
22:12 camelia rakudo-moar 478671: OUTPUT«False␤»
22:12 timotimo seems like array is missing a method Array has
22:12 timotimo or maybe it comes from somewhere else
22:13 timotimo someone want to rakudobug that?
22:14 lizmat m: my int @foo; my int @bar; say @foo > @bar
22:14 camelia rakudo-moar 478671: OUTPUT«Cannot resolve caller Real(array[int]: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at <tmp> line 1␤␤»
22:14 lizmat timotimo: yes, please, rakudobug it
22:14 lizmat will look at it tomorrow
22:19 cdg_ joined #perl6
22:19 gfldex AlexDaniel: that table is ripped apart by the pod parser. Technically pod tables support pretty much anything.
22:20 AlexDaniel gfldex: I don't know how to fix it, so I created this: https://github.com/perl6/doc/issues/754
22:23 timotimo m: my %foo = Nil;
22:23 camelia rakudo-moar 478671: OUTPUT«Odd number of elements found where hash initializer expected:␤Only saw 1 element␤  in block <unit> at <tmp> line 1␤␤»
22:23 timotimo so that's not possible?
22:23 timotimo m: my %foo = Empty;
22:23 camelia rakudo-moar 478671: ( no output )
22:23 timotimo makes more sense in my context anyway
22:24 gfldex A Hash is a (fancy) list of containers, not a container in itself.
22:25 gfldex but then, I'm biased against Nil. :)
22:29 timotimo i only thought to use Nil because i saw your recent work regarding Nil
22:30 lizmat m: my %h{Any} = Nil => 42; dd %h
22:30 camelia rakudo-moar 478671: OUTPUT«Hash[Any,Any] %h = (my Any %{Any} = :Nil(42))␤»
22:30 lizmat hmmm
22:30 lizmat m: my %h{Any} = Empty => 42; dd %h
22:30 camelia rakudo-moar 478671: OUTPUT«Hash[Any,Any] %h = (my Any %{Any} = :Empty(42))␤»
22:31 colomon joined #perl6
22:32 gfldex AlexDaniel: you could try to sneak a =html block with a single <br/> in to get the paragraph displayed
22:33 ShimmerFairy AlexDaniel: I commented on the issue, so you know :)
22:36 harmil joined #perl6
22:39 timotimo i can't nativecast into a Pointer[int32]?
22:39 timotimo m: use NativeCall; my $data = CArray[int32].new(1, 2, 3, 4); say nativecast(Pointer[int32], $data);
22:39 camelia rakudo-moar 478671: OUTPUT«NativeCall::Types::P​ointer[int32]<0x4538980>␤»
22:39 timotimo ... well, here it seems to work
22:39 AlexDaniel ShimmerFairy: thanks
22:41 timotimo ah, no, just a logic error in my thing
22:46 MasterDuke Zoffix, AlexDaniel: looks nice, i think the *ables could work with that pretty well. also, ++ for alt nicks
22:46 welton joined #perl6
22:49 ovibos m: my Str %h{List} = ('a', 'b') => 'c'; %h{('a', 'b')};
22:49 camelia rakudo-moar 478671: OUTPUT«Type check failed in binding key; expected List but got Str ("a")␤  in block <unit> at <tmp> line 1␤␤»
22:49 ovibos m: my Str %h{List} = ('a', 'b') => 'c'; my List $l = ('a', 'b'); %h{$l};
22:49 camelia rakudo-moar 478671: ( no output )
22:49 ovibos m: my List $l = ('a', 'b'); my Str %h{List} = $l => 'c'; say %h{$l};
22:49 camelia rakudo-moar 478671: OUTPUT«c␤»
22:49 ovibos is there any way to use a list as the key of a hash?
22:50 ovibos first example doesn't typecheck because the list is coerced to a str (i assume), second doesn't work because i think it's using the address of the list instead of the values
22:50 ovibos third works but i need to be able to construct the lists dynamically
22:52 lizmat m: my List $l = ('a', 'b'); my Str %h{List} = $l => 'c'; dd %h
22:52 camelia rakudo-moar 478671: OUTPUT«Hash[Str,List] %h = (my Str %{List} = (("a", "b")) => "c")␤»
22:52 lizmat looks to me it isn't coerced to a Str  :-)
22:53 lizmat m: my List $l = ('a', 'b'); my Str %h{List} = $l => 'c'; dd %h{$l}
22:53 camelia rakudo-moar 478671: OUTPUT«Str %h = "c"␤»
22:53 lizmat m: my List $l = ('a', 'b'); my Str %h{List} = $l => 'c'; dd %h.keys[0]
22:53 camelia rakudo-moar 478671: OUTPUT«("a", "b")␤»
22:53 lizmat good night, #perl6!
22:54 ovibos it's coerced when you pass it literally
22:54 ovibos e.g. my first example
22:54 dvinciguerra_ joined #perl6
22:56 AlexDaniel m: say ~ «hello world»
22:56 camelia rakudo-moar 478671: OUTPUT«hello world␤»
22:56 AlexDaniel m: say ~«hello world»
22:56 camelia rakudo-moar 478671: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix␤at <tmp>:1␤------> 3say ~«hello world»7⏏5<EOL>␤    expecting any of:␤        argument list␤        postfix␤»
22:57 AlexDaniel ↑ weird
23:04 Xliff Does anyone know why I can co-erce some repr('CPointer') classes to Numeric and not others?
23:04 Xliff I wish I had an easy golf for this, but I don't.
23:04 Xliff Cannot resolve caller Numeric(xmlDtdPtr: ); none of these signatures match:
23:04 Xliff (Mu:U \v: *%_)
23:06 avenj joined #perl6
23:06 avenj joined #perl6
23:11 TimToady AlexDaniel: ~« is a hyper stringify
23:11 AlexDaniel ooooooh
23:11 AlexDaniel did not look at it this way, now I see
23:11 TimToady and didn't get far enough to notice that hello and world were undefined routines
23:20 cyphase joined #perl6
23:21 dalek bisectbot: d3a255f | (Daniel Green)++ | benchable.pl:
23:21 dalek bisectbot: "Zoom" in on large performance differences between two commits
23:21 dalek bisectbot: review: https://github.com/perl6/b​isectbot/commit/d3a255f324
23:24 gfldex m: my Int:D $a = Nil; say "$a"; CONTROL { say "$a: $_" }
23:24 camelia rakudo-moar 957dc0: OUTPUT«Use of uninitialized value $a of type Int:D in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block  at <tmp> line 1␤: Use of uninitialized value $a of type Int:D in string context␤Any of .^name, .p…»
23:26 Xliff m: use NativeCall; class A is repr('CPointer') { }; say A ~~ Pointer;
23:26 camelia rakudo-moar 957dc0: OUTPUT«False␤»
23:28 timotimo oooh, i like the sound of that benchable commit
23:32 AlexDaniel it may be a bit too early to celebrate, but yeah
23:34 MasterDuke the graphs produced are not spectacular, the functionality should be ok
23:35 AlexDaniel the graphs will be spectacular soon :)
23:35 AlexDaniel at least, I am working on it
23:36 timotimo in what way will they be spectacular?
23:37 AlexDaniel well, you'll see
23:38 timotimo OK! :)
23:47 ShimmerFairy joined #perl6
23:54 ShimmerFairy I wish the docs were more clear about what various roles expect of your class, e.g. the Numeric role. (Also, that P6 would actually define stubs for these roles for required methods.)

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

Perl 6 | Reference Documentation | Rakudo