Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-07-05

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 ParsonsNose joined #perl6
00:05 MasterDuke joined #perl6
00:15 zengargoyle joined #perl6
00:16 xnrand joined #perl6
00:16 Gothmog_ joined #perl6
00:16 bartolin joined #perl6
00:21 gfldex m: role DefinedAndNotEmpty { multi method defined(Str:D:){ self eq '' ?? False !! True } }; my $s = '' but DefinedAndNotEmpty; say $s.defined; sub foo(\p1 -->DefinedAndNotEmpty){ p1 }; foo 'abc';
00:21 camelia rakudo-moar 234aa4: OUTPUT«False␤Type check failed for return value; expected DefinedAndNotEmpty but got Str ("abc")␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
00:23 canopus joined #perl6
00:28 ShimmerFairy gfldex: I don't know what the solution to that is, but might I suggest self ne '' ? :)   Or even    $_ ne '' with self    (so you don't compare a normally-undefined string)
00:28 Zoffix left #perl6
00:29 gfldex m: subset NonEmpty of Str where * !== ''; sub foo(\s -->NonEmpty){ s }; say foo 'abc';
00:29 camelia rakudo-moar 234aa4: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5abc' (indicated by ⏏)␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3431␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in any ac…»
00:29 gfldex m: subset NonEmpty of Str where * ne ''; sub foo(\s -->NonEmpty){ s }; say foo 'abc';
00:29 camelia rakudo-moar 234aa4: OUTPUT«abc␤»
00:29 gfldex that's the solution (nearly)
00:29 gfldex m: subset NonEmpty of Str where * ne ''; sub foo(\s -->NonEmpty){ Nil }; say foo 'abc';
00:29 camelia rakudo-moar 234aa4: OUTPUT«Nil␤»
00:30 gfldex nearly, because of the dreaded Nil
00:30 ShimmerFairy ...but didn't you just force Nil there?
00:31 gfldex m: subset NonEmpty of Str where { fail('Nil!') if $_ == Nil; $_ ne '' }; sub foo(\s -->NonEmpty){ Nil }; say foo 'abc';
00:31 camelia rakudo-moar 234aa4: OUTPUT«Nil␤»
00:31 gfldex I did force Nil but I want it to blow up properly on Nil
00:32 gfldex Nil is worse then a non-empty string in a sub that is supposed to return a non-empty string
00:32 ShimmerFairy m: say Nil eq ''
00:32 camelia rakudo-moar 234aa4: OUTPUT«Use of Nil in string context  in block <unit> at <tmp> line 1␤True␤»
00:33 gfldex as soon as return spots a Nil it will skip the return type constraint entirely
00:34 gfldex the whole idea of runtime return value checks is that it fails early and the error message/exception is local to the sub that is causing the problem
00:34 gfldex Nil makes that very difficult
00:38 zacts joined #perl6
00:41 gfldex m: my &return = sub (|c){ fail('Nil') if c ~~ Nil }; # i'm that mad at Nil
00:41 camelia rakudo-moar 234aa4: ( no output )
00:42 gfldex m: my &return.wrap(sub (|c){ fail('Nil') if c ~~ Nil; callsame });
00:42 camelia rakudo-moar 234aa4: OUTPUT«Method 'wrap' not found for invocant of class 'Callable'␤  in block <unit> at <tmp> line 1␤␤»
01:11 dalek doc: f2a741a | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod6:
01:11 dalek doc: MAIN needs to call exit to provide an exitcode != 0
01:11 dalek doc: review: https://github.com/perl6/doc/commit/f2a741a291
01:11 kalkin- joined #perl6
01:24 nightfrog joined #perl6
01:25 gfldex m: sub MAIN(){ return 1 }; MAIN() # that should warn IMHO
01:25 camelia rakudo-moar 234aa4: ( no output )
01:27 gfldex m: sub MAIN(){ my &return = { warn 'bad!' }; return 1 }; MAIN() # that should warn IMHO
01:27 camelia rakudo-moar 234aa4: OUTPUT«bad!  in block  at <tmp> line 1␤bad!  in block  at <tmp> line 1␤»
01:27 gfldex :)
01:41 skids joined #perl6
01:46 ugexe nine: when trying to use a custom CUR I can get `require <tar#lib/Root.pm6>` to load Root.pm6, but `require <tar#lib/Root/UsesRoot.pm6>` fails to load Root.pm6. The problem is that my CUR::Tar.load only gets called for `lib/Root/UsesRoot.pm6` which never calls CUR::Tar.load again period (I expected it would but with a short-name). Any idea what I'm forgetting to do?
01:46 ugexe as an example of the failure see the last line of https://github.com/ugexe/Perl6-CompUnit--​Repository--Tar/blob/master/t/01-basic.t
01:46 nic joined #perl6
01:48 rindolf joined #perl6
01:52 nicq20 Sorry to barge in here with questions, but I'm having trouble understanding how Perl6 is compiled with rakudo on the MoarVM. Is that like C compilation, or more like JIT compilation?
02:00 MasterDuke i'm not a core dev, so take what i say with a grain of salt, but it's more like JIT (there is in fact a JIT)
02:01 molaf joined #perl6
02:02 nicq20 Huh. Ok, some people will talk about it like it does a C-like compilation, so I was not sure. I mostly hear that with modules.
02:04 noganex_ joined #perl6
02:05 yoleaux joined #perl6
02:05 MasterDuke it will pre-compile code, most usefully modules, into a bytecode format
02:06 MasterDuke but not a native binary like a C compiler does
02:08 nicq20 Oh, ok. That makes sense.
02:14 finanalyst joined #perl6
02:21 colomon joined #perl6
02:39 sammers good morning from Japan
02:47 araujo joined #perl6
02:47 araujo joined #perl6
02:48 MasterDuke .tell timotimo https://github.com/MoarVM/MoarVM/pull/380 is a partial fix (i believe)
02:48 yoleaux MasterDuke: I'll pass your message to timotimo.
02:50 araujo joined #perl6
02:50 araujo joined #perl6
02:56 araujo joined #perl6
03:14 BenGoldberg joined #perl6
03:22 rgrinberg joined #perl6
04:00 vendethiel joined #perl6
04:02 sammers is there a way to set a base collection of paramaters that all multi subs will use?
04:04 sammers for example, I want all multi sub foo() to use Str :$bar, Str $:baz, plus their custom params
04:05 sammers so their signature will always include :$bar, :$baz, plus their unique params.
04:06 aries_liuxueyang joined #perl6
04:08 rindolf sammers: hi.
04:10 sammers rindolf: hello
04:19 Senj joined #perl6
04:36 parabolize sammers: would this work? https://gist.github.com/parabolize​/ada0e420226cb47a22a99f93c940bab1
04:39 sammers parabolize, thanks, I am actually looking to use this for MAIN
04:40 parabolize you could probably do something with a Capture
04:40 parabolize my $defaults = \(Str :$bar, Str :$baz)
04:40 sammers I want to create a few base params that are applicable to all multi MAINs
04:41 sammers ok, I will take a look
04:44 parabolize sammers: nevermind my non-sense about Captures, proto is what you want
04:44 parabolize https://docs.perl6.org/language/functions#proto
04:45 parabolize Captures are the calling side not the receiving. XD
04:46 sammers ok, I am messing around with proto now. Is there a way to predefine a set of paramaters to be passed around?
04:46 sammers I guess something like a code object...
04:51 ssm joined #perl6
04:54 Cabanossi joined #perl6
05:10 aries_liuxueyang joined #perl6
05:12 dj_goku joined #perl6
05:28 firstdayonthejob joined #perl6
05:34 hankache joined #perl6
05:38 cgfbee joined #perl6
05:52 Xliff .seen FROGGS
05:52 yoleaux I saw FROGGS 2 Jul 2016 10:32Z in #perl6: <FROGGS> o/
05:53 Xliff .tell FROGGS The latest PR for p6-XML::LibXML finishes the porting of 06elements and 08findnodes. Please let me know what you think.
05:53 yoleaux Xliff: I'll pass your message to FROGGS.
05:56 sammers is there a way to detect when a value is passed to a sub that doesn't match a where {} test?
05:57 sammers I am using this with MAIN and trying to detect if one of the values passed matched, but all it does is print usage when no match.
05:58 ShimmerFairy sammers: you would need a multi sub, where the other sub catches a failed 'where' test.
05:59 sammers ah, ok
05:59 ShimmerFairy m: multi sub foo($a where 4) { say $a }; multi sub foo($a) { say "OOPS" }; foo(4); foo(3)    # an example
05:59 camelia rakudo-moar 234aa4: OUTPUT«4␤OOPS␤»
06:02 sammers hmm
06:06 jjido joined #perl6
06:07 sammers is there anyway to have the generated usage print out valid values for each signature paramater? without having to manually define usage.
06:15 ShimmerFairy sammers: I'm not sure, I think you'd have to define your own USAGE to do that.
06:19 sammers ShimmerFairy, thanks. Do you know if there is a scoped variable that stores parameters and their values? something I could loop on for example.
06:20 rindolf joined #perl6
06:20 ShimmerFairy I don't think there is, unless (I *think*) you define a sub with no signature and then can use @_. Or, if you're talking about command-line inputs, there might be some kind of @*ARGS variable.
06:21 sammers like sub foo($name, $age) { for %params.kv -> $param, $value { ... } }
06:21 sammers yeah, there is @ARGS... hmm
06:25 domidumont joined #perl6
06:25 domidumont joined #perl6
06:25 nine ugexe: there is no mechanism yet for registering new short-ids for repo implementations. Try a method path-spec that returns self.^name ~ '#'. Like https://github.com/rakudo/rakudo/blob/no​m/lib/CompUnit/Repository/Staging.pm#L12
06:26 nine ugexe: oh, the Staging repo also demonstrates how to pass arbitrary parameters to the constructor through path-spec :)
06:27 nine ugexe: in case you wonder about the syntax: that mechanism has already existed (even before CompUnit::Repository). I merely discovered it.
06:27 CIAvash joined #perl6
06:30 domidumont joined #perl6
06:37 jjido joined #perl6
06:40 espadrine joined #perl6
06:42 moritz \o
06:43 rurban joined #perl6
06:47 Xliff o/
06:49 domidumont joined #perl6
06:52 domidumont joined #perl6
06:58 psch .tell gfldex defined and not empty for Str is the definition of .Bool
06:58 yoleaux psch: I'll pass your message to gfldex.
07:04 Khisanth joined #perl6
07:06 * lizmat clickbaits https://p6weekly.wordpress.com/2​016/07/04/2016-27-summer-starts/
07:06 bjz joined #perl6
07:07 abraxxa joined #perl6
07:09 bjz_ joined #perl6
07:11 darutoko joined #perl6
07:11 bjz__ joined #perl6
07:15 moritz lizmat++
07:16 mattp_ joined #perl6
07:19 zakharyas joined #perl6
07:43 ssqq joined #perl6
07:45 ssqq hello, every one. 大家好!
07:46 dakkar joined #perl6
07:53 brrt joined #perl6
07:55 bpmedley joined #perl6
07:59 gfldex joined #perl6
08:00 gfldex .
08:00 yoleaux 06:59Z <psch> gfldex: defined and not empty for Str is the definition of .Bool
08:01 _mg_ joined #perl6
08:03 jonas2 joined #perl6
08:05 jack_rabbit joined #perl6
08:07 espadrine joined #perl6
08:08 Khisanth joined #perl6
08:11 timotimo .
08:11 yoleaux 02:48Z <MasterDuke> timotimo: https://github.com/MoarVM/MoarVM/pull/380 is a partial fix (i believe)
08:13 firstdayonthejob joined #perl6
08:18 |Sno| joined #perl6
08:27 timotimo thanks MasterDuke, it seems to have worked. here's the results: http://hack.p6c.org/~timo/coverage/
08:28 wamba joined #perl6
08:34 brrt joined #perl6
08:34 mrplastic ZoffixMobile: thanks i'll stick with it a little bit
08:37 rindolf .
08:37 rindolf No messages for me. :-(
08:39 vendethiel joined #perl6
08:39 Khisanth joined #perl6
08:40 AlexDaniel joined #perl6
08:45 gfldex .tell rindolf how are you doing mate?
08:45 yoleaux gfldex: I'll pass your message to rindolf.
08:45 gfldex there you go
08:45 rindolf .
08:45 yoleaux 08:45Z <gfldex> rindolf: how are you doing mate?
08:46 rindolf gfldex: I am currently doing Plasma 5 - not the Mate desktop.
08:46 ParsonsNose joined #perl6
08:46 rindolf gfldex: thanks for the message, though.
08:46 gfldex :)
08:47 aries_liuxueyang joined #perl6
08:48 RabidGravy joined #perl6
08:50 gfldex .tell lizmat i blogged about 1h to late, you may want to include it in the next weekly https://gfldex.wordpress.com/2016/07/05/2-2-3/
08:50 yoleaux gfldex: I'll pass your message to lizmat.
08:51 RabidGravy boing
08:55 jkramer left #perl6
08:56 bjz joined #perl6
09:04 pmurias joined #perl6
09:07 cgfbee joined #perl6
09:09 moritz wow, the Icinga2 api is... creative. They kinda duplicate HTTP status codes in the payloads, but there they are floating points
09:10 moritz ever got a 404.0? :-)
09:10 timotimo you mean a 4.04e2?
09:10 gfldex does 404.1 + 404.2 == 404.3 ?
09:11 moritz 2e0 * 202 :-)
09:11 zakharyas joined #perl6
09:12 RabidGravy Doesn't some MS IIS version do that too?
09:13 RabidGravy or didn't, so long since I've actually used it
09:18 ShimmerFairy moritz: but have they implemented ASTs like the latest version of PHP? :P
09:19 moritz ShimmerFairy: tell me more about the PHP's ASTs :-)
09:19 * moritz a fan of software gore
09:19 wamba joined #perl6
09:20 timotimo it could be not-that-bad
09:20 moritz you mean after they chose the backslash as package separator?
09:21 ShimmerFairy moritz: I can't find the release notes I remember coming across, but here's an RFC on it:  https://wiki.php.net/rfc/abstract_syntax_tree
09:23 mrplastic joined #perl6
09:24 timotimo moritz: it was the only thing that was still free, and it was familiar to windows users, because it's the path separator there
09:24 ShimmerFairy Ah, here it is! https://secure.php.net/releases/7_0_0.php
09:24 timotimo secure.php.net %)
09:25 timotimo that's the host they set up to handle https?
09:25 ShimmerFairy "PHP 7.0.0 comes with a new version of the Zend Engine, numerous improvements and new features such as ... * Abstract Syntax Tree"
09:25 ShimmerFairy I hope Bobby Tables lent an inspection to that subdomain.
09:26 moritz timotimo: and of course, there's no possible ambiguity with backslash for escaping in string interpolation...
09:26 timotimo yeah, because you can't put namespaced things into strings
09:26 domidumont joined #perl6
09:27 moritz of course not
09:27 moritz composability? nope
09:28 timotimo i'd advise making namespaces traversable with an API instead of string literals
09:28 ShimmerFairy timotimo: how about the Str class API?  :V
09:28 timotimo Str doesn't have anything to do with packages/namespaces :)
09:29 ShimmerFairy timotimo: it could if you want it to :P
09:29 timotimo i'm the language designer, of course
09:33 ShimmerFairy And of course, now infix:<::> is a synonym for infix:<~>, so people's package-manipulating code isn't confusing:   $scope = "Foo::";  $pkgbar = $scope :: "Bar";
09:36 timotimo hehe
09:37 timotimo "happy 2016th birthday america! this is the year we leave the european union!"
09:43 mrplastic joined #perl6
09:46 pmurias joined #perl6
09:49 pmurias ShimmerFairy: v8 doesn't use an AST in it's least optimizing compiler too
09:49 timotimo right, it works pretty much directly on the source, doesn't it?
09:51 pmurias it has a bunch of compilers, the least optimizing one just emits machine code from the parser
09:51 timotimo OK
09:51 pmurias just like PHP seems to be emitting bytecode from the parser and they now plan to add an AST in between
09:52 rurban_ joined #perl6
09:53 ShimmerFairy It probably says something that the _least_ optimizing compiler foregoes ASTs, though :)
09:54 pmurias ShimmerFairy: they do it to emit code as fast as possible
09:56 moritz it really depends on the language whether you need ASTs or not
09:56 ShimmerFairy I guess I'm so used to ASTs being the way to go that seeing PHP take decades(?) to get around to it seems funny :) .
10:02 nine FWIw Perl 5 doesn't have a real AST either. Though its op tree is at least accessible to user space code and allows for pretty cool manipulations.
10:13 iH2O joined #perl6
10:15 kurahaupo joined #perl6
10:16 siriu5b joined #perl6
10:16 cgfbee joined #perl6
10:18 iH2O grrr
10:22 gfldex m: sub s(){ CONTROL { dd $_ }; return }; s;
10:22 camelia rakudo-moar 418810: OUTPUT«chars requires a concrete string, but got null␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:23 gfldex m: sub s(){ CONTROL { say $_.^name }; return }; s;
10:23 camelia rakudo-moar 418810: OUTPUT«X::AdHoc␤»
10:23 gfldex m: sub s(){ CONTROL { put $_.Str }; return }; s;
10:23 camelia rakudo-moar 418810: OUTPUT«concatenate requires a concrete string, but got null␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:24 psch m: sub s { CONTROL { .perl.say }; last }; s
10:24 camelia rakudo-moar 418810: OUTPUT«CX::Last.new␤last without loop construct␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:24 gfldex m: sub s(){ CONTROL { put $_.message }; return }; s;
10:24 camelia rakudo-moar 418810: OUTPUT«concatenate requires a concrete string, but got null␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:24 psch we probably need an equivalent for return there
10:25 gfldex m: sub s(){ CONTROL { put 'control' }; }; s;
10:25 camelia rakudo-moar 418810: ( no output )
10:25 gfldex m: sub s(){ CONTROL { put 'control' }; return }; s;
10:25 camelia rakudo-moar 418810: OUTPUT«control␤»
10:25 gfldex m: sub s(){ CONTROL { put 'control' }; fail 'bye' }; s;
10:25 camelia rakudo-moar 418810: OUTPUT«control␤bye␤  in sub s at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
10:27 vendethiel joined #perl6
10:27 iH2O left #perl6
10:29 bpmedley Greetings, I'm not getting any output by running this code with the given nc command: https://gist.github.com/brianmed/​b70a1b3fb9ac6987790e46446e6fbd0e ... What am I doing wrong?
10:30 dalek doc: f1f94c7 | (Wenzel P. P. Peppmeyer)++ | doc/Language/phasers.pod6:
10:30 dalek doc: tell what causes control exceptions
10:30 dalek doc: review: https://github.com/perl6/doc/commit/f1f94c753a
10:31 MafProd joined #perl6
10:34 MafProd joined #perl6
10:34 cognominal joined #perl6
10:36 psch m: sub f { CONTROL { .perl.say }; redo if $++ == 0 }; f
10:36 camelia rakudo-moar 418810: OUTPUT«CX::Redo.new␤redo without loop construct␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:36 psch gfldex: redo, next, last, take, warn, proceed, succeed are all caught by CONTROL as well
10:37 psch m: say CX::.keys
10:37 camelia rakudo-moar 418810: OUTPUT«(Last Warn Succeed Proceed Redo Next Take)␤»
10:37 gfldex i will add that too
10:37 psch gfldex++
10:38 pmurias_ joined #perl6
10:38 cognominal joined #perl6
10:42 cognominal lizmat++ # weekly
10:44 Zoffix joined #perl6
10:45 dalek doc: eed0fd1 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
10:45 dalek doc: doc return statement
10:45 dalek doc: review: https://github.com/perl6/doc/commit/eed0fd11d0
10:46 Zoffix bpmedley, because you can't thread sockets like that. If you await that start, you'll see your Promise is being broken: https://gist.github.com/zoffixznet​/c2f24dfadce86bb6036eb3ceb9ce05b9
10:46 Zoffix bpmedley, maybe try out IO::Socket::Async? https://docs.perl6.org/type/IO::Socket::Async
10:46 bpmedley Zoffix: Thanks; is this page wrong?  https://rosettacode.org/wiki/Echo_server#Perl
10:48 dalek doc: 5eb3a51 | (Wenzel P. P. Peppmeyer)++ | doc/Language/phasers.pod6:
10:48 dalek doc: control exceptions are raised by many more things (psch++)
10:48 dalek doc: review: https://github.com/perl6/doc/commit/5eb3a513a1
10:50 gfldex m: sub s(){ my $a = 41; return $a }; say ++s(); # that's message is a bit LTA
10:50 camelia rakudo-moar 418810: OUTPUT«Cannot resolve caller prefix:<++>(Int); none of these signatures match:␤    (Mu:D $a is rw)␤    (Mu:U $a is rw)␤    (Int:D $a is rw)␤    (int $a is rw)␤    (Bool $a is rw)␤    (Num:D $a is rw)␤    (Num:U $a is rw)␤    (num $a is rw)␤  in …»
10:50 Zoffix bpmedley, ¯\_(ツ)_/¯ It may be.
10:50 bpmedley Zoffix: Thanks for your help!
10:51 psch m: sub s { CONTROL { default { .perl.say } }; return }; s
10:51 camelia rakudo-moar 774e2d: OUTPUT«CX::Return.new␤»
10:51 Zoffix .ask jnthn is this Rosetta code outdated? It does a start {} on a connected socket and bleed Rakudo breaks the promise with "Tried to read() on a socket from outside its originating thread". I think this may be due to the async fixes we lately had. https://rosettacode.org/wiki/Echo_server#Perl_6
10:51 yoleaux Zoffix: I'll pass your message to jnthn.
10:52 psch star-m: sub f { A: CONTROL { default { .perl.say } }; last A }; f
10:52 camelia star-m 2016.04: OUTPUT«chars requires a concrete string, but got null␤  in block  at <tmp> line 1␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:52 psch m: sub f { A: CONTROL { default { .perl.say } }; last A }; f
10:52 camelia rakudo-moar 774e2d: OUTPUT«CX::Last.new␤»
10:52 jkramer joined #perl6
10:52 jkramer Ahoy once again!
10:52 Zoffix \o
10:52 psch o/
10:54 tadzik joined #perl6
10:54 jkramer I have a general question about parameters. They seem to be read-only by default (ie I can't modify them inside the sub). "is rw" doesn't work on optional parameters. Why is this and what can I do about it (except creating a new var)?
10:55 Zoffix huh
10:55 jkramer Is there some keyword like "local" in P5 maybe?
10:55 psch m: sub f($a? is copy) { $a //= 10; say $a }; f 2
10:55 camelia rakudo-moar 774e2d: OUTPUT«2␤»
10:55 Zoffix jkramer, temp
10:55 Zoffix jkramer, but is rw is different. It lets you modify the caller's var
10:56 psch jkramer: you can't 'is rw' an optional Parameter because you might not have an argument, but you can 'is copy' them
10:56 Zoffix you want is copy
10:56 psch worst case you copy nothing vOv
10:56 jkramer Ah, "is copy" does the trick. So by default it's a reference and modifying it would change it in the callers context too?
10:56 Zoffix m: http://perl6.party/post/Perl-6-There-Ar​e-Traitors-In-Our-Midst--Part-1#iscopy
10:56 camelia rakudo-moar 774e2d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3http:7⏏5//perl6.party/post/Perl-6-There-Are-Trai␤    expecting any of:␤        colon pair␤»
10:56 Zoffix err
10:56 Zoffix jkramer, ^
10:56 psch jkramer: by default its a containerless copy of the value of the argument
10:56 Zoffix m: my $meow = 72; sub (:$foo is rw) { $foo = 42 }($meow); say $meow
10:56 camelia rakudo-moar 774e2d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use 'is rw' on an optional parameter␤at <tmp>:1␤»
10:56 jkramer Ha, that's probably the best domain ever :D
10:56 Zoffix orly
10:57 Zoffix jkramer, see the About page :P
10:57 hahainternet yeah it's pretty classy
10:57 Zoffix m: my $meow = 72; sub (:$foo is required is rw) { $foo = 42 }($meow); say $meow
10:57 camelia rakudo-moar 774e2d: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:57 hahainternet Zoffix: show-off :)
10:57 Zoffix m: my $meow = 72; sub (:$foo is required is rw) { $foo = 42 }(:$meow); say $meow
10:57 camelia rakudo-moar 774e2d: OUTPUT«Required named parameter 'foo' not passed␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:57 jkramer Zoffix: Awesome :D
10:57 Zoffix m: my $meow = 72; sub (:$foo is required is rw) { $foo = 42 }(:foo($meow)); say $meow
10:57 camelia rakudo-moar 774e2d: OUTPUT«42␤»
10:57 Zoffix Seems to work
10:57 Zoffix jkramer, BTW, things inside arrays and hashes are still mutable by default
10:58 Zoffix m: my %hash = foo => 'bar'; sub (%h) { %h<foo> = 'meow' }(%hash); dd %hash
10:58 camelia rakudo-moar 774e2d: OUTPUT«Hash %hash = {:foo("meow")}␤»
10:58 hahainternet do you need the 'sub' syntax if you're immediately calling? are there no bare blocks in perl6?
10:59 hahainternet oh, no that works
10:59 jkramer Alright, thanks for explaining!
10:59 Zoffix m: my %hash = foo => 'bar'; -> %h { %h<foo> = 'meow' }(%hash); dd %hash # there are
10:59 camelia rakudo-moar 774e2d: OUTPUT«Hash %hash = {:foo("meow")}␤»
10:59 Zoffix Just a habit
10:59 Zoffix And you can't `return` from a block
11:04 dalek doc: 7151835 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
11:04 dalek doc: doc return-rw
11:04 dalek doc: review: https://github.com/perl6/doc/commit/7151835b35
11:04 dalek doc: b7ade36 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
11:04 dalek doc: link from fail to phasers
11:04 dalek doc: review: https://github.com/perl6/doc/commit/b7ade36049
11:11 M-matthew joined #perl6
11:11 M-Illandan joined #perl6
11:18 mrplastic left #perl6
11:26 brrt joined #perl6
11:37 wamba joined #perl6
11:43 kid51 joined #perl6
12:07 brrt joined #perl6
12:10 dalek doc: 30f81a5 | (Aleks-Daniel Jakimenko-Aleksejev)++ | WANTED:
12:10 dalek doc: WANTED file is not needed anymore (#657)
12:10 dalek doc:
12:10 dalek doc: Here is the summary of all items in WANTED list (and reasons why we do not
12:10 dalek doc: need to list them anymore):
12:10 AlexDaniel whoops…
12:11 dalek joined #perl6
12:14 kaare_ joined #perl6
12:25 perlpilot joined #perl6
12:25 mrplastic joined #perl6
12:26 kurahaupo joined #perl6
12:26 canopus joined #perl6
12:33 mrplastic left #perl6
12:33 rgrinberg joined #perl6
12:56 kurahaupo joined #perl6
12:56 vendethiel joined #perl6
12:56 cognominal joined #perl6
13:03 brrt joined #perl6
13:04 sufrostico joined #perl6
13:10 dalek Inline-Perl5: c58cbe6 | (Zoffix Znet)++ | README.md:
13:10 dalek Inline-Perl5: Use latest-stable perl in perlbrew instructions
13:10 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/c58cbe6477
13:10 dalek Inline-Perl5: fb19e06 | lizmat++ | README.md:
13:10 dalek Inline-Perl5: Merge pull request #68 from zoffixznet/patch-1
13:10 dalek Inline-Perl5:
13:10 dalek Inline-Perl5: Use latest-stable perl in perlbrew instructions
13:10 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/fb19e06bfb
13:10 MafProd_ joined #perl6
13:14 ParsonsNose joined #perl6
13:14 rurban1 joined #perl6
13:20 Tushar_ joined #perl6
13:20 gfldex can i provide a URL on X<>?
13:21 donaldh joined #perl6
13:21 BrokenRobot Not at the momemnt, but it's a direly needed feature.
13:21 Tushar_ left #perl6
13:21 BrokenRobot Probably something added in Pod::To::HTML
13:21 moritz what would that do?
13:21 gfldex X<> would need to create a uniq id in <a/>
13:22 BrokenRobot moritz: ability to link to a reference in the document.
13:22 gfldex right now using the search field on anything created by X<> lands on the page where the X<> was in a .pod
13:22 gfldex you can't jump down to the actual <a name="your-index-entry"> because there is no <a/>
13:23 moritz BrokenRobot: you mean something like latex's \ref?
13:23 gfldex yes
13:23 BrokenRobot I don't know anything about latex.
13:23 moritz but wouldn't that be a feature of L<...> instead?
13:23 moritz I mean, X<...> are the anchors, not the links to the anchors
13:23 skids joined #perl6
13:24 BrokenRobot Not really. There's nothing in the generated markup to indicate where there was an X<>
13:24 MafProd_ Has anyone recently tried to install JSON::RPC recently on Linux? Panda fails on a test with a MAST::Frame error.
13:24 BrokenRobot So you can't contruct a link to that portion of the HTML document
13:24 gfldex that is not true, there is a <span name="not-so-uniq"/>
13:24 MafProd_ I tried on different distro's and keep getting the same error.
13:24 BrokenRobot MafProd_: someone else had that error too
13:24 nine gfldex: you don't need an <a/> for jumping within a document. Any element with an id is enough.
13:24 moritz BrokenRobot: right. But that means X<> must construct the anchor
13:24 moritz BrokenRobot: and L<> the link to that anchor
13:24 gfldex <a> can have a name= that doesn't need to be uniq
13:24 MafProd_ Could not find anything usefeull in google.
13:25 BrokenRobot MafProd_: do you actually need that module or are you just trying to install Task::Star?
13:25 gfldex and we need uniq ids because they can collide with <a/>s provided by =head
13:25 nine gfldex: but a non-unique name is not as usefull for navigation, isn't it?
13:25 gfldex it's better then nothing
13:25 MafProd_ BrokenRobot, I was trying to install Task::star
13:26 BrokenRobot MafProd_: it's just a collection of modules. You don't need it for functional Perl 6. You can install any individual modules from it. There're in this list: https://github.com/tadzik/Task​-Star/blob/master/META.info#L5
13:27 MafProd_ BrokenRobot : I'll give that a try. Thnx.
13:28 gfldex the problem is that forcing uniq ids/name attributes would require the build to fail on non-uniq values. LaTeX is solving that problem by not being parallelable.
13:29 BrokenRobot Are we actually paralleling a build of a single pod?
13:29 nowan joined #perl6
13:29 moritz one could always return a set of anchors, and fail at thread/promise joining time when there's a conflict
13:29 gfldex BrokenRobot: not right now because of thread-knots
13:30 moritz though that's more complicated for sure
13:30 gfldex i will create a list of all X<> anchors to see how many dupes we actually got
13:31 gfldex we could also prefix the ids with your-file.pod-- to create uniqness
13:31 BrokenRobot gfldex: but they only need to be unique per file.
13:32 gfldex they may have to be uniq in the search.js . Not sure how that is actually created.
13:33 BrokenRobot If that's the case, that'd be search.js's problem, not Pod::To::HTML's
13:35 z3ndrag0n joined #perl6
13:36 nine FWIW I can reproduce JSON::RPC's test failure: Expected MAST::Frame, but didn't get one
13:36 BrokenRobot ditto
13:37 BrokenRobot I'll file a ticket
13:43 canopus joined #perl6
13:44 MafProd_ BrokenRobot: I am able to build the other modules from Task::Star without issues. Only the JSON::RPC fails during testing.
13:45 BrokenRobot How come the Issues tab is disabled for LWP::Simple? https://github.com/perl6/perl6-lwp-simple
13:45 BrokenRobot It needs IO::Socket::SSL in the prereqs, since the tests fail without it
13:45 BrokenRobot OR better, make those tests optional
13:46 _mg_ left #perl6
13:46 iH2O joined #perl6
13:47 timotimo i just turned it back on
13:49 rurban joined #perl6
13:50 BrokenRobot Filed: https://github.com/perl6/perl6-lwp-simple/issues/2
13:52 BrokenRobot .tell stmuk This potentially blocks R*, as JSON::PRC is part of Task::Star: https://github.com/bbkr/jsonrpc/issues/28
13:52 yoleaux BrokenRobot: I'll pass your message to stmuk.
13:53 wisti joined #perl6
13:54 BrokenRobot .oO( Why is JSON::RPC in Task::Star .... )
13:55 tadzik is it not in regular-star?
13:55 BrokenRobot What's regular-star?
13:55 tadzik rakudo star
13:55 tadzik the actual release, unlike the module that mimicss it
13:55 nine It is. But why?
13:56 nine Doesn't sound like a module that most or even many users will need.
13:56 tadzik it was probably considered usable and useful :)
13:56 tadzik I don't think Star ever really had a guideline of what's worthy and what's not
13:57 iH2O seems youre investing lots of efforts in this new usable/useful cult version folks B-)
13:57 nine Well to me Task::Star seems like just a list of the modules that at one point worked.
13:57 BrokenRobot I was under the impression the actual release just ran panda install Task::Star :)
13:57 timotimo no, it ships the modules in a specific version
13:57 tadzik no, that's why they're out of sync :)
13:57 ugexe nine: it has a path-spec. the problem is because after it is successful in loading the byte code for tar#lib/Foo/Bar.pm6, the code inside tar#lib/Foo/Bar.pm6 will have just `use Foo::Bar` which doesn't match the path spec anymore but it is inside the same tar archive. so it feels like im simply missing one step somewhere
13:57 BrokenRobot I see.
13:58 ugexe er s/use Foo::Bar/use Foo/
13:58 tadzik I created Task::Star because I wanted the same set installed but didn't use Rakudo Star
13:58 BrokenRobot Sure. I guess my question should've been
13:58 tadzik since then I mostly rely on pull request and manual reports about things that change about Star modules
13:58 BrokenRobot .oO( Why is JSON::RPC in R* .... )
13:59 tadzik :)
13:59 BrokenRobot :D
13:59 moritz because there isn't a real vision for *
13:59 ugexe like maybe `use lib "/x/y/x.tar.gz"`
13:59 nine ugexe: I know it has a path-spec. But that currently creates a spec that starts with the repo's short-id. The perl6 process that precompiles won't find your repo class with that short-id. You need the full class name instead.
14:00 mr-foobar joined #perl6
14:00 moritz and in the beginning, we had so few modules that we just included whatever seemed working and somewhat usable
14:01 nine ugexe: Also why is that require "tar#lib/Zef.pm6" in the first place and not just require Zef;?
14:01 timotimo that's a reason we might soon want to have Rakudo Sparkles
14:03 BrokenRobot RakudoFAT: includes every ecosystem module that managed to successfully install when the release was cut :P
14:03 ptolemarch joined #perl6
14:04 timotimo Rallkudo?
14:04 BrokenRobot Includes LiveCD! :D
14:04 ugexe nine: only because the former worked first, so i kept prodding that
14:04 BrokenRobot Rakudall
14:04 aries_liuxueyang joined #perl6
14:04 nine ugexe: seems to me like it should look like this: use CompUnit::Repository::Tar; BEGIN CompUnit::RepositoryRegistry.use-repo(CompUn​it::Repository::Tar.new(:prefix<zef.tgz>)); use Zef;
14:05 nine ugexe: or alternatively: use lib 'CompUnit::Repository::Tar#zef.tgz'; use Zef;
14:05 nine I'm just not sure if use lib already handles all the magic needed. Will have to check that.
14:06 timotimo Everykudo
14:06 gfldex BrokenRobot: there are 8 duplicated index entries and I can find them real quick. I will have a look at Pod::To:HTML to get something linkable in.
14:07 ugexe nine: i think those are what i really wanted
14:07 acrussell joined #perl6
14:10 dalek ecosystem: 3416c74 | Altai-man++ | META.list:
14:10 dalek ecosystem: Test::NoTabs module
14:10 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/3416c74a5c
14:13 dalek perl6-most-wanted: 20ab382 | Altai-man++ | most-wanted/modules.md:
14:13 dalek perl6-most-wanted: Test::NoTabs was implemented
14:13 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/20ab382757
14:14 Ven_ joined #perl6
14:14 vendethiel joined #perl6
14:15 ParsonsNose joined #perl6
14:15 Ven_ m: my %h; for %h<foo>.list { .say; } # WAT?
14:15 camelia rakudo-moar d4ac15: OUTPUT«(Any)␤»
14:16 moritz Ven_: what did you expect?
14:16 mst joined #perl6
14:16 Ven_ moritz: I'd expect an empty list. and thus no loop iteration.
14:16 timotimo that's not how that works
14:16 timotimo m: my %h; for %h<foo bar>.list { .say
14:16 camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3my %h; for %h<foo bar>.list { .say7⏏5<EOL>␤    expecting any of:␤        statement end␤        statement modifier␤        statement modifier loop␤»
14:16 timotimo m: my %h; for %h<foo bar>.list { .say }
14:16 camelia rakudo-moar d4ac15: OUTPUT«(Any)␤(Any)␤»
14:16 Ven_ because the non-nice thing is thing:
14:16 timotimo you'll always get a container that you can bind into
14:17 timotimo you want :exists
14:17 Ven_ nope
14:17 moritz the default value for accessing a non-existing hash element is Any, and Any.list is a one-element list containing Any
14:17 timotimo m: my %h; for %h<foo bar>.list { $_ = 5 }; say %h
14:17 camelia rakudo-moar d4ac15: OUTPUT«{bar => 5, foo => 5}␤»
14:17 Ven_ that part makes sense. however...
14:17 Ven_ m: my %h; %h<a>.push: 1; %h<a>.push: 2; %h<a>.push: 2; say %h<a>.perl;
14:17 camelia rakudo-moar d4ac15: OUTPUT«$[1, 2, 2]␤»
14:17 Ven_ it's a scalar container. $[]. so, after that, I need to .list to remove the $
14:17 moritz m: my %h is default(Nil); .say for %h<foo>
14:17 camelia rakudo-moar d4ac15: OUTPUT«Nil␤»
14:17 moritz m: my %h is default(Empty); .say for %h<foo>
14:17 camelia rakudo-moar d4ac15: ( no output )
14:18 Ven_ m: my %h; %h<a>.push: 1; %h<a>.push: 2; %h<a>.push: 2; say %h<a>.perl; for %h<a> { .say } # only one element, wut?
14:18 camelia rakudo-moar d4ac15: OUTPUT«$[1, 2, 2]␤[1 2 2]␤»
14:18 Ven_ m: my %h; %h<a>.push: 1; %h<a>.push: 2; %h<a>.push: 2; for %h<a> { .say } # only one element, wut?
14:18 camelia rakudo-moar d4ac15: OUTPUT«[1 2 2]␤»
14:18 Ven_ m: my %h; %h<a>.push: 1; %h<a>.push: 2; %h<a>.push: 2; for %h<a>.list { .say } # guess I'll try to .list
14:18 camelia rakudo-moar d4ac15: OUTPUT«1␤2␤2␤»
14:18 donaldh joined #perl6
14:18 Ven_ ^ that works. But if 'a' doesn't exist as a key, you'll get a loop iteration.. "for nothing"
14:19 Ven_ (which, in my recursive case, means an infinite loop...)
14:20 moritz Ven_: use "is default(Empty)" or "is default(())" on the hash declaration
14:20 moritz we do have to the tools to bend the language to your will.
14:20 Ven_ oh, we have the tools. I'd rather not have to use them for such a simple thing, though..
14:20 iH2O i thought i was stable
14:21 iH2O it was stable
14:21 Ven_ my expectations of lists are still a bit wonky, maybe? I don't understand why %h<foo>.push: 3; creates a $[] still..
14:21 Ven_ moritz: I can't even do that, it's read from another thing and passed with %()
14:21 Ven_ if $tree<children> { for $tree<children> {} } it is ... :[
14:22 moritz for $tree<children> // ()
14:22 Ven_ that won't work. $tree<children> is a $[]. I can't "for" it.
14:22 Ven_ [16:18] <Ven_> m: my %h; %h<a>.push: 1; %h<a>.push: 2; %h<a>.push: 2; say %h<a>.perl; for %h<a> { .say } # only one element, wut?
14:22 Ven_ ^ confusing to me
14:23 moritz for @($tree<children> // [])
14:23 moritz yes, ugyl
14:25 Ven_ sorry for beating a how-so-dead horse at this point. but the solution feels a bit icky
14:26 moritz I do wonder if the scalar container can be avoided for .push autovivification
14:27 timotimo is default Slip? :P
14:27 moritz but then I guess you can't override the array anymore by assignment
14:28 timotimo mhm
14:28 mohae joined #perl6
14:29 Ven_ moritz: why not?
14:29 hjst left #perl6
14:30 Ven_ my @h; my %h; %h<a> = @h; @h<a>.push: 3; say @h<a>; # works?
14:30 Ven_ m: my @h; my %h; %h<a> = @h; @h<a>.push: 3; say @h<a>; # works?
14:30 camelia rakudo-moar d4ac15: OUTPUT«Type Array does not support associative indexing.␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:30 Ven_ m: my @h; my %h; %h<a> = @h; %h<a>.push: 3; say %h<a>; # works?
14:30 camelia rakudo-moar d4ac15: OUTPUT«[3]␤»
14:30 finanalyst joined #perl6
14:30 Ven_ m: my @h; my %h; %h<a> = @h; %h<a>.push: 3; say %h.perl;
14:30 camelia rakudo-moar d4ac15: OUTPUT«{:a($[3])}␤»
14:30 Ven_ :<
14:33 moritz Ven_: because hash and array elements remain assignable by them being a Scalar container holding the actual value
14:33 Ven_ ya, I understand. but the implications displease me :P
14:33 moritz m: my %h; %h<a> := [42]; say %h<a>
14:33 camelia rakudo-moar d4ac15: OUTPUT«[42]␤»
14:34 moritz m: my %h; %h<a> := [42]; %h<a> = 'blerg'
14:34 camelia rakudo-moar d4ac15: ( no output )
14:34 moritz m: my %h; %h<a> := [42]; %h<a> = 'blerg'; say %h
14:34 camelia rakudo-moar d4ac15: OUTPUT«{a => [blerg]}␤»
14:34 moritz this seems to call the array's STORE method
14:34 Ven_ m: my %h; %h<a> := [42]; %h<a> = 'blerg'; say %h.perl
14:34 camelia rakudo-moar d4ac15: OUTPUT«{:a(["blerg"])}␤»
14:34 Ven_ I see..
14:35 Ven_ it makes sense. we tell it "i have a container already, lemme do my things".
14:39 iH2O how do u represent the Ven diagram in perl6?
14:39 iH2O *oops Venn
14:42 brabo joined #perl6
14:44 brabo left #perl6
14:46 Ven_ iH2O: I'm usually defined by Failure.new :)
14:47 donaldh joined #perl6
14:48 iH2O how many containers can a Venn diagram have? is that related to the 4-color theorem for coloring a map?
14:48 iH2O God know...
14:48 iH2O knows...
14:49 gregf_ is a container a symbol table or some kind of a resource pool?
14:49 Ven_ Ven knows.
14:49 Ven_ gregf_: a symbol table?
14:49 domidumont joined #perl6
14:49 bitmap joined #perl6
14:50 DrForr There's a really good visualization of a N-way venn diagram that looks like a mess of lobes, past about 5 it's utter chaos.
14:50 iH2O srry to hear that, doc
14:52 iH2O i thought one could squeeze at least a dozen..
14:52 moritz gregf_: a container is just an object that passes on most of its method calls to its content
14:53 moritz not a symbol table, not a resource pool, just an plain old object
14:54 z3ndrag0n joined #perl6
14:56 gregf_ moritz: sure, but how does it map 2 sigils to the same datatype/struct
14:56 gregf_ like so,
14:56 moritz gregf_: a container doesn't map any sigils to anything
14:56 vendethiel joined #perl6
14:57 gregf_ class Foo {  has Array $.arr is rw; has @.brr is rw; }; my $f = Foo.new(:arr([1,2]), :brr([3,4]));say $f.arr.^name, $f.brr.^name
14:57 gregf_ oh
14:57 rindolf joined #perl6
14:57 gregf_ so a container is an object, so what does it contain or why is it called a container
14:59 nine gregf_: a container may contain a value.
14:59 * perlpilot wonders if this is part of the "references" confusion he noticed at TPC this year.
15:00 huggable joined #perl6
15:01 DrForr Could very well be, I remember having to defer to Liz at one point about this after a talk I gave.
15:01 Ven_ DrForr++ liz++
15:01 gregf_ nine: sure. and whats the life cycle of a container?
15:02 cdg joined #perl6
15:02 gregf_ would i be right in saying, the Garbage Collector cleans up containers?
15:02 gregf_ im sorry for being so vague, *coming from a java/spring background and containers mean something quite different*
15:03 gregf_ if a container is just an object then that would just be it ;)
15:03 nine gregf_: nope. At a level as low as the GC, containers are just plain objects
15:04 Ven_ gregf_: a container contains a value. The value can be "42". 42 is an integer, and is not assignable by itself -- it's only a number! The container is the part that does the storing, and provides = (as well as ++, etc).
15:04 nine gregf_: you can think of it this way: a variable is just a name for a container. The container may store a value and you may replace that value.
15:04 Ven_ you can't write "42++" – because it's a value, without a container. but "my $a = 42; $a++;" makes sense, because the container's value can be changed (to 43)
15:05 khw joined #perl6
15:05 gregf_ oh - ok. thats quite helpful
15:06 perlpilot gregf_: great!  Now you write the docs to explain it to other people coming from java/spring  ;-)
15:06 Ven_ :P
15:06 gregf_ i was like. there is a container based on datatypes and each of them have some sort of a pooling mechanism
15:06 gregf_ heh
15:06 Ven_ no, it's very far from DI.
15:09 gregf_ moritz: Ven_ nine perlpilot: ta
15:09 gregf_ Ven_: symbol table is Perl5 land
15:09 Ven_ oh, you mean *x-like stuff?
15:09 Ven_ I'm a Perl 5 noob :).
15:12 gregf_ well, Perl6 is a hybrid of Perl5 and Ruby *runs*
15:14 perlpilot gregf_: no need to run.  Perl 6 *is* a hybrid of many good ideas for several languages, including Ruby  :)
15:14 iH2O O_O wat? no more than alien abduction makes alien-human hybrids
15:15 perlpilot (maybe I should say "Perl 6 is a hybrid of many good ideas from several languages including Perl 5"  ;-)
15:16 iH2O you mean an "outgrowth of" given that perl6 refines those ideas
15:17 Ven_ It's probably a hybrid of many bad ideas as well. Let's find out :)
15:17 Ven_ I wonder what kind of mistake I'll do next.
15:18 timotimo i don't think we pull in many bad ideas, but there could be a few bad ideas in the way things are composed?
15:18 perlpilot Good ideas are designed, bad ideas are discovered.
15:19 iH2O perlpilot, u just said that genius is 95% effort and 5% inspiration
15:19 iH2O i disagree
15:19 iH2O i think thats the other way around
15:19 perlpilot I'm pretty sure I didn't just say that :)
15:20 timotimo :D
15:20 perlpilot bad ideas aren't know a priori, otherwise they wouldn't exist.  (unless that was the goal--to make something "bad")
15:20 finanalyst joined #perl6
15:21 iH2O war's goal is to make things bad for the other side
15:24 Ven_ timotimo: we'll find out in time :P
15:26 timotimo yup
15:26 maettu joined #perl6
15:28 pat_js joined #perl6
15:36 rurban_ joined #perl6
15:43 mr-foobar joined #perl6
15:52 TimToady m: my %h; for %h<foo> :v { .say; }
15:52 camelia rakudo-moar d4ac15: ( no output )
15:53 TimToady why didn't anyone suggest that to Ven_?
16:02 * BrokenRobot didn't know that one
16:03 * TimToady admits it's not the most obvious feature of Perl 6...
16:03 TimToady m: my %h; for %h<foo> :k { .say; }
16:03 camelia rakudo-moar d4ac15: ( no output )
16:03 TimToady works for keys too
16:04 araujo joined #perl6
16:05 * TimToady also admits he has no idea which of Ven's aliases to .tell :)
16:06 * TimToady wonders if the bot should be smart enough to ignore tails...
16:08 timotimo TimToady: d'oh, i suggested :exists, but that's very obviously wrong
16:09 vendethiel joined #perl6
16:11 setty1 joined #perl6
16:11 * llfourn didn't know that one either
16:14 adu joined #perl6
16:14 lizmat joined #perl6
16:20 TimToady m: my %h; for %h<foo> :v { .say; }
16:20 camelia rakudo-moar d4ac15: ( no output )
16:20 TimToady vendethiel: ^^^
16:20 * TimToady assumes Ven_ and vendethiel are still the same person :)
16:23 dj_goku The keynote from damian conway was pretty sweet walk through of why perl6 is awesome. :D is damian in here?
16:23 lizmat dj_goku: not very often, but TimToady *is*  :-)
16:23 yoleaux 08:50Z <gfldex> lizmat: i blogged about 1h to late, you may want to include it in the next weekly https://gfldex.wordpress.com/2016/07/05/2-2-3/
16:24 dj_goku who is TimToady jk :D
16:25 lizmat dj_goku: aka Larry Wall
16:25 dj_goku hehe yeah!
16:28 BrokenRobot The real TimToady: https://s-media-cache-ak0.pinimg.com/236x/ab​/f2/3a/abf23a275b63d8a8eec79f0503b9f740.jpg
16:28 dj_goku I have been trying to hack my way through building a few things with NativeCall to get my feet wet there.
16:30 perlpilot Damian doesn't do IRC, does he?
16:32 FROGGS joined #perl6
16:32 lizmat m: my @a; { temp @a[10] = "foo" }; dd @a   # BrokenRobot: more of the same
16:32 camelia rakudo-moar d4ac15: OUTPUT«Array @a = [Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any]␤»
16:35 * BrokenRobot notes that in ticket
16:38 firstdayonthejob joined #perl6
16:47 ilmari m: say ²²
16:47 camelia rakudo-moar d4ac15: OUTPUT«4␤»
16:48 ilmari uh...
16:48 ilmari m: say ²²²
16:48 camelia rakudo-moar d4ac15: OUTPUT«4194304␤»
16:49 ilmari m: say 2²² == ²²²
16:49 camelia rakudo-moar d4ac15: OUTPUT«True␤»
16:49 BrokenRobot There's a ticket for that already I believe
16:49 lizmat yeah
16:49 BrokenRobot The first superscript digit becomes the base, basically
16:49 BrokenRobot m: say ²
16:49 camelia rakudo-moar d4ac15: OUTPUT«2␤»
16:49 ilmari BrokenRobot: yeah
16:50 timotimo yeah, because superscripts can only go after you already have a number
16:50 ilmari surely a lone superscript should be a syntax error
16:50 ilmari m: /5
16:50 camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5===␤Regex not terminated.␤at <tmp>:1␤------> 3/57⏏5<EOL>␤Unable to parse regex; couldn't find final '/'␤at <tmp>:1␤------> 3/57⏏5<EOL>␤    expecting any of:␤        infix stopper␤        term␤␤»
16:51 ilmari m: * 3
16:51 camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3*7⏏5 3␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        statement modifier loop␤»
16:51 lizmat ilmari: there *is* agreement about that  :-)
16:51 ilmari BrokenRobot: got a link?
16:52 BrokenRobot ilmari: https://rt.perl.org/Ticket/Display.html?id=126732
16:52 timotimo the thing is, lone unicode characters hanging around in your code just get their number attribute taken and interpreted as the number
16:52 BrokenRobot m: "²".uniprop.say
16:52 camelia rakudo-moar d4ac15: OUTPUT«No␤»
16:52 BrokenRobot Aye
16:52 ilmari but why doesn't the whole string of superscript numbers become the number?
16:52 ilmari why isn't ²² == 22?
16:52 BrokenRobot ilmari: because it's a No, not an Nd
16:53 BrokenRobot m: say ⑤
16:53 camelia rakudo-moar d4ac15: OUTPUT«5␤»
16:53 BrokenRobot m: say ⑤⑤
16:53 camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3say ⑤7⏏5⑤␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤        stat…»
16:53 BrokenRobot And superscripts numbers are handled differently.
16:53 timotimo aye, they aren't decimal
16:54 BrokenRobot So to me this now looks like not a bug. Just a curious artefact of the fact that we can use things like ⑤ that become a number
16:54 BrokenRobot m: say ⑤²²
16:54 camelia rakudo-moar d4ac15: OUTPUT«2384185791015625␤»
16:54 ilmari smells like overgeneralisation to me
16:54 BrokenRobot Basically ^ that, except with ² instead of ⑤
16:54 ilmari m: "⑤".uniprop.say
16:54 camelia rakudo-moar d4ac15: OUTPUT«No␤»
16:54 ilmari m: say ⑤⑤
16:54 camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3say ⑤7⏏5⑤␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤        stat…»
16:55 TimToady to me it's just a DIHWIDT
16:55 BrokenRobot And this bugs out because there is no handlings for postfix ⑤ nums
16:55 timotimo yup
16:55 timotimo we can certainly make the parser a bit smarter about this situation
16:56 timotimo and give a more helpful error message
16:56 timotimo like "⑤ cannot be used as if it were decimals"
16:56 TimToady but why would anyone write that in the first place, other than fiddling around?
16:56 BrokenRobot Indeed.
16:56 TimToady I suppose one could get out of sync with term/infix
16:57 BrokenRobot "Doctor, It Hurts When I Do This" ?
16:57 TimToady S99: DIHWIDT
16:57 BrokenRobot Oh, "stop doing that"? D
16:57 ilmari the problem is that it doesn't hurt when you do ³², it's just silently wrong
16:58 TimToady which hurts :)
16:58 BrokenRobot Maybe worth putting in https://docs.perl6.org/language/glossary#DIHWIDT 'cause I went 'huh'?
16:58 BrokenRobot ilmari: but what would be the "right"?
16:58 ilmari BrokenRobot: syntax error
16:58 BrokenRobot Alright.
16:59 timotimo mhh, force the user to add parens?
16:59 BrokenRobot m: say ³(²)
16:59 camelia rakudo-moar d4ac15: OUTPUT«No such method 'CALL-ME' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
16:59 BrokenRobot How?
17:00 BrokenRobot m: say (³)²
17:00 camelia rakudo-moar d4ac15: OUTPUT«9␤»
17:01 * TimToady notes that you can't get this by accidentally calling something expecting args without args and then powering it up, since listops always require a space
17:01 addison joined #perl6
17:01 TimToady m: sub foo ($a) { $a }; foo²²
17:01 camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling foo() will never work with declared signature ($a)␤at <tmp>:1␤------> 3sub foo ($a) { $a }; 7⏏5foo²²␤»
17:01 TimToady m: sub foo (*@a) { @a }; foo²²
17:01 camelia rakudo-moar d4ac15: ( no output )
17:02 TimToady m: sub foo (*@a) { @a }; say foo²²
17:02 camelia rakudo-moar d4ac15: OUTPUT«0␤»
17:02 TimToady even there, it's always going to be taken as a ** 22
17:03 TimToady m: sub foo (*@a) { @a }; say foo ²²
17:03 camelia rakudo-moar d4ac15: OUTPUT«[4]␤»
17:03 TimToady I guess if someone writes that...
17:04 TimToady just not sure it's worth the bloat to catch the corner case of two useful features
17:06 lostinfog joined #perl6
17:07 TimToady otoh that's never stopped us before :)
17:10 TimToady especially if we can make a pun on "raw power" or some such in the error message :)
17:10 zakharyas joined #perl6
17:11 TimToady Absolute power corrupts at line 42
17:12 TimToady Power outrage at line 42
17:12 adu joined #perl6
17:13 yqt joined #perl6
17:13 timotimo "this expression is only big enough for one power"
17:13 timotimo "put the other power behind bars"
17:14 TimToady "your power base is lacking"
17:15 TimToady "all your base are belong to nobody"
17:16 TimToady or maybe we should just assume they meant $_²²   :D
17:16 timotimo oh, we weren't talking about ^2^3 vs ^23 any more?
17:17 TimToady m: say ²²
17:17 camelia rakudo-moar d4ac15: OUTPUT«4␤»
17:17 TimToady we're talking about that corner case
17:17 timotimo ah
17:17 vendethiel joined #perl6
17:18 BrokenRobot dalek: help
17:18 BrokenRobot dalek: source
17:22 domidumont joined #perl6
17:26 araujo joined #perl6
17:27 araujo joined #perl6
17:28 mspo $_ or an error makes sense
17:29 kurahaupo joined #perl6
17:29 jjido_ joined #perl6
17:30 hahainternet i still want to argue that $x_i (ie subscript) and $x_1 should be treated the same, but i think that's a lost cause now :)
17:30 araujo joined #perl6
17:31 timotimo you can make that a slang
17:32 hahainternet oh sure, i just think it's inconsistent and ugly at the moment ;)
17:32 hahainternet and i am useless at helping with anything that actually matters
17:34 BrokenRobot m: my \xₘ = 42; say xₘ
17:34 camelia rakudo-moar d4ac15: OUTPUT«42␤»
17:34 hahainternet see that is really beautiful, but there's loads of times i've used X_i1 and X_i2 etc
17:35 hahainternet which is fine without the subscripts
17:35 hahainternet so either we should disallow variables ending in a numeral, or permit subscripts, IMHO
17:35 TimToady m: say i².Num
17:35 camelia rakudo-moar d4ac15: OUTPUT«-1␤»
17:35 hahainternet but this is enough of a distraction, i will now shut up :)
17:35 BrokenRobot m: my \x₁ = 42
17:35 camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Term definition requires an initializer␤at <tmp>:1␤------> 3my \x7⏏5₁ = 42␤»
17:36 TimToady m: say i²².Num
17:36 camelia rakudo-moar d4ac15: OUTPUT«Can not convert -1+4.89982515786259e-15i to Num: imaginary part not zero␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
17:37 buharin joined #perl6
17:37 TimToady m: say i⁸.Num
17:37 camelia rakudo-moar d4ac15: OUTPUT«1␤»
17:38 TimToady m: say i¹⁶.Num
17:38 camelia rakudo-moar d4ac15: OUTPUT«1␤»
17:38 TimToady m: say i²⁰.Num
17:38 camelia rakudo-moar d4ac15: OUTPUT«Can not convert 1-1.22464679914735e-15i to Num: imaginary part not zero␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
17:38 BrokenRobot m: say "₁".uniprop, sub ₛᵤᵇₛᶜᵣᵢₚₜₛ_ᶠₒᵣ_ʸₒᵤ {}.name
17:38 camelia rakudo-moar d4ac15: OUTPUT«Noₛᵤᵇₛᶜᵣᵢₚₜₛ_ᶠₒᵣ_ʸₒᵤ␤»
17:39 hahainternet BrokenRobot: ;-D
17:40 psch ETOOMANYBOXES
17:41 BrokenRobot psch: http://i.imgur.com/fe5KD04.png
17:41 BrokenRobot Oh, I guess that's not the best, since I'm missing some chars in the terminal too :D
17:41 timotimo no uberi for you?
17:41 psch looks like what's boxes for me is just straight up missing in the screenshot? :)
17:41 psch m: .uniname.say for "ₛₛₚₜₛ".comb
17:41 camelia rakudo-moar d4ac15: OUTPUT«LATIN SUBSCRIPT SMALL LETTER S␤LATIN SUBSCRIPT SMALL LETTER S␤LATIN SUBSCRIPT SMALL LETTER P␤LATIN SUBSCRIPT SMALL LETTER T␤LATIN SUBSCRIPT SMALL LETTER S␤»
17:42 timotimo SSPTS?
17:42 psch that's the boxes in order
17:42 psch []ub[]cri[][][]
17:42 timotimo ah
17:42 BrokenRobot psch: http://i.imgur.com/P1RI5Gk.png
17:43 hahainternet also https://i.imgur.com/90a0ujb.png
17:43 psch would making it "subscripts_for_bcfy" have made an auto-pun?
17:43 hahainternet BrokenRobot: looks like you need to install https everywhere :)
17:43 psch or is that again just self-referential
17:43 psch i'm really bad at the difference
17:43 BrokenRobot hahainternet: why?
17:43 hahainternet BrokenRobot: that's a very large question
17:44 hahainternet ultimately because it is better for your safety and security :)
17:44 BrokenRobot hahainternet: how?
17:44 BrokenRobot I'm over SSH tunnel ATM
17:44 hahainternet BrokenRobot: it preferentially selects https as opposed to http versions of sites
17:44 hahainternet SSH tunnel protects you only from your ISP, not anything upstream
17:44 hahainternet proper SSL provides PFS
17:45 BrokenRobot Yeah, but I don't care about anything upstream
17:45 BrokenRobot What.. they'll watch my IRC logs! :)
17:45 hahainternet https everywhere doesn't work with irc anyway :D
17:45 BrokenRobot Or my images... That i'm pretty sure I totally public anyway :)
17:45 hahainternet or your session cookies?
17:46 hahainternet mitm is a genuine risk
17:46 hahainternet but i take your point
17:46 BrokenRobot All for the low-low price of getting broken websites on occasion :)
17:46 hahainternet i find it amusing when i find a broken site thanks to https
17:46 BrokenRobot Do you got HTTPS Everywhere?
17:46 hahainternet the EFF one yes
17:47 hahainternet it's so funny though seeing myfancytechcompany.biz whos site requires javascript and is thoroughly broken over https
17:47 BrokenRobot Like rakudo.org ? :P
17:47 hahainternet haha is it? i haven't checked
17:47 BrokenRobot I guess a giant red warning about untrusted things when I visit
17:48 BrokenRobot s/guess/get/; ~_~
17:49 hahainternet heh yeah invalid CN
17:49 vendethiel joined #perl6
17:49 hahainternet This server could not prove that it is rakudo.org; its security certificate is from host.pmichaud.com
17:49 hahainternet let's encrypt is free now, no excuses for this :)
17:49 vendethiel TimToady: we either never were, or still are :-). also, that sounds awesome
17:49 BrokenRobot let's encrypt is not free.
17:50 BrokenRobot The cost is the time spent learning how to use it and how to set it up.
17:50 BrokenRobot and setting it up
17:50 hahainternet somewhat, but it's SSL
17:50 hahainternet it's not that different
17:50 hahainternet the req script is a little odd, but it lets them automate things which is understandable
17:50 vendethiel the docs say:
17:50 vendethiel > If you don't want to skip nonexistent elements, use the negated form:
17:51 vendethiel (docs*) should it clarify that it's the default?
17:51 TimToady note the double negative there
17:51 vendethiel isn't :!v the default?
17:52 TimToady yes, I suppose that could be made more explicit
17:52 vendethiel ah, okay. I thought I was still very confused %).
17:53 vendethiel m: my %h; %h<foo>.push:3; %h<foo>.push:4; %h<foo>.push:5; for %h<foo>:v { .say; } # no container, so no need to flatten
17:53 camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3my %h; %h<foo>.push:7⏏3; %h<foo>.push:4; %h<foo>.push:5; for %␤    expecting any of:␤        colon pair␤»
17:53 TimToady those semantics are the default, but not implemented by actually using :!v, just by leaving out :v
17:53 vendethiel m: my %h; %h<foo>.push: 3; %h<foo>.push: 4; %h<foo>.push: 5; for %h<foo>:v { .say; } # no container, so no need to flatten
17:53 camelia rakudo-moar d4ac15: OUTPUT«3␤4␤5␤»
17:53 vendethiel TimToady++
17:54 timotimo it's important to be able to use :!v because you could be using something like :v($shouldskip)
17:54 timotimo and you don't want to use interpolation if you don't haev to
17:54 vendethiel TimToady: I gather they are, but.. oh timotimo++ clarified
17:54 timotimo for performance reasons mostly, but also because it's a little bit wordy
17:54 vendethiel he's too fast!
17:55 TimToady mostly, the default semantics of subscripting are driven by the idea of not throwing away positional information that might be important
17:55 TimToady same reason we distinguish Nil from Empty these days
17:55 vendethiel that seems fair :).
17:56 vendethiel I just wonder where (else) I could document it, so that the next person in my situation doesn't go with for @(a // []) ... :P
17:58 perlpilot vendethiel++
18:00 jjido_ joined #perl6
18:02 DrForr m: unit regex foo;
18:02 camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed regex␤at <tmp>:1␤------> 3unit regex foo7⏏5;␤»
18:02 DrForr Hrm, that must've been fixed recently.
18:03 pullphinger joined #perl6
18:04 DrForr Well, guess I get to test my futureproofing this time 'round.
18:06 rgrinberg joined #perl6
18:07 cdg joined #perl6
18:13 adu joined #perl6
18:20 TimToady joined #perl6
18:24 donaldh joined #perl6
18:33 buharin hi
18:33 buharin I am looking for Perl friends
18:33 perlpilot buharin: you are in the right place :)
18:33 buharin perlpilot, ya but I want some friend to do things together
18:34 vendethiel joined #perl6
18:35 perlpilot buharin: you're looking to pair-program with someone?  On what?
18:35 DrForr Well, what are you interested in?
18:35 timotimo he's said he does perl5, so ... maybe not the right place after all?
18:36 buharin :(
18:36 dj_goku joined #perl6
18:36 buharin I like this channel more
18:36 buharin more good people here
18:37 spider-mario joined #perl6
18:37 DrForr buharin: Again, what are you interested in?
18:37 buharin Container Engine
18:39 DrForr There's already Docker and a few variants on that, is that what you mean?
18:40 buharin DrForr, no I want to write my own
18:42 DrForr I'm sure someone out there is interested in reinventing the wheel, but given how much traction Docker, Chef and Puppet have in the market it'd be an uphill battle. Not saying nobody is interested, just that it's hard going.
18:43 perlpilot DrForr++ well said.  I was trying to think of a good way to say just that  :)
18:43 buharin oh you said
18:43 DrForr Do you have an angle that nobody's considered?
18:43 buharin Chef and Puppet
18:44 buharin I didn't know these
18:44 moritz that's a bit of a category error
18:44 moritz Chef and Puppet are configuration management systems
18:44 buharin I don't like Docker
18:44 moritz not a container engine, like Docker, LXC or Rocket
18:44 buharin overtime when I do something with it
18:45 DrForr Yeah, those aren't container systems, I couldn't think of other systems.
18:45 moritz or BSD Jails
18:45 buharin it is overcomplicated
18:45 moritz or Solaris zones
18:45 perlpilot buharin: still ... you're in a saturated problem-space.
18:45 perlpilot buharin: If you had a hook that appeals to someone, you might find some help.
18:46 buharin yeah
18:48 sno joined #perl6
18:48 DrForr buharin: Well, here's a notion for you. Get your docker stuff down to the point where it's jus "ho-hum, up-arrow, rerun _that_ command, then up-arrow, rerun _that_ command... Oh, wait, this can be a shell script. Put into shell, rewrite in Perl 6, ???, Profit!"
18:49 DrForr That's what I've had to do to maintain sanity while my junior teammates break everything around me.
18:50 perlpilot DrForr: you've been rewriting everything in Perl 6?!?  awesome!  :)
18:50 buharin hey please add this tryperl.pl/index.html
18:50 buharin on the main perl site
18:50 buharin as help for newbies
18:51 DrForr Well, that's not going to help much for perl 6 users. Maybe ask over ---> there in #perl?
18:51 perlpilot buharin: 1) that's running a perl that's kinda old (5.010) and 2) what DrForr said.
18:51 buharin DrForr, I should definitely change my job ;P I had always a problems like "go do this" and when I stack more than hour then they said ok don't do that it takes too long
18:52 buharin today I was trying to run builedbot slave in docker
18:53 buharin docker ps docker image ..... and get bored while trying to constrain it for work
18:54 DrForr Damnit. again, I want a macro here. Must resist urge to yakshave...
18:54 timotimo perlpilot: "kinda old" LOL
18:57 DrForr Is there a decent way to say "foo() and return $something" where $something is the return value from foo()? I've got a list of conditions I want to try... I suppose I could just take advantage of shortcut. Trying that...
18:58 telex joined #perl6
19:01 psch m: sub f($a) { return $_ with $a; return "something undef-y" }; say f "foo"; say f Nil
19:01 camelia rakudo-moar d4ac15: OUTPUT«foo␤something undef-y␤»
19:02 psch DrForr: ^^^ that's what i'd call the degenerate case you mentioned
19:02 psch s/call/use for/
19:02 psch DrForr: with specific conditions it probably is clearly just to if/elsif/else
19:02 DrForr Yah. Not quite what I'm shooting for but it's got the germ of an idea.
19:03 DrForr And yea, it's structured like an if-then-else, there's just too much code for the conditional for my taste is all.
19:03 psch s/clearly/clearer/ # damnit keyboard /o\
19:04 DrForr Oh. That's how to solve it. o/ Lightning strikes o/
19:04 timotimo why "return $_ with $a" if you could just ".return with $a"?
19:05 timotimo except maybe performance, but now that return is a proper control exception, that should be just fine
19:05 psch yeah, that's a bit neater even
19:10 labster joined #perl6
19:18 BrokenRobot buharin: RE perl friends. Have you tried a local Mongers group? http://www.pm.org/groups/poland.html
19:18 dalek doc: f201414 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod6:
19:18 dalek doc: Added docs for Cool.fmt
19:18 dalek doc: review: https://github.com/perl6/doc/commit/f2014140c9
19:19 buharin there no perl group in my city
19:19 buharin :/
19:19 hanekomu joined #perl6
19:19 DrForr Try to start one?
19:20 buharin sure I can try
19:20 buharin have you any experience what can I talk about on the first meeting?
19:21 dfcarpenterak joined #perl6
19:22 DrForr It's not *my* experience that matters, it's *yours*. If it's your first time, then just make sure to talk about something you know and love about perl. The rest will flow from there.
19:23 * buharin Perl love
19:24 donaldh joined #perl6
19:24 jjido_ joined #perl6
19:28 BrokenRobot Or try some "general programming" type of group.
19:35 mr-foobar joined #perl6
19:36 ssotka joined #perl6
19:37 dogbert17 This list from the https://docs.perl6.org/type/Cool can't be entirely correct can it?
19:37 dogbert17 The following built-in types inherit from Cool: Array Backtrace Bag Baggy Bool Complex Cool Duration Enumeration Map FatRat Hash Instant Int List Match Nil Num Numeric Range Real Seq Set Stash Str Stringy
19:38 timotimo that makes sense
19:38 psch looks correct from here
19:38 psch i mean, a few of those aren't exactly below Any
19:38 dogbert17 So Backtrace inherits from Cool
19:38 psch m: say Backtrace ~~ Cool
19:38 camelia rakudo-moar b8bc1b: OUTPUT«False␤»
19:38 psch m: say Backtrace.^mor
19:38 camelia rakudo-moar b8bc1b: OUTPUT«Method 'mor' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at <tmp> line 1␤␤»
19:38 psch m: say Backtrace.^mro
19:38 camelia rakudo-moar b8bc1b: OUTPUT«((Backtrace) (Any) (Mu))␤»
19:39 psch i overlooked that, apparently :<
19:39 dogbert17 If I want to fix the list is ^mro they way to check the types?
19:39 dogbert17 m: say Bag.^mro
19:39 camelia rakudo-moar b8bc1b: OUTPUT«((Bag) (Any) (Mu))␤»
19:39 timotimo that's one way at least
19:40 dogbert17 So at the very least, Bag and Backtrace should go --
19:40 timotimo sounds good
19:40 dogbert17 I'm on it :)
19:42 psch dogbert17++
19:42 dogbert17 m: say Baggy.^mro # can a role inherit from Cool?
19:42 camelia rakudo-moar b8bc1b: OUTPUT«Method 'mro' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at <tmp> line 1␤␤»
19:42 psch m: say Baggy.new.^mro
19:42 camelia rakudo-moar b8bc1b: OUTPUT«((Baggy) (Any) (Mu))␤»
19:42 dogbert17 psch++
19:43 psch gotta pun first :)
19:47 jjido joined #perl6
19:49 addison joined #perl6
19:50 dalek doc: b633fa9 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod6:
19:50 dalek doc: Fixed list of types inheriting from Cool. timotimo++ psch++
19:50 dalek doc: review: https://github.com/perl6/doc/commit/b633fa9b5e
19:59 freezerburnv joined #perl6
20:02 hankache joined #perl6
20:02 hankache good evening #perl6
20:04 rindolf joined #perl6
20:12 dalek doc: 5a63611 | (Jan-Olof Hendig)++ | doc/Type/List.pod6:
20:12 dalek doc: Added docs for List.fmt
20:12 dalek doc: review: https://github.com/perl6/doc/commit/5a63611775
20:17 timotimo hello hankache
20:17 hankache hi timotimo
20:17 ZoffixMobile joined #perl6
20:18 ZoffixMobile TIL RT is actually MUCH better on mobile!
20:18 ZoffixMobile This may be the mobile URL that works on desktops: https://rt.perl.org/m/
20:21 ZoffixMobile well... almost... the only part that doesn't suck on normal version--viewing ticket content--is backwards.... literally: http://m.imgur.com/1XE5MvR And it's hard to tell but it seems some content is missing too.
20:23 bbkr joined #perl6
20:25 jjido joined #perl6
20:27 bbkr hi. I've found very weird bug when loading LWP: file Zonk.pm has following content "use LWP::Simple; unit class Zonk;". while loading this module from command line "perl6 -I. -e 'use Zonk;'" I get "Expected MAST::Frame, but didn't get one" error. I have no idea if this shiuld be reported to rakudo, LWP::Simple or IO::Socket::SSL
20:27 TEttinger joined #perl6
20:27 geekosaur backwards actually makes sense in a mobile context where you often care more about the most recent entries
20:27 geekosaur so they should be at the top
20:28 geekosaur rather than forcing you to scroll
20:35 ZoffixMobile That assumes you already read the content recently and remember what it's about.
20:38 rurban joined #perl6
20:39 setty2 joined #perl6
20:44 Zoffix left #perl6
20:45 harmil joined #perl6
20:47 Possum joined #perl6
20:48 harmil Was going to use this as an example of complex list manipulation for a co-worker. Any thoughts on simplifying? my @pi = (2, 4...*).map: {($^i %% 4 ?? -1 !! 1) * 4/([*] (^3).map: *+$^i)}; say [+] @pi[^1000]
20:48 kid511 joined #perl6
20:49 harmil rakudo: say [+] ((2, 4...*).map: {($^i %% 4 ?? -1 !! 1) * 4/([*] (^3).map: *+$^i)})[^1000]
20:49 camelia rakudo-moar 027dd3: OUTPUT«0.141592653340542␤»
20:50 harmil rakudo: say 3 + [+] ((2, 4...*).map: {($^i %% 4 ?? -1 !! 1) * 4/([*] (^3).map: *+$^i)})[^1000]
20:50 camelia rakudo-moar 027dd3: OUTPUT«3.14159265334054␤»
20:50 harmil That's better, I suppose.
20:52 Possum joined #perl6
20:52 yqt joined #perl6
20:59 nine bbkr: we've seen the same from JSON::RPC today. As that module also uses LWP::Simple, I guess it's the same bug. Definitely something wrong in rakudo.
21:00 harmil rakudo: say 3 + [+] ((2, 4...*).map: {($^i % 4 - 1) * 4/([*] (^3).map: *+$^i)})[^1000]
21:00 camelia rakudo-moar 027dd3: OUTPUT«3.14159265334054␤»
21:01 psch rakudo: say 3 + [+] ((2, 4...*).map: {($_ % 4 - 1) * 4/([*] (^3).map: * + $_)})[^1000] # all the simplification i can think of
21:01 camelia rakudo-moar 027dd3: OUTPUT«3.14159265334054␤»
21:01 psch just $_ instead of a placeholder
21:02 psch any further probably needs more math than i know
21:02 psch well, at least more math than i'm willing or able to do right now :P
21:03 psch but it does look like the formulaic part of that is pretty well established, so i don't think simplifying could actually help
21:03 rurban1 joined #perl6
21:04 harmil psch: I just hit Wikipedia :)
21:04 psch harmil: right, that's kinda my point :)
21:04 harmil Fair
21:05 harmil I'm dealing with folks who aren't thrilled with Perl-5isms, so perhaps:
21:05 harmil rakudo: say 3 + [+] ((2, 4...*).map: -> $i {($i % 4 - 1) * 4/($i*($i+1)*($i+2))})[^1000]
21:05 camelia rakudo-moar 027dd3: OUTPUT«3.14159265334054␤»
21:05 bbkr nine: this issue is caused by "try require". in this case in LWP::Simple there is "try require IO::Socket::SSL; ". if I load it in my Zonk.pm file explicitly earlier - "use IO::Socket::SSL; use LWP::Simple" then everything works
21:07 bbkr nine: so that is not an issue inside JSON::RPC.  And I'm not sure if I should hack it by adding "use IO::Socket::SSL" because that would add dependency from outside Star
21:10 MasterDuke joined #perl6
21:16 sortiz joined #perl6
21:17 sortiz \o #perl6
21:20 harmil sortiz: o/
21:28 grondilu joined #perl6
21:38 AlexDaniel joined #perl6
21:45 AlexDaniel bisect: say chr 9999999999999999999999
21:45 bisectable AlexDaniel: on both starting points the exit code is 1 and the output is identical as well
21:45 AlexDaniel bisect: good=2015.10 say chr 9999999999999999999999
21:45 bisectable AlexDaniel: exit code is 1 on both starting points, bisecting by using the output
21:45 bisectable AlexDaniel: (2015-12-23) https://github.com/rakudo/rakudo/commit/7f30326
21:48 AlexDaniel bisect: try { say chr 9999999999999999999999; CATCH { default { exit 1 if $_ ~~ /Cannot\sunbox/; exit 0 } } }
21:48 bisectable AlexDaniel: on both starting points the exit code is 1 and the output is identical as well
21:48 AlexDaniel bisect: good=2015.10 try { say chr 9999999999999999999999; CATCH { default { exit 1 if $_ ~~ /Cannot\sunbox/; exit 0 } } }
21:48 bisectable AlexDaniel: on both starting points the exit code is 1 and the output is identical as well
21:48 AlexDaniel meh :P
21:49 AlexDaniel bisect: good=2015.10 bad=7f30326^ try { say chr 9999999999999999999999; CATCH { default { exit 1 if $_ ~~ /Cannot\sunbox/; exit 0 } } }
21:49 bisectable AlexDaniel: on both starting points the exit code is 1 and the output is identical as well
21:49 AlexDaniel bisect: good=2015.10 bad=7f30326^ say chr 9999999999999999999999
21:49 bisectable AlexDaniel: on both starting points the exit code is 1 and the output is identical as well
21:49 AlexDaniel ok whatever, enough spam :)
21:51 jack_rabbit joined #perl6
22:14 zacts joined #perl6
22:18 adu joined #perl6
22:27 sammers hi all, is $?MODULE from inside a module (unit module...) supposed to return its name? I am getting "Variable '$?MODULE' is not declared"
22:27 sammers $?PACKAGE is an empty string
22:29 vendethiel joined #perl6
22:31 girafe joined #perl6
22:31 MasterDuke m: module A { say $?PACKAGE; }
22:31 camelia rakudo-moar 41b685: OUTPUT«(A)␤»
22:34 geekosaur m: unit module A; say $?PACKAGE;
22:34 camelia rakudo-moar 41b685: OUTPUT«(A)␤»
22:34 geekosaur m: unit module A; say $?MODULE;
22:34 camelia rakudo-moar 41b685: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$?MODULE' is not declared␤at <tmp>:1␤------> 3unit module A; say 7⏏5$?MODULE;␤»
22:37 sammers ok, thanks, when I do "unit module A; say $?PACKAGE;" I get an empty string.
22:38 sammers and $?MODULE is not declared
22:38 sammers 2016.06
22:38 sammers empty string for "module A { say $?PACKAGE; }" as well
22:40 dalek doc: 571cd63 | (Daniel Perrett)++ | doc/Language/typesystem.pod6:
22:40 dalek doc: Index enumerations in typesystem.pod per gh #87
22:40 dalek doc: review: https://github.com/perl6/doc/commit/571cd63278
22:40 dalek doc: 5f95e71 | (Daniel Perrett)++ | doc/Language/testing.pod6:
22:40 dalek doc: Index flunk per gh #677
22:40 dalek doc: review: https://github.com/perl6/doc/commit/5f95e71e40
22:40 dalek doc: 6a91d1b | (Daniel Perrett)++ | doc/Type/Callable.pod6:
22:40 dalek doc: Index o operator on callable per gh #512
22:40 dalek doc: review: https://github.com/perl6/doc/commit/6a91d1bfc0
22:40 dalek doc: d1340a0 | (Daniel Perrett)++ | doc/Language/variables.pod6:
22:40 dalek doc: Index slangs and compile-time variables, fixing gh #556
22:40 dalek doc: review: https://github.com/perl6/doc/commit/d1340a09bb
22:42 rgrinberg joined #perl6
22:45 bjz joined #perl6
22:45 ugexe perl6 -e 'say $*VM.version; module A { say $?PACKAGE; }'
22:45 ugexe v2016.06
22:45 ugexe (A)
22:47 aries_liuxueyang joined #perl6
22:53 xinming joined #perl6
22:59 sammers ok, so "unit module A; say $?PACKAGE;" works from the perl6 repl, or perl6 -e "unit module A; say $?PACKAGE;", but not from an actual module
22:59 sammers same for $?MODULE, it throws Variable '$?MODULE' is not declared
23:00 sammers when I try installing the module (panda --force install .)
23:01 cdg joined #perl6
23:02 cpage_ joined #perl6
23:06 z3ndrag0n joined #perl6
23:16 ugexe hmm, seems some recent list/map changes have caused a regression causing Base64 to return the correct decoded result save for characters at index 1 and 2 only
23:17 Sgeo__ joined #perl6
23:17 vibha joined #perl6
23:20 psch m: package Foo { our sub f { say $?PACKAGE } }; Foo::f
23:20 camelia rakudo-moar 41b685: OUTPUT«(Foo)␤»
23:20 psch sammers: that *might* be somehow precomp related.  nine++ recently pushed a fix, if it still happens on current HEAD, can you open an RT ticket?
23:21 araujo joined #perl6
23:21 araujo joined #perl6
23:21 psch sammers: alternatively, you could first check if it stops happening with 'no precompilation;'.  if so, it definitely needs a ticket
23:21 psch sammers: well, not "first", that check should also happen on current nom HEAD
23:21 sammers psch, thanks. I am testing now from a fresh 2016.06 install. $?PACKAGE now works, but $?MODULE explodes.
23:22 psch m: module Foo { sub f is export { say $?PACKAGE } }; import Foo; say $?PACKAGE
23:22 camelia rakudo-moar 41b685: OUTPUT«(GLOBAL)␤»
23:22 psch m: module Foo { sub f is export { say $?PACKAGE } }; import Foo; f
23:22 camelia rakudo-moar 41b685: OUTPUT«(Foo)␤»
23:22 zacts joined #perl6
23:22 psch sammers: 2016.06 won't have the fix, nine pushed it less than 4 hours ago
23:22 sammers ah
23:22 sammers pl
23:22 sammers ok
23:22 sammers gotcha, I will test now
23:22 psch m: module Foo { sub f is export { say $?MODULE } }; import Foo; f
23:22 camelia rakudo-moar 41b685: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$?MODULE' is not declared␤at <tmp>:1␤------> 3module Foo { sub f is export { say 7⏏5$?MODULE } }; import Foo; f␤»
23:23 psch ah, that's already it
23:23 sortiz sammers, I can't found $?MODULE in rakudo src, so I suspect is NYI
23:23 psch the variable itself doesn't happen
23:23 psch sortiz++ # what i'd have said next
23:23 sammers yeah
23:23 psch considering we have it doc'd already that definitely needs a ticket
23:23 sammers ok, I can create a ticket
23:23 psch ++sammers
23:28 Zoffix joined #perl6
23:38 sammers psch, first time creating a ticket, do I include [Bug] in the subject?
23:38 Xliff m: my $a = new Blob<00 00 00 01>; say $a.Int
23:38 camelia rakudo-moar 41b685: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax␤at <tmp>:1␤------> 3my $a = new Blob7⏏5<00 00 00 01>; say $a.Int␤»
23:38 Xliff m: my $a = Blob.new(<00 00 00 01>); say $a.Int
23:38 camelia rakudo-moar 41b685: OUTPUT«4␤»
23:39 Xliff m: my $a = Blob.new(<00 00 01 01>); say $a.Int
23:39 camelia rakudo-moar 41b685: OUTPUT«4␤»
23:39 Xliff m: my $a = Blob.new(<00 01 01 01>); say $a.Int
23:39 camelia rakudo-moar 41b685: OUTPUT«4␤»
23:39 Xliff m: use NativeCall; my $a = Blob.new(<00 00 00 01>); my int32 $b := $a; say $b
23:39 camelia rakudo-moar 41b685: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot bind to natively typed variable '$b'; use assignment instead␤at <tmp>:1␤------> 3ob.new(<00 00 00 01>); my int32 $b := $a7⏏5; say $b␤»
23:39 Xliff m: use NativeCall; my $a = Blob.new(<00 00 00 01>); my int32 $b = $a; say $b
23:39 camelia rakudo-moar 41b685: OUTPUT«This representation (VMArray) cannot unbox to a native int (for type Blob)␤  in block <unit> at <tmp> line 1␤␤»
23:40 Xliff m: use NativeCall; my $a = CArray[int32]Blob.new(<00 00 00 01>); my int32 $b = $a; say $b
23:40 camelia rakudo-moar 41b685: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3use NativeCall; my $a = CArray[int32]7⏏5Blob.new(<00 00 00 01>); my int32 $b = $␤    expecting any of:␤        infix␤        infix stopper␤        pos…»
23:41 Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<00 00 00 01>)); say $a;
23:41 camelia rakudo-moar 41b685: OUTPUT«16777216␤»
23:41 Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<00 00 00 00>)); say $a;
23:41 camelia rakudo-moar 41b685: OUTPUT«0␤»
23:41 Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<01 00 00 00>)); say $a;
23:41 camelia rakudo-moar 41b685: OUTPUT«1␤»
23:41 Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<01 01 00 00>)); say $a;
23:41 camelia rakudo-moar 41b685: OUTPUT«257␤»
23:41 Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<01 00 01 00>)); say $a;
23:41 camelia rakudo-moar 41b685: OUTPUT«65537␤»
23:41 Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<01 10 00 00>)); say $a;
23:41 camelia rakudo-moar 41b685: OUTPUT«2561␤»
23:42 Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<11 00 00 00>)); say $a;
23:42 camelia rakudo-moar 41b685: OUTPUT«11␤»
23:42 tbrowder left #perl6
23:44 wamba m: say sort 1 => 2, 2=> 3, 12=>1
23:44 camelia rakudo-moar 41b685: OUTPUT«(1 => 2 2 => 3 12 => 1)␤»
23:44 wamba say sort (1 => 2, 2=> 3, 12=>1).Hash
23:44 wamba m: say sort (1 => 2, 2=> 3, 12=>1).Hash
23:44 camelia rakudo-moar 41b685: OUTPUT«(1 => 2 12 => 1 2 => 3)␤»
23:44 wamba say sort (1 => 2, 2=> 3, 12=>1).Bag
23:44 wamba m: say sort (1 => 2, 2=> 3, 12=>1).Bag
23:44 camelia rakudo-moar 41b685: OUTPUT«(1 => 2 2 => 3 12 => 1)␤»
23:45 TimToady m: say sort :{1 => 2, 2=> 3, 12=>1}
23:45 camelia rakudo-moar 41b685: OUTPUT«(1 => 2 2 => 3 12 => 1)␤»
23:45 TimToady ^^^ object hash composer
23:46 TimToady though as you demonstrated, Bag works okay if your values are all integers :)
23:46 TimToady but that shows how coercers are different from composers
23:47 TimToady m: say bag(1 => 2, 2=> 3, 12=>1).perl
23:47 camelia rakudo-moar 41b685: OUTPUT«(1 => 2=>1,12 => 1=>1,2 => 3=>1).Bag␤»
23:47 ugexe jnthn: the multi-dispatch caching still causes regression on Base64. the initial commit made its failure random, but the latest fix causes it to always fail by losing the 2nd and 3rd character of a decoded string as well as segfault
23:47 TimToady m: say Bag(1 => 2, 2=> 3, 12=>1).perl
23:47 camelia rakudo-moar 41b685: OUTPUT«(12=>1,1=>2,2=>3).Bag␤»
23:49 wamba TimToady, thank you.
23:51 Xliff Why is it that method new() only takes named arguments?
23:52 Xliff I'm getting the following when I use "callwith" in method new(): Default constructor for 'Winamp::ML::Index' only takes named arguments
23:52 Zoffix left #perl6
23:52 Xliff Trying to define method new as a multi.
23:53 ugexe because the default constructor doesnt have named positionals declared?
23:53 bjz joined #perl6
23:53 Xliff So method new must use named parameters?
23:53 ugexe well positionals
23:53 TimToady only named args work well with polymorphism
23:53 Xliff *sigh*
23:53 TimToady especially under MI
23:54 Xliff MI?
23:54 Xliff Multi Inheritance?
23:54 TimToady multiple inheritance, which we support, vaguely
23:54 ugexe if it doesnt have a method new($xxx), then its arguments are the names of its attributes
23:54 Xliff OK. No MI
23:54 TimToady but we can't guarantee that any base class will not participate in future MI
23:54 Xliff ugexe: "multi method new(Str $fn)" and "multi method new(IO::Handle $fh)"
23:55 Xliff Str new method calls IO::Handle new method once file handle is opened.
23:55 TimToady you can have special purpose positional constructors, but they must translate to named if you wish to fall back on the underlying apparatus
23:55 Xliff Str method new uses callwith() to move things along
23:55 ugexe m: class Foo { multi method new($x) { say 1 }; multi method new ($x, $y) { say 2 }; }; Foo.new(1); Foo.new(1,2)
23:55 camelia rakudo-moar 41b685: OUTPUT«1␤2␤»
23:56 Xliff Hrm....
23:56 Xliff I'm using single parameters with different types.
23:56 ugexe i dont think thats your problem
23:56 Xliff So... named params it is.
23:57 Xliff Well, you aren't trying to use callwith() in your example.
23:57 Xliff m: class Foo { multi method new($x) { say 1 }; multi method new ($x, $y) { say 2 }; }; Foo.new(1); Foo.new(1,2)
23:57 camelia rakudo-moar 41b685: OUTPUT«1␤2␤»
23:58 Xliff ahh... but to assign attributes, I need a BUILD, don't I?
23:58 Xliff :S
23:58 ugexe m: class Foo { proto method new(|) {*}; multi method new($x) { nextwith($x,1) }; multi method new ($x, $y) { say 2 }; }; Foo.new(1); Foo.new(1,2)
23:58 camelia rakudo-moar 41b685: OUTPUT«2␤»
23:59 ugexe m: class Foo { proto method new(|) {*}; multi method new($x) { samewithwith($x,1) }; multi method new ($x, $y) { say 2 }; }; Foo.new(1); Foo.new(1,2)
23:59 camelia rakudo-moar 41b685: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    samewithwith used at line 1␤␤»
23:59 ugexe m: class Foo { proto method new(|) {*}; multi method new($x) { samewith($x,1) }; multi method new ($x, $y) { say 2 }; }; Foo.new(1); Foo.new(1,2)
23:59 camelia rakudo-moar 41b685: OUTPUT«2␤2␤»

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

Perl 6 | Reference Documentation | Rakudo