»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 lambd0x_ left 00:02 ParsonsNose joined 00:05 MasterDuke joined 00:08 yoleaux left 00:09 bartolin left, xnrand left 00:13 zengargoyle left 00:15 zengargoyle joined 00:16 xnrand joined, Gothmog_ joined 00:17 bartolin joined, canopus left
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
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
00:28 Zoffix left
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…»
gfldex m: subset NonEmpty of Str where * ne ''; sub foo(\s -->NonEmpty){ s }; say foo 'abc';
camelia rakudo-moar 234aa4: OUTPUT«abc␤»
gfldex that's the solution (nearly)
m: subset NonEmpty of Str where * ne ''; sub foo(\s -->NonEmpty){ Nil }; say foo 'abc';
camelia rakudo-moar 234aa4: OUTPUT«Nil␤»
gfldex nearly, because of the dreaded Nil 00:30
ShimmerFairy ...but didn't you just force Nil there?
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␤»
gfldex I did force Nil but I want it to blow up properly on Nil
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 ''
camelia rakudo-moar 234aa4: OUTPUT«Use of Nil in string context in block <unit> at <tmp> line 1␤True␤»
gfldex as soon as return spots a Nil it will skip the return type constraint entirely 00:33
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
Nil makes that very difficult 00:35
00:38 zacts joined
gfldex m: my &return = sub (|c){ fail('Nil') if c ~~ Nil }; # i'm that mad at Nil 00:41
camelia ( no output )
00:41 wamba left
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:05 AlexDaniel left 01:08 ocbtec left
dalek c: f2a741a | (Wenzel P. P. Peppmeyer)++ | doc/Language/functions.pod6:
MAIN needs to call exit to provide an exitcode != 0
01:11
01:11 kalkin- joined 01:12 nightfrog left 01:15 kalkin-_ left 01:24 nightfrog joined
gfldex m: sub MAIN(){ return 1 }; MAIN() # that should warn IMHO 01:25
camelia ( no output )
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␤»
gfldex :)
01:41 skids joined 01:42 Azry_ left
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:43
as an example of the failure see the last line of github.com/ugexe/Perl6-CompUnit--R...01-basic.t
01:45 Senj left, kurahaupo left 01:46 nic joined, nic is now known as nicq20 01:48 rindolf joined 01:49 molaf left
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? 01:52
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:00
02:01 molaf joined
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:02
02:04 noganex_ joined 02:05 yoleaux joined, ChanServ sets mode: +v yoleaux
MasterDuke it will pre-compile code, most usefully modules, into a bytecode format 02:05
but not a native binary like a C compiler does 02:06
02:08 noganex left
nicq20 Oh, ok. That makes sense. 02:08
02:14 nicq20 left 02:15 finanalyst joined 02:19 colomon left 02:21 colomon joined 02:32 kid51 left
sammers good morning from Japan 02:39
02:46 araujo left 02:47 araujo joined, araujo left, araujo joined
MasterDuke .tell timotimo github.com/MoarVM/MoarVM/pull/380 is a partial fix (i believe) 02:48
yoleaux MasterDuke: I'll pass your message to timotimo.
02:49 araujo left 02:50 araujo joined, araujo left, araujo joined 02:55 araujo left 02:56 araujo joined 03:02 zacts left 03:14 BenGoldberg joined 03:22 rgrinberg joined 03:30 rgrinberg left 03:51 gfldex left 04:00 vendethiel joined
sammers is there a way to set a base collection of paramaters that all multi subs will use? 04:02
04:04 aries_liuxueyang left
sammers for example, I want all multi sub foo() to use Str :$bar, Str $:baz, plus their custom params 04:04
so their signature will always include :$bar, :$baz, plus their unique params. 04:05
04:06 aries_liuxueyang joined
rindolf sammers: hi. 04:08
04:09 vendethiel left
sammers rindolf: hello 04:10
04:12 khw left 04:19 Senj joined
parabolize sammers: would this work? gist.github.com/parabolize/ada0e42...93c940bab1 04:36
04:37 ParsonsNose left, Senj left
sammers parabolize, thanks, I am actually looking to use this for MAIN 04:39
parabolize you could probably do something with a Capture 04:40
my $defaults = \(Str :$bar, Str :$baz)
sammers I want to create a few base params that are applicable to all multi MAINs
ok, I will take a look 04:41
parabolize sammers: nevermind my non-sense about Captures, proto is what you want 04:44
docs.perl6.org/language/functions#proto
Captures are the calling side not the receiving. XD 04:45
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
I guess something like a code object...
04:51 ssm joined 04:52 Cabanossi left 04:54 Cabanossi joined 05:01 skids left 05:08 wisti left 05:09 aries_liuxueyang left 05:10 aries_liuxueyang joined 05:11 dj_goku left 05:12 dj_goku joined 05:18 BenGoldberg left 05:28 firstdayonthejob joined 05:34 hankache joined 05:38 cgfbee joined 05:39 hankache left
Xliff .seen FROGGS 05:52
yoleaux I saw FROGGS 2 Jul 2016 10:32Z in #perl6: <FROGGS> o/
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.
sammers is there a way to detect when a value is passed to a sub that doesn't match a where {} test? 05:56
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:57
ShimmerFairy sammers: you would need a multi sub, where the other sub catches a failed 'where' test. 05:58
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
camelia rakudo-moar 234aa4: OUTPUT«4␤OOPS␤»
sammers hmm 06:02
06:06 jjido joined
sammers is there anyway to have the generated usage print out valid values for each signature paramater? without having to manually define usage. 06:07
06:13 rindolf left, Khisanth left
ShimmerFairy sammers: I'm not sure, I think you'd have to define your own USAGE to do that. 06:15
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:19
06:20 rindolf joined
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:20
sammers like sub foo($name, $age) { for %params.kv -> $param, $value { ... } } 06:21
yeah, there is @ARGS... hmm
06:21 jjido left 06:25 domidumont joined, domidumont left, domidumont joined
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 github.com/rakudo/rakudo/blob/nom/...ing.pm#L12 06:25
ugexe: oh, the Staging repo also demonstrates how to pass arbitrary parameters to the constructor through path-spec :) 06:26
06:27 kerframil left
nine ugexe: in case you wonder about the syntax: that mechanism has already existed (even before CompUnit::Repository). I merely discovered it. 06:27
06:27 CIAvash joined 06:30 domidumont left, domidumont joined 06:35 domidumont left 06:37 jjido joined 06:40 espadrine joined 06:41 jjido left
moritz \o 06:42
06:43 rurban joined
Xliff o/ 06:47
06:49 domidumont joined 06:51 domidumont left 06:52 domidumont joined
psch .tell gfldex defined and not empty for Str is the definition of .Bool 06:59
yoleaux psch: I'll pass your message to gfldex.
07:03 |Sno| left 07:04 Khisanth joined
lizmat clickbaits p6weekly.wordpress.com/2016/07/04/...er-starts/ 07:06
07:06 bjz joined 07:07 abraxxa joined 07:09 Khisanth left, bjz_ joined 07:11 darutoko joined, bjz left, bjz__ joined 07:14 bjz_ left
moritz lizmat++ 07:15
07:16 mattp_ joined 07:17 bjz__ left 07:18 mattp__ left 07:20 zakharyas joined 07:28 firstdayonthejob left 07:43 ssqq joined
ssqq hello, every one. 大家好! 07:45
07:46 ssqq left, dakkar joined 07:53 brrt joined 07:55 bpmedley joined 07:59 gfldex joined
gfldex . 08:00
yoleaux 06:59Z <psch> gfldex: defined and not empty for Str is the definition of .Bool
08:01 _mg_ joined 08:03 jonas2 joined 08:05 jack_rabbit joined 08:07 espadrine left, espadrine joined 08:08 Khisanth joined
timotimo . 08:11
yoleaux 02:48Z <MasterDuke> timotimo: github.com/MoarVM/MoarVM/pull/380 is a partial fix (i believe)
08:13 firstdayonthejob joined 08:14 Khisanth left 08:16 brrt left 08:18 |Sno| joined
timotimo thanks MasterDuke, it seems to have worked. here's the results: hack.p6c.org/~timo/coverage/ 08:27
08:28 wamba joined 08:34 brrt joined
mrplastic ZoffixMobile: thanks i'll stick with it a little bit 08:34
rindolf . 08:37
08:37 TEttinger left
rindolf No messages for me. :-( 08:37
08:39 vendethiel joined, Khisanth joined 08:40 zzzzzzzzz left, AlexDaniel joined 08:45 aries_liuxueyang left
gfldex .tell rindolf how are you doing mate? 08:45
yoleaux gfldex: I'll pass your message to rindolf.
gfldex there you go
rindolf .
yoleaux 08:45Z <gfldex> rindolf: how are you doing mate?
rindolf gfldex: I am currently doing Plasma 5 - not the Mate desktop. 08:46
08:46 ParsonsNose joined
rindolf gfldex: thanks for the message, though. 08:46
gfldex :)
08:47 aries_liuxueyang joined 08:48 RabidGravy joined
gfldex .tell lizmat i blogged about 1h to late, you may want to include it in the next weekly gfldex.wordpress.com/2016/07/05/2-2-3/ 08:50
yoleaux gfldex: I'll pass your message to lizmat.
RabidGravy boing 08:51
08:54 brrt left 08:55 jkramer left, mrplastic left 08:56 bjz joined 09:02 vendethiel left 09:04 cgfbee left, pmurias joined 09:07 cgfbee joined 09:09 zakharyas left, finanalyst left
moritz wow, the Icinga2 api is... creative. They kinda duplicate HTTP status codes in the payloads, but there they are floating points 09:10
ever got a 404.0? :-)
timotimo you mean a 4.04e2?
gfldex does 404.1 + 404.2 == 404.3 ?
moritz 2e0 * 202 :-) 09:11
09:11 zakharyas joined
RabidGravy Doesn't some MS IIS version do that too? 09:12
or didn't, so long since I've actually used it 09:13
09:15 espadrine left
ShimmerFairy moritz: but have they implemented ASTs like the latest version of PHP? :P 09:18
09:18 wamba left
moritz ShimmerFairy: tell me more about the PHP's ASTs :-) 09:19
moritz a fan of software gore
09:19 pmurias left, wamba joined
timotimo it could be not-that-bad 09:20
moritz you mean after they chose the backslash as package separator?
ShimmerFairy moritz: I can't find the release notes I remember coming across, but here's an RFC on it: wiki.php.net/rfc/abstract_syntax_tree 09:21
09:23 mrplastic joined
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! secure.php.net/releases/7_0_0.php
timotimo secure.php.net %)
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 domidumont left
ShimmerFairy I hope Bobby Tables lent an inspection to that subdomain. 09:25
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
moritz of course not 09:27
composability? nope
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
timotimo Str doesn't have anything to do with packages/namespaces :)
ShimmerFairy timotimo: it could if you want it to :P 09:29
timotimo i'm the language designer, of course
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:33
timotimo hehe 09:36
"happy 2016th birthday america! this is the year we leave the european union!" 09:37
09:42 mrplastic left 09:43 mrplastic joined 09:46 pmurias joined
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?
pmurias it has a bunch of compilers, the least optimizing one just emits machine code from the parser 09:51
timotimo OK
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
ShimmerFairy It probably says something that the _least_ optimizing compiler foregoes ASTs, though :) 09:53
pmurias ShimmerFairy: they do it to emit code as fast as possible 09:54
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 :) .
09:59 araujo left
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:02
10:06 cgfbee left 10:13 iH2O joined 10:15 kurahaupo joined 10:16 siriu5b joined, cgfbee joined
iH2O grrr 10:18
10:20 kurahaupo left
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:22 M-matthew left, M-Illandan left, tadzik left
gfldex m: sub s(){ CONTROL { say $_.^name }; return }; s; 10:23
camelia rakudo-moar 418810: OUTPUT«X::AdHoc␤»
gfldex m: sub s(){ CONTROL { put $_.Str }; return }; s;
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 labster left
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␤␤»
gfldex m: sub s(){ CONTROL { put $_.message }; return }; s;
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␤␤»
psch we probably need an equivalent for return there
gfldex m: sub s(){ CONTROL { put 'control' }; }; s; 10:25
camelia ( no output )
gfldex m: sub s(){ CONTROL { put 'control' }; return }; s;
camelia rakudo-moar 418810: OUTPUT«control␤»
gfldex m: sub s(){ CONTROL { put 'control' }; fail 'bye' }; s;
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, iH2O left
bpmedley Greetings, I'm not getting any output by running this code with the given nc command: gist.github.com/brianmed/b70a1b3fb...446e6fbd0e ... What am I doing wrong? 10:29
dalek c: f1f94c7 | (Wenzel P. P. Peppmeyer)++ | doc/Language/phasers.pod6:
tell what causes control exceptions
10:30
10:31 MafProd joined, MafProd is now known as Guest92074, Guest92074 left 10:34 MafProd joined, MafProd is now known as Guest39757, cognominal joined 10:35 Guest39757 left
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␤␤»
psch gfldex: redo, next, last, take, warn, proceed, succeed are all caught by CONTROL as well
10:36 cognominal left
psch m: say CX::.keys 10:37
camelia rakudo-moar 418810: OUTPUT«(Last Warn Succeed Proceed Redo Next Take)␤»
gfldex i will add that too
psch gfldex++
10:38 pmurias_ joined, cognominal joined 10:41 pmurias left
cognominal lizmat++ # weekly 10:42
10:44 Zoffix joined
dalek c: eed0fd1 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
doc return statement
10:45
Zoffix bpmedley, because you can't thread sockets like that. If you await that start, you'll see your Promise is being broken: gist.github.com/zoffixznet/c2f24df...ceb9ce05b9 10:46
bpmedley, maybe try out IO::Socket::Async? docs.perl6.org/type/IO::Socket::Async
bpmedley Zoffix: Thanks; is this page wrong? rosettacode.org/wiki/Echo_server#Perl
dalek c: 5eb3a51 | (Wenzel P. P. Peppmeyer)++ | doc/Language/phasers.pod6:
control exceptions are raised by many more things (psch++)
10:48
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 …»
Zoffix bpmedley, ¯\_(ツ)_/¯ It may be.
bpmedley Zoffix: Thanks for your help!
psch m: sub s { CONTROL { default { .perl.say } }; return }; s 10:51
camelia rakudo-moar 774e2d: OUTPUT«CX::Return.new␤»
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. rosettacode.org/wiki/Echo_server#Perl_6
yoleaux Zoffix: I'll pass your message to jnthn.
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␤␤»
psch m: sub f { A: CONTROL { default { .perl.say } }; last A }; f
camelia rakudo-moar 774e2d: OUTPUT«CX::Last.new␤»
10:52 jkramer joined
jkramer Ahoy once again! 10:52
Zoffix \o
psch o/
10:54 tadzik joined
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:54
Zoffix huh 10:55
jkramer Is there some keyword like "local" in P5 maybe?
psch m: sub f($a? is copy) { $a //= 10; say $a }; f 2
camelia rakudo-moar 774e2d: OUTPUT«2␤»
Zoffix jkramer, temp
10:55 vendethiel left
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
Zoffix you want is copy
psch worst case you copy nothing vOv
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?
Zoffix m: perl6.party/post/Perl-6-There-Are-T...t-1#iscopy
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␤»
Zoffix err
jkramer, ^
psch jkramer: by default its a containerless copy of the value of the argument
Zoffix m: my $meow = 72; sub (:$foo is rw) { $foo = 42 }($meow); say $meow
camelia rakudo-moar 774e2d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use 'is rw' on an optional parameter␤at <tmp>:1␤»
jkramer Ha, that's probably the best domain ever :D
Zoffix orly
jkramer, see the About page :P 10:57
hahainternet yeah it's pretty classy
Zoffix m: my $meow = 72; sub (:$foo is required is rw) { $foo = 42 }($meow); say $meow
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␤␤»
hahainternet Zoffix: show-off :)
Zoffix m: my $meow = 72; sub (:$foo is required is rw) { $foo = 42 }(:$meow); say $meow
camelia rakudo-moar 774e2d: OUTPUT«Required named parameter 'foo' not passed␤ in sub at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
jkramer Zoffix: Awesome :D
Zoffix m: my $meow = 72; sub (:$foo is required is rw) { $foo = 42 }(:foo($meow)); say $meow
camelia rakudo-moar 774e2d: OUTPUT«42␤»
Zoffix Seems to work
jkramer, BTW, things inside arrays and hashes are still mutable by default
m: my %hash = foo => 'bar'; sub (%h) { %h<foo> = 'meow' }(%hash); dd %hash 10:58
camelia rakudo-moar 774e2d: OUTPUT«Hash %hash = {:foo("meow")}␤»
hahainternet do you need the 'sub' syntax if you're immediately calling? are there no bare blocks in perl6?
oh, no that works 10:59
jkramer Alright, thanks for explaining!
Zoffix m: my %hash = foo => 'bar'; -> %h { %h<foo> = 'meow' }(%hash); dd %hash # there are
camelia rakudo-moar 774e2d: OUTPUT«Hash %hash = {:foo("meow")}␤»
Zoffix Just a habit
And you can't `return` from a block
11:01 pmurias_ left
dalek c: 7151835 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
doc return-rw
11:04
c: b7ade36 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod6:
link from fail to phasers
11:11 M-matthew joined, M-Illandan joined 11:18 mrplastic left 11:22 ParsonsNose left 11:26 brrt joined 11:28 heatsink left 11:37 wamba left 11:38 wamba joined 11:43 kid51 joined 12:01 brrt left 12:07 brrt joined
dalek doc: 30f81a5 | (Aleks-Daniel Jakimenko-Aleksejev)++ | WANTED: 12:10
doc: WANTED file is not needed anymore (#657)
doc:
doc: Here is the summary of all items in WANTED list (and reasons why we do not
doc: need to list them anymore):
12:10 dalek left
AlexDaniel whoops… 12:10
12:11 dalek joined, ChanServ sets mode: +v dalek 12:14 kaare_ joined 12:19 canopus left 12:24 brrt left 12:25 perlpilot joined, mrplastic joined 12:26 kurahaupo joined, canopus joined 12:33 mrplastic left, rgrinberg joined 12:35 kurahaupo left 12:49 cognominal left 12:56 kurahaupo joined, vendethiel joined, cognominal joined 13:03 brrt joined 13:04 sufrostico joined 13:08 brrt left
dalek line-Perl5: c58cbe6 | (Zoffix Znet)++ | README.md:
Use latest-stable perl in perlbrew instructions
13:10
line-Perl5: fb19e06 | lizmat++ | README.md:
Merge pull request #68 from zoffixznet/patch-1

Use latest-stable perl in perlbrew instructions
13:10 MafProd_ joined 13:14 ParsonsNose joined, rurban1 joined 13:15 kurahaupo left 13:17 rurban left 13:20 vendethiel left, Tushar_ joined
gfldex can i provide a URL on X<>? 13:20
13:21 donaldh joined
BrokenRobot Not at the momemnt, but it's a direly needed feature. 13:21
13:21 Tushar_ left
BrokenRobot Probably something added in Pod::To::HTML 13:21
moritz what would that do?
gfldex X<> would need to create a uniq id in <a/>
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
you can't jump down to the actual <a name="your-index-entry"> because there is no <a/>
moritz BrokenRobot: you mean something like latex's \ref? 13:23
gfldex yes
BrokenRobot I don't know anything about latex.
moritz but wouldn't that be a feature of L<...> instead?
I mean, X<...> are the anchors, not the links to the anchors
13:24 skids joined
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.
BrokenRobot So you can't contruct a link to that portion of the HTML document
gfldex that is not true, there is a <span name="not-so-uniq"/>
MafProd_ I tried on different distro's and keep getting the same error.
BrokenRobot MafProd_: someone else had that error too
nine gfldex: you don't need an <a/> for jumping within a document. Any element with an id is enough.
moritz BrokenRobot: right. But that means X<> must construct the anchor
BrokenRobot: and L<> the link to that anchor
gfldex <a> can have a name= that doesn't need to be uniq
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?
gfldex and we need uniq ids because they can collide with <a/>s provided by =head
nine gfldex: but a non-unique name is not as usefull for navigation, isn't it?
gfldex it's better then nothing
MafProd_ BrokenRobot, I was trying to install Task::star
13:26 mohae_ left, nowan left
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: github.com/tadzik/Task-Star/blob/m...TA.info#L5 13:26
MafProd_ BrokenRobot : I'll give that a try. Thnx. 13:27
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:28
BrokenRobot Are we actually paralleling a build of a single pod? 13:29
13:29 nowan joined
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
gfldex i will create a list of all X<> anchors to see how many dupes we actually got
we could also prefix the ids with your-file.pod-- to create uniqness 13:31
13:31 lizmat left
BrokenRobot gfldex: but they only need to be unique per file. 13:31
gfldex they may have to be uniq in the search.js . Not sure how that is actually created. 13:32
BrokenRobot If that's the case, that'd be search.js's problem, not Pod::To::HTML's 13:33
13:35 z3ndrag0n joined
nine FWIW I can reproduce JSON::RPC's test failure: Expected MAST::Frame, but didn't get one 13:36
BrokenRobot ditto
I'll file a ticket 13:37
13:39 rurban1 left 13:41 canopus left 13:43 canopus joined 13:44 rurban_ left
MafProd_ BrokenRobot: I am able to build the other modules from Task::Star without issues. Only the JSON::RPC fails during testing. 13:44
BrokenRobot How come the Issues tab is disabled for LWP::Simple? github.com/perl6/perl6-lwp-simple 13:45
It needs IO::Socket::SSL in the prereqs, since the tests fail without it
OR better, make those tests optional
13:46 _mg_ left, iH2O joined
timotimo i just turned it back on 13:47
13:48 jonas2 left 13:49 rurban joined, ParsonsNose left
BrokenRobot Filed: github.com/perl6/perl6-lwp-simple/issues/2 13:50
.tell stmuk This potentially blocks R*, as JSON::PRC is part of Task::Star: github.com/bbkr/jsonrpc/issues/28 13:52
yoleaux BrokenRobot: I'll pass your message to stmuk.
13:53 wisti joined
BrokenRobot
.oO( Why is JSON::RPC in Task::Star .... )
13:54
tadzik is it not in regular-star? 13:55
BrokenRobot What's regular-star?
tadzik rakudo star
the actual release, unlike the module that mimicss it
nine It is. But why?
Doesn't sound like a module that most or even many users will need. 13:56
tadzik it was probably considered usable and useful :)
I don't think Star ever really had a guideline of what's worthy and what's not
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.
BrokenRobot I was under the impression the actual release just ran panda install Task::Star :)
timotimo no, it ships the modules in a specific version
tadzik no, that's why they're out of sync :)
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
BrokenRobot I see.
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
BrokenRobot Sure. I guess my question should've been
tadzik since then I mostly rely on pull request and manual reports about things that change about Star modules
BrokenRobot
.oO( Why is JSON::RPC in R* .... )
tadzik :) 13:59
BrokenRobot :D
moritz because there isn't a real vision for *
ugexe like maybe `use lib "/x/y/x.tar.gz"`
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
moritz and in the beginning, we had so few modules that we just included whatever seemed working and somewhat usable 14:00
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 aries_liuxueyang left
BrokenRobot RakudoFAT: includes every ecosystem module that managed to successfully install when the release was cut :P 14:03
14:04 ptolemarch joined
timotimo Rallkudo? 14:04
BrokenRobot Includes LiveCD! :D
ugexe nine: only because the former worked first, so i kept prodding that
BrokenRobot Rakudall
14:04 aries_liuxueyang joined
nine ugexe: seems to me like it should look like this: use CompUnit::Repository::Tar; BEGIN CompUnit::RepositoryRegistry.use-repo(CompUnit::Repository::Tar.new(:prefix<zef.tgz>)); use Zef; 14:04
ugexe: or alternatively: use lib 'CompUnit::Repository::Tar#zef.tgz'; use Zef; 14:05
I'm just not sure if use lib already handles all the magic needed. Will have to check that.
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.
ugexe nine: i think those are what i really wanted 14:07
14:08 acrussell joined
dalek osystem: 3416c74 | Altai-man++ | META.list:
Test::NoTabs module
14:10
rl6-most-wanted: 20ab382 | Altai-man++ | most-wanted/modules.md:
Test::NoTabs was implemented
14:13
14:14 Ven_ joined, vendethiel joined 14:15 ParsonsNose joined
Ven_ m: my %h; for %h<foo>.list { .say; } # WAT? 14:15
camelia rakudo-moar d4ac15: OUTPUT«(Any)␤»
14:16 donaldh left
moritz Ven_: what did you expect? 14:16
14:16 mst joined
Ven_ moritz: I'd expect an empty list. and thus no loop iteration. 14:16
timotimo that's not how that works
m: my %h; for %h<foo bar>.list { .say
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␤»
timotimo m: my %h; for %h<foo bar>.list { .say }
camelia rakudo-moar d4ac15: OUTPUT«(Any)␤(Any)␤»
Ven_ because the non-nice thing is thing:
timotimo you'll always get a container that you can bind into 14:17
you want :exists
Ven_ nope
moritz the default value for accessing a non-existing hash element is Any, and Any.list is a one-element list containing Any
timotimo m: my %h; for %h<foo bar>.list { $_ = 5 }; say %h
camelia rakudo-moar d4ac15: OUTPUT«{bar => 5, foo => 5}␤»
Ven_ that part makes sense. however...
m: my %h; %h<a>.push: 1; %h<a>.push: 2; %h<a>.push: 2; say %h<a>.perl;
camelia rakudo-moar d4ac15: OUTPUT«$[1, 2, 2]␤»
Ven_ it's a scalar container. $[]. so, after that, I need to .list to remove the $
moritz m: my %h is default(Nil); .say for %h<foo>
camelia rakudo-moar d4ac15: OUTPUT«Nil␤»
moritz m: my %h is default(Empty); .say for %h<foo>
camelia ( no output )
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]␤»
Ven_ m: my %h; %h<a>.push: 1; %h<a>.push: 2; %h<a>.push: 2; for %h<a> { .say } # only one element, wut?
camelia rakudo-moar d4ac15: OUTPUT«[1 2 2]␤»
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
camelia rakudo-moar d4ac15: OUTPUT«1␤2␤2␤»
14:18 donaldh joined
Ven_ ^ that works. But if 'a' doesn't exist as a key, you'll get a loop iteration.. "for nothing" 14:18
(which, in my recursive case, means an infinite loop...) 14:19
14:19 ParsonsNose left
moritz Ven_: use "is default(Empty)" or "is default(())" on the hash declaration 14:20
we do have to the tools to bend the language to your will.
Ven_ oh, we have the tools. I'd rather not have to use them for such a simple thing, though..
iH2O i thought i was stable 14:21
it was stable
Ven_ my expectations of lists are still a bit wonky, maybe? I don't understand why %h<foo>.push: 3; creates a $[] still..
moritz: I can't even do that, it's read from another thing and passed with %()
if $tree<children> { for $tree<children> {} } it is ... :[
moritz for $tree<children> // () 14:22
Ven_ that won't work. $tree<children> is a $[]. I can't "for" it.
[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?
^ confusing to me
moritz for @($tree<children> // []) 14:23
yes, ugyl
Ven_ sorry for beating a how-so-dead horse at this point. but the solution feels a bit icky 14:25
14:26 donaldh left
moritz I do wonder if the scalar container can be avoided for .push autovivification 14:27
timotimo is default Slip? :P
moritz but then I guess you can't override the array anymore by assignment
14:27 z3ndrag0n left
timotimo mhm 14:28
14:28 mohae joined
Ven_ moritz: why not? 14:29
14:30 hjst left
Ven_ my @h; my %h; %h<a> = @h; @h<a>.push: 3; say @h<a>; # works? 14:30
m: my @h; my %h; %h<a> = @h; @h<a>.push: 3; say @h<a>; # works?
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␤␤»
Ven_ m: my @h; my %h; %h<a> = @h; %h<a>.push: 3; say %h<a>; # works?
camelia rakudo-moar d4ac15: OUTPUT«[3]␤»
14:30 finanalyst joined
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])}␤»
Ven_ :<
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
moritz m: my %h; %h<a> := [42]; say %h<a>
camelia rakudo-moar d4ac15: OUTPUT«[42]␤»
moritz m: my %h; %h<a> := [42]; %h<a> = 'blerg' 14:34
camelia ( no output )
moritz m: my %h; %h<a> := [42]; %h<a> = 'blerg'; say %h
camelia rakudo-moar d4ac15: OUTPUT«{a => [blerg]}␤»
moritz this seems to call the array's STORE method
Ven_ m: my %h; %h<a> := [42]; %h<a> = 'blerg'; say %h.perl
camelia rakudo-moar d4ac15: OUTPUT«{:a(["blerg"])}␤»
Ven_ I see..
it makes sense. we tell it "i have a container already, lemme do my things". 14:35
14:37 vendethiel left
iH2O how do u represent the Ven diagram in perl6? 14:39
*oops Venn
14:42 brabo joined 14:44 brabo left, bitmap left
Ven_ iH2O: I'm usually defined by Failure.new :) 14:46
14:47 donaldh joined 14:48 domidumont left
iH2O how many containers can a Venn diagram have? is that related to the 4-color theorem for coloring a map? 14:48
God know...
knows...
gregf_ is a container a symbol table or some kind of a resource pool? 14:49
Ven_ Ven knows.
14:49 Sgeo__ left
Ven_ gregf_: a symbol table? 14:49
14:49 domidumont joined, bitmap joined
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
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
not a symbol table, not a resource pool, just an plain old object 14:53
14:54 z3ndrag0n joined 14:55 rindolf left
gregf_ moritz: sure, but how does it map 2 sigils to the same datatype/struct 14:56
like so,
moritz gregf_: a container doesn't map any sigils to anything
14:56 vendethiel joined
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
oh
14:57 rindolf joined
gregf_ so a container is an object, so what does it contain or why is it called a container 14:57
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
15:00 huggable joined
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++
gregf_ nine: sure. and whats the life cycle of a container?
15:02 cdg joined
gregf_ would i be right in saying, the Garbage Collector cleans up containers? 15:02
im sorry for being so vague, *coming from a java/spring background and containers mean something quite different*
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
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.
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
gregf_ oh - ok. thats quite helpful 15:05
perlpilot gregf_: great! Now you write the docs to explain it to other people coming from java/spring ;-) 15:06
Ven_ :P
gregf_ i was like. there is a container based on datatypes and each of them have some sort of a pooling mechanism
heh
Ven_ no, it's very far from DI.
15:08 finanalyst left
gregf_ moritz: Ven_ nine perlpilot: ta 15:09
Ven_: symbol table is Perl5 land
Ven_ oh, you mean *x-like stuff?
I'm a Perl 5 noob :).
gregf_ well, Perl6 is a hybrid of Perl5 and Ruby *runs* 15:12
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
perlpilot (maybe I should say "Perl 6 is a hybrid of many good ideas from several languages including Perl 5" ;-) 15:15
iH2O you mean an "outgrowth of" given that perl6 refines those ideas 15:16
Ven_ It's probably a hybrid of many bad ideas as well. Let's find out :) 15:17
I wonder what kind of mistake I'll do next.
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.
iH2O perlpilot, u just said that genius is 95% effort and 5% inspiration 15:19
i disagree
i think thats the other way around
perlpilot I'm pretty sure I didn't just say that :)
15:20 vendethiel left
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
iH2O war's goal is to make things bad for the other side 15:21
Ven_ timotimo: we'll find out in time :P 15:24
timotimo yup 15:26
15:26 jack_rabbit left, maettu joined 15:28 pat_js joined 15:31 mr-foobar left 15:36 rurban_ joined 15:38 Ven_ left 15:43 mr-foobar joined
TimToady m: my %h; for %h<foo> :v { .say; } 15:52
camelia ( no output )
TimToady why didn't anyone suggest that to Ven_? 15:53
15:57 abraxxa left 16:02 pat_js left
BrokenRobot didn't know that one 16:02
TimToady admits it's not the most obvious feature of Perl 6... 16:03
m: my %h; for %h<foo> :k { .say; }
camelia ( no output )
TimToady works for keys too
16:04 araujo joined 16:05 araujo left
TimToady also admits he has no idea which of Ven's aliases to .tell :) 16:05
TimToady wonders if the bot should be smart enough to ignore tails... 16:06
timotimo TimToady: d'oh, i suggested :exists, but that's very obviously wrong 16:08
16:09 vendethiel joined 16:10 cdg left 16:11 setty1 joined
llfourn didn't know that one either 16:11
16:14 adu joined, lizmat joined 16:15 iH2O left 16:20 rurban_ left
TimToady m: my %h; for %h<foo> :v { .say; } 16:20
camelia ( no output )
TimToady vendethiel: ^^^
TimToady assumes Ven_ and vendethiel are still the same person :)
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* :-)
yoleaux 08:50Z <gfldex> lizmat: i blogged about 1h to late, you may want to include it in the next weekly gfldex.wordpress.com/2016/07/05/2-2-3/
dj_goku who is TimToady jk :D 16:24
lizmat dj_goku: aka Larry Wall 16:25
16:25 firstdayonthejob left
dj_goku hehe yeah! 16:25
16:28 donaldh left
BrokenRobot The real TimToady: s-media-cache-ak0.pinimg.com/236x/...b9f740.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.
perlpilot Damian doesn't do IRC, does he? 16:30
16:32 FROGGS joined, vendethiel left
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:34 rurban left
BrokenRobot notes that in ticket 16:35
16:38 setty1 left, firstdayonthejob joined 16:40 domidumont left 16:41 rgrinberg left, dakkar left
ilmari m: say ²² 16:47
camelia rakudo-moar d4ac15: OUTPUT«4␤»
ilmari uh... 16:48
m: say ²²²
camelia rakudo-moar d4ac15: OUTPUT«4194304␤»
ilmari m: say 2²² == ²²² 16:49
camelia rakudo-moar d4ac15: OUTPUT«True␤»
BrokenRobot There's a ticket for that already I believe
lizmat yeah
BrokenRobot The first superscript digit becomes the base, basically
m: say ²
camelia rakudo-moar d4ac15: OUTPUT«2␤»
ilmari BrokenRobot: yeah
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
m: /5 16:51
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␤␤»
ilmari m: * 3
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␤»
lizmat ilmari: there *is* agreement about that :-)
ilmari BrokenRobot: got a link?
BrokenRobot ilmari: 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
BrokenRobot m: "²".uniprop.say
camelia rakudo-moar d4ac15: OUTPUT«No␤»
BrokenRobot Aye
ilmari but why doesn't the whole string of superscript numbers become the number?
why isn't ²² == 22?
BrokenRobot ilmari: because it's a No, not an Nd 16:53
m: say ⑤
camelia rakudo-moar d4ac15: OUTPUT«5␤»
BrokenRobot m: say ⑤⑤
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…»
BrokenRobot And superscripts numbers are handled differently.
timotimo aye, they aren't decimal
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
m: say ⑤²²
camelia rakudo-moar d4ac15: OUTPUT«2384185791015625␤»
ilmari smells like overgeneralisation to me
BrokenRobot Basically ^ that, except with ² instead of ⑤
ilmari m: "⑤".uniprop.say
camelia rakudo-moar d4ac15: OUTPUT«No␤»
ilmari m: say ⑤⑤
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…»
TimToady to me it's just a DIHWIDT 16:55
BrokenRobot And this bugs out because there is no handlings for postfix ⑤ nums
timotimo yup
we can certainly make the parser a bit smarter about this situation 16:56
and give a more helpful error message
like "⑤ cannot be used as if it were decimals"
TimToady but why would anyone write that in the first place, other than fiddling around?
BrokenRobot Indeed.
TimToady I suppose one could get out of sync with term/infix
BrokenRobot "Doctor, It Hurts When I Do This" ? 16:57
TimToady S99: DIHWIDT
BrokenRobot Oh, "stop doing that"? D
ilmari the problem is that it doesn't hurt when you do ³², it's just silently wrong
TimToady which hurts :) 16:58
BrokenRobot Maybe worth putting in docs.perl6.org/language/glossary#DIHWIDT 'cause I went 'huh'?
ilmari: but what would be the "right"?
ilmari BrokenRobot: syntax error
BrokenRobot Alright. 16:59
timotimo mhh, force the user to add parens?
BrokenRobot m: say ³(²)
camelia rakudo-moar d4ac15: OUTPUT«No such method 'CALL-ME' for invocant of type 'Int'␤ in block <unit> at <tmp> line 1␤␤»
BrokenRobot How?
m: say (³)² 17:00
camelia rakudo-moar d4ac15: OUTPUT«9␤»
17:00 adu left
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
17:01 addison joined
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²²␤»
TimToady m: sub foo (*@a) { @a }; foo²² 17:02
camelia ( no output )
TimToady m: sub foo (*@a) { @a }; say foo²²
camelia rakudo-moar d4ac15: OUTPUT«0␤»
TimToady even there, it's always going to be taken as a ** 22
m: sub foo (*@a) { @a }; say foo ²² 17:03
camelia rakudo-moar d4ac15: OUTPUT«[4]␤»
TimToady I guess if someone writes that...
just not sure it's worth the bloat to catch the corner case of two useful features 17:04
17:06 lostinfog joined
TimToady otoh that's never stopped us before :) 17:07
17:09 zakharyas left
TimToady especially if we can make a pun on "raw power" or some such in the error message :) 17:10
17:10 zakharyas joined
TimToady Absolute power corrupts at line 42 17:11
Power outrage at line 42 17:12
17:13 adu joined, yqt joined
timotimo "this expression is only big enough for one power" 17:13
"put the other power behind bars"
TimToady "your power base is lacking" 17:14
"all your base are belong to nobody" 17:15
or maybe we should just assume they meant $_²² :D 17:16
timotimo oh, we weren't talking about ^2^3 vs ^23 any more?
TimToady m: say ²² 17:17
camelia rakudo-moar d4ac15: OUTPUT«4␤»
TimToady we're talking about that corner case
timotimo ah
17:17 vendethiel joined 17:18 |Sno| left
BrokenRobot dalek: help 17:18
dalek: source
17:19 addison left 17:22 domidumont joined 17:24 adu left 17:26 araujo joined 17:27 araujo left, araujo joined
mspo $_ or an error makes sense 17:28
17:29 kurahaupo joined, araujo left 17:30 jjido_ joined
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
17:30 araujo joined 17:31 finanalyst left
timotimo you can make that a slang 17:31
hahainternet oh sure, i just think it's inconsistent and ugly at the moment ;) 17:32
and i am useless at helping with anything that actually matters
BrokenRobot m: my \xₘ = 42; say xₘ 17:34
camelia rakudo-moar d4ac15: OUTPUT«42␤»
hahainternet see that is really beautiful, but there's loads of times i've used X_i1 and X_i2 etc
which is fine without the subscripts 17:35
so either we should disallow variables ending in a numeral, or permit subscripts, IMHO
TimToady m: say i².Num
camelia rakudo-moar d4ac15: OUTPUT«-1␤»
hahainternet but this is enough of a distraction, i will now shut up :)
BrokenRobot m: my \x₁ = 42
camelia rakudo-moar d4ac15: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Term definition requires an initializer␤at <tmp>:1␤------> 3my \x7⏏5₁ = 42␤»
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
TimToady m: say i⁸.Num 17:37
camelia rakudo-moar d4ac15: OUTPUT«1␤»
TimToady m: say i¹⁶.Num 17:38
camelia rakudo-moar d4ac15: OUTPUT«1␤»
TimToady m: say i²⁰.Num
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:39 vendethiel left
BrokenRobot m: say "₁".uniprop, sub ₛᵤᵇₛᶜᵣᵢₚₜₛ_ᶠₒᵣ_ʸₒᵤ {}.name 17:39
camelia rakudo-moar d4ac15: OUTPUT«Noₛᵤᵇₛᶜᵣᵢₚₜₛ_ᶠₒᵣ_ʸₒᵤ␤»
hahainternet BrokenRobot: ;-D
psch ETOOMANYBOXES 17:40
BrokenRobot psch: i.imgur.com/fe5KD04.png 17:41
Oh, I guess that's not the best, since I'm missing some chars in the terminal too :D
timotimo no uberi for you?
psch looks like what's boxes for me is just straight up missing in the screenshot? :)
m: .uniname.say for "ₛₛₚₜₛ".comb
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?
psch that's the boxes in order
[]ub[]cri[][][]
timotimo ah
BrokenRobot psch: i.imgur.com/P1RI5Gk.png
hahainternet also i.imgur.com/90a0ujb.png 17:43
psch would making it "subscripts_for_bcfy" have made an auto-pun?
hahainternet BrokenRobot: looks like you need to install https everywhere :)
psch or is that again just self-referential
i'm really bad at the difference
BrokenRobot hahainternet: why?
hahainternet BrokenRobot: that's a very large question 17:44
ultimately because it is better for your safety and security :)
BrokenRobot hahainternet: how?
I'm over SSH tunnel ATM
hahainternet BrokenRobot: it preferentially selects https as opposed to http versions of sites
SSH tunnel protects you only from your ISP, not anything upstream
proper SSL provides PFS 17:45
BrokenRobot Yeah, but I don't care about anything upstream
What.. they'll watch my IRC logs! :)
hahainternet https everywhere doesn't work with irc anyway :D
BrokenRobot Or my images... That i'm pretty sure I totally public anyway :)
hahainternet or your session cookies? 17:46
mitm is a genuine risk
but i take your point
BrokenRobot All for the low-low price of getting broken websites on occasion :)
hahainternet i find it amusing when i find a broken site thanks to https
BrokenRobot Do you got HTTPS Everywhere?
hahainternet the EFF one yes
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
hahainternet haha is it? i haven't checked
BrokenRobot I guess a giant red warning about untrusted things when I visit 17:48
s/guess/get/; ~_~
hahainternet heh yeah invalid CN 17:49
17:49 vendethiel joined
hahainternet This server could not prove that it is rakudo.org; its security certificate is from host.pmichaud.com 17:49
let's encrypt is free now, no excuses for this :)
vendethiel TimToady: we either never were, or still are :-). also, that sounds awesome
BrokenRobot let's encrypt is not free.
The cost is the time spent learning how to use it and how to set it up. 17:50
and setting it up
hahainternet somewhat, but it's SSL
it's not that different
the req script is a little odd, but it lets them automate things which is understandable
vendethiel the docs say:
> If you don't want to skip nonexistent elements, use the negated form:
(docs*) should it clarify that it's the default? 17:51
TimToady note the double negative there
vendethiel isn't :!v the default?
17:51 MafProd_ is now known as MafProd
TimToady yes, I suppose that could be made more explicit 17:52
vendethiel ah, okay. I thought I was still very confused %).
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⏏053; %h<foo>.push:4; %h<foo>.push:5; for %␤ expecting any of:␤ colon pair␤»
TimToady those semantics are the default, but not implemented by actually using :!v, just by leaving out :v
17:53 jjido_ left
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␤»
vendethiel TimToady++
timotimo it's important to be able to use :!v because you could be using something like :v($shouldskip) 17:54
and you don't want to use interpolation if you don't haev to
vendethiel TimToady: I gather they are, but.. oh timotimo++ clarified
timotimo for performance reasons mostly, but also because it's a little bit wordy
vendethiel he's too fast!
TimToady mostly, the default semantics of subscripting are driven by the idea of not throwing away positional information that might be important 17:55
17:55 zakharyas left
TimToady same reason we distinguish Nil from Empty these days 17:55
vendethiel that seems fair :). 17:56
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:57 yqt left
perlpilot vendethiel++ 17:58
18:00 jjido_ joined
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;␤»
DrForr Hrm, that must've been fixed recently.
18:03 MasterDuke left, pullphinger joined
DrForr Well, guess I get to test my futureproofing this time 'round. 18:04
18:06 rgrinberg joined 18:07 cdg joined 18:11 jjido_ left 18:13 adu joined 18:18 Actualeyes left 18:19 TimToady left 18:20 adu left, TimToady joined 18:22 vendethiel left 18:24 domidumont left, donaldh joined 18:29 donaldh left 18:30 acrussell left
buharin hi 18:33
I am looking for Perl friends
perlpilot buharin: you are in the right place :)
18:33 dj_goku left
buharin perlpilot, ya but I want some friend to do things together 18:34
18:34 vendethiel joined
perlpilot buharin: you're looking to pair-program with someone? On what? 18:35
DrForr Well, what are you interested in?
timotimo he's said he does perl5, so ... maybe not the right place after all?
buharin :( 18:36
18:36 dj_goku joined
buharin I like this channel more 18:36
more good people here
18:37 spider-mario joined
DrForr buharin: Again, what are you interested in? 18:37
buharin Container Engine
DrForr There's already Docker and a few variants on that, is that what you mean? 18:39
buharin DrForr, no I want to write my own 18:40
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:42
perlpilot DrForr++ well said. I was trying to think of a good way to say just that :) 18:43
buharin oh you said
DrForr Do you have an angle that nobody's considered? 18:44
buharin Chef and Puppet
I didn't know these
moritz that's a bit of a category error
Chef and Puppet are configuration management systems
buharin I don't like Docker
moritz not a container engine, like Docker, LXC or Rocket
buharin overtime when I do something with it 18:45
DrForr Yeah, those aren't container systems, I couldn't think of other systems.
moritz or BSD Jails
buharin it is overcomplicated
moritz or Solaris zones
perlpilot buharin: still ... you're in a saturated problem-space.
buharin: If you had a hook that appeals to someone, you might find some help.
buharin yeah 18:46
18:48 sno joined
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:48
That's what I've had to do to maintain sanity while my junior teammates break everything around me. 18:49
perlpilot DrForr: you've been rewriting everything in Perl 6?!? awesome! :) 18:50
buharin hey please add this tryperl.pl/index.html
on the main perl site
as help for newbies
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.
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
today I was trying to run builedbot slave in docker
docker ps docker image ..... and get bored while trying to constrain it for work 18:53
DrForr Damnit. again, I want a macro here. Must resist urge to yakshave... 18:54
timotimo perlpilot: "kinda old" LOL
18:56 telex left
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:57
18:58 telex joined 19:00 huggable left
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␤»
psch DrForr: ^^^ that's what i'd call the degenerate case you mentioned 19:02
s/call/use for/
DrForr: with specific conditions it probably is clearly just to if/elsif/else
DrForr Yah. Not quite what I'm shooting for but it's got the germ of an idea. 19:03
And yea, it's structured like an if-then-else, there's just too much code for the conditional for my taste is all.
psch s/clearly/clearer/ # damnit keyboard /o\
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"?
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
BrokenRobot buharin: RE perl friends. Have you tried a local Mongers group? www.pm.org/groups/poland.html 19:18
dalek c: f201414 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod6:
Added docs for Cool.fmt
buharin there no perl group in my city 19:19
:/
19:19 hanekomu joined
DrForr Try to start one? 19:19
buharin sure I can try 19:20
have you any experience what can I talk about on the first meeting? 19:21
19:22 dfcarpenterak joined
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:22
19:22 AlexDaniel left
buharin Perl love 19:23
19:24 donaldh joined, jjido_ joined
BrokenRobot Or try some "general programming" type of group. 19:28
19:29 donaldh left, sufrostico left 19:33 mr-foobar left 19:35 mr-foobar joined 19:36 ssotka joined, darutoko left
dogbert17 This list from the docs.perl6.org/type/Cool can't be entirely correct can it? 19:37
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
timotimo that makes sense 19:38
psch looks correct from here
i mean, a few of those aren't exactly below Any
dogbert17 So Backtrace inherits from Cool
psch m: say Backtrace ~~ Cool
camelia rakudo-moar b8bc1b: OUTPUT«False␤»
psch m: say Backtrace.^mor
camelia rakudo-moar b8bc1b: OUTPUT«Method 'mor' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤ in block <unit> at <tmp> line 1␤␤»
psch m: say Backtrace.^mro
camelia rakudo-moar b8bc1b: OUTPUT«((Backtrace) (Any) (Mu))␤»
psch i overlooked that, apparently :< 19:39
dogbert17 If I want to fix the list is ^mro they way to check the types?
m: say Bag.^mro
camelia rakudo-moar b8bc1b: OUTPUT«((Bag) (Any) (Mu))␤»
timotimo that's one way at least
dogbert17 So at the very least, Bag and Backtrace should go -- 19:40
timotimo sounds good
dogbert17 I'm on it :)
19:41 jjido_ left
psch dogbert17++ 19:42
dogbert17 m: say Baggy.^mro # can a role inherit from Cool?
camelia rakudo-moar b8bc1b: OUTPUT«Method 'mro' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤ in block <unit> at <tmp> line 1␤␤»
psch m: say Baggy.new.^mro
camelia rakudo-moar b8bc1b: OUTPUT«((Baggy) (Any) (Mu))␤»
dogbert17 psch++ 19:43
psch gotta pun first :)
19:47 jjido joined 19:48 dfcarpenterak left 19:49 addison joined
dalek c: b633fa9 | (Jan-Olof Hendig)++ | doc/Type/Cool.pod6:
Fixed list of types inheriting from Cool. timotimo++ psch++
19:50
19:52 jjido left 19:57 rindolf left 19:59 freezerburnv joined 20:02 hankache joined
hankache good evening #perl6 20:02
20:04 rindolf joined
dalek c: 5a63611 | (Jan-Olof Hendig)++ | doc/Type/List.pod6:
Added docs for List.fmt
20:12
timotimo hello hankache 20:17
hankache hi timotimo
20:17 ZoffixMobile joined
ZoffixMobile TIL RT is actually MUCH better on mobile! 20:18
This may be the mobile URL that works on desktops: rt.perl.org/m/
well... almost... the only part that doesn't suck on normal version--viewing ticket content--is backwards.... literally: m.imgur.com/1XE5MvR And it's hard to tell but it seems some content is missing too. 20:21
20:23 FROGGS left, bbkr joined 20:25 jjido joined, skids left 20:27 jjido left
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
20:27 TEttinger joined
geekosaur backwards actually makes sense in a mobile context where you often care more about the most recent entries 20:27
so they should be at the top
rather than forcing you to scroll 20:28
20:34 lizmat left
ZoffixMobile That assumes you already read the content recently and remember what it's about. 20:35
20:35 ZoffixMobile left 20:38 rurban joined 20:39 setty2 joined 20:44 Zoffix left 20:46 harmil joined, Possum left 20:47 Possum joined
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
20:48 kid511 joined, Possum left
harmil rakudo: say [+] ((2, 4...*).map: {($^i %% 4 ?? -1 !! 1) * 4/([*] (^3).map: *+$^i)})[^1000] 20:49
camelia rakudo-moar 027dd3: OUTPUT«0.141592653340542␤»
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 kid51 left
harmil That's better, I suppose. 20:50
20:52 Possum joined, yqt joined 20:57 hankache left
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. 20:59
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 CIAvash left
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␤»
psch just $_ instead of a placeholder
any further probably needs more math than i know 21:02
well, at least more math than i'm willing or able to do right now :P
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
21:03 freezerburnv left, rurban1 joined
harmil psch: I just hit Wikipedia :) 21:04
psch harmil: right, that's kinda my point :)
harmil Fair
21:04 pullphinger left
harmil I'm dealing with folks who aren't thrilled with Perl-5isms, so perhaps: 21:05
rakudo: say 3 + [+] ((2, 4...*).map: -> $i {($i % 4 - 1) * 4/($i*($i+1)*($i+2))})[^1000]
camelia rakudo-moar 027dd3: OUTPUT«3.14159265334054␤»
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:06 rurban left
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:07
21:10 MasterDuke joined 21:13 rurban1 left 21:16 sortiz joined
sortiz \o #perl6 21:17
harmil sortiz: o/ 21:21
21:28 grondilu joined 21:36 rgrinberg left 21:38 AlexDaniel joined 21:43 ptolemarch left
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
AlexDaniel bisect: good=2015.10 say chr 9999999999999999999999
bisectable AlexDaniel: exit code is 1 on both starting points, bisecting by using the output
AlexDaniel: (2015-12-23) github.com/rakudo/rakudo/commit/7f30326
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
AlexDaniel bisect: good=2015.10 try { say chr 9999999999999999999999; CATCH { default { exit 1 if $_ ~~ /Cannot\sunbox/; exit 0 } } }
bisectable AlexDaniel: on both starting points the exit code is 1 and the output is identical as well
AlexDaniel meh :P
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
AlexDaniel bisect: good=2015.10 bad=7f30326^ say chr 9999999999999999999999
bisectable AlexDaniel: on both starting points the exit code is 1 and the output is identical as well
AlexDaniel ok whatever, enough spam :)
21:50 mr-foobar left 21:51 jack_rabbit joined 21:54 buharin left 21:55 kaare_ left 21:58 vendethiel left 22:01 setty2 left 22:10 lostinfog left 22:12 RabidGravy left 22:14 zacts joined 22:18 adu joined 22:22 firstdayonthejob left
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
$?PACKAGE is an empty string
22:29 vendethiel joined 22:31 girafe joined
MasterDuke m: module A { say $?PACKAGE; } 22:31
camelia rakudo-moar 41b685: OUTPUT«(A)␤»
geekosaur m: unit module A; say $?PACKAGE; 22:34
camelia rakudo-moar 41b685: OUTPUT«(A)␤»
geekosaur m: unit module A; say $?MODULE;
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;␤»
sammers ok, thanks, when I do "unit module A; say $?PACKAGE;" I get an empty string. 22:37
and $?MODULE is not declared 22:38
2016.06
empty string for "module A { say $?PACKAGE; }" as well
22:39 aries_liuxueyang left 22:40 rindolf left, bjz left
dalek c: 571cd63 | (Daniel Perrett)++ | doc/Language/typesystem.pod6:
Index enumerations in typesystem.pod per gh #87
22:40
c: 5f95e71 | (Daniel Perrett)++ | doc/Language/testing.pod6:
Index flunk per gh #677
c: 6a91d1b | (Daniel Perrett)++ | doc/Type/Callable.pod6:
Index o operator on callable per gh #512
c: d1340a0 | (Daniel Perrett)++ | doc/Language/variables.pod6:
Index slangs and compile-time variables, fixing gh #556
22:40 cpage_ left, zacts left 22:42 rgrinberg joined 22:45 bjz joined
ugexe perl6 -e 'say $*VM.version; module A { say $?PACKAGE; }' 22:45
v2016.06
(A)
22:47 aries_liuxueyang joined 22:52 vendethiel left, z3ndrag0n left, xinming_ left 22:53 xinming joined
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
same for $?MODULE, it throws Variable '$?MODULE' is not declared
when I try installing the module (panda --force install .) 23:00
23:01 cdg left, cdg joined 23:02 cpage_ joined 23:05 adu left 23:06 cdg left, z3ndrag0n joined 23:07 spider-mario left
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:16
23:17 Sgeo__ joined, vibha joined 23:19 araujo left, cpage_ left
psch m: package Foo { our sub f { say $?PACKAGE } }; Foo::f 23:20
camelia rakudo-moar 41b685: OUTPUT«(Foo)␤»
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, araujo left, araujo joined
psch sammers: alternatively, you could first check if it stops happening with 'no precompilation;'. if so, it definitely needs a ticket 23:21
sammers: well, not "first", that check should also happen on current nom HEAD
sammers psch, thanks. I am testing now from a fresh 2016.06 install. $?PACKAGE now works, but $?MODULE explodes.
psch m: module Foo { sub f is export { say $?PACKAGE } }; import Foo; say $?PACKAGE 23:22
camelia rakudo-moar 41b685: OUTPUT«(GLOBAL)␤»
psch m: module Foo { sub f is export { say $?PACKAGE } }; import Foo; f
camelia rakudo-moar 41b685: OUTPUT«(Foo)␤»
23:22 zacts joined
psch sammers: 2016.06 won't have the fix, nine pushed it less than 4 hours ago 23:22
sammers ah
pl
ok
gotcha, I will test now
psch m: module Foo { sub f is export { say $?MODULE } }; import Foo; f 23:23
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␤»
psch ah, that's already it
sortiz sammers, I can't found $?MODULE in rakudo src, so I suspect is NYI
23:23 grondilu left
psch the variable itself doesn't happen 23:23
sortiz++ # what i'd have said next
sammers yeah
psch considering we have it doc'd already that definitely needs a ticket
sammers ok, I can create a ticket
psch ++sammers
23:28 Zoffix joined
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
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␤»
Xliff m: my $a = Blob.new(<00 00 00 01>); say $a.Int
camelia rakudo-moar 41b685: OUTPUT«4␤»
Xliff m: my $a = Blob.new(<00 00 01 01>); say $a.Int 23:39
camelia rakudo-moar 41b685: OUTPUT«4␤»
Xliff m: my $a = Blob.new(<00 01 01 01>); say $a.Int
camelia rakudo-moar 41b685: OUTPUT«4␤»
Xliff m: use NativeCall; my $a = Blob.new(<00 00 00 01>); my int32 $b := $a; say $b
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␤»
Xliff m: use NativeCall; my $a = Blob.new(<00 00 00 01>); my int32 $b = $a; say $b
camelia rakudo-moar 41b685: OUTPUT«This representation (VMArray) cannot unbox to a native int (for type Blob)␤ in block <unit> at <tmp> line 1␤␤»
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…»
Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<00 00 00 01>)); say $a; 23:41
camelia rakudo-moar 41b685: OUTPUT«16777216␤»
Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<00 00 00 00>)); say $a;
camelia rakudo-moar 41b685: OUTPUT«0␤»
Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<01 00 00 00>)); say $a;
camelia rakudo-moar 41b685: OUTPUT«1␤»
Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<01 01 00 00>)); say $a;
camelia rakudo-moar 41b685: OUTPUT«257␤»
Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<01 00 01 00>)); say $a;
camelia rakudo-moar 41b685: OUTPUT«65537␤»
Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<01 10 00 00>)); say $a; 23:42
camelia rakudo-moar 41b685: OUTPUT«2561␤»
Xliff m: use NativeCall; my $a = nativecast(int32, Blob.new(<11 00 00 00>)); say $a;
camelia rakudo-moar 41b685: OUTPUT«11␤»
23:42 tbrowder left
wamba m: say sort 1 => 2, 2=> 3, 12=>1 23:44
camelia rakudo-moar 41b685: OUTPUT«(1 => 2 2 => 3 12 => 1)␤»
wamba say sort (1 => 2, 2=> 3, 12=>1).Hash
m: say sort (1 => 2, 2=> 3, 12=>1).Hash
camelia rakudo-moar 41b685: OUTPUT«(1 => 2 12 => 1 2 => 3)␤»
wamba say sort (1 => 2, 2=> 3, 12=>1).Bag
m: say sort (1 => 2, 2=> 3, 12=>1).Bag
camelia rakudo-moar 41b685: OUTPUT«(1 => 2 2 => 3 12 => 1)␤»
TimToady m: say sort :{1 => 2, 2=> 3, 12=>1} 23:45
camelia rakudo-moar 41b685: OUTPUT«(1 => 2 2 => 3 12 => 1)␤»
TimToady ^^^ object hash composer
though as you demonstrated, Bag works okay if your values are all integers :) 23:46
but that shows how coercers are different from composers
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␤»
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
TimToady m: say Bag(1 => 2, 2=> 3, 12=>1).perl
camelia rakudo-moar 41b685: OUTPUT«(12=>1,1=>2,2=>3).Bag␤»
23:48 girafe left
wamba TimToady, thank you. 23:49
23:51 bjz left
Xliff Why is it that method new() only takes named arguments? 23:51
I'm getting the following when I use "callwith" in method new(): Default constructor for 'Winamp::ML::Index' only takes named arguments 23:52
23:52 Zoffix left
Xliff Trying to define method new as a multi. 23:52
ugexe because the default constructor doesnt have named positionals declared? 23:53
23:53 bjz joined
Xliff So method new must use named parameters? 23:53
ugexe well positionals
TimToady only named args work well with polymorphism
Xliff *sigh*
TimToady especially under MI
Xliff MI? 23:54
Multi Inheritance?
TimToady multiple inheritance, which we support, vaguely
ugexe if it doesnt have a method new($xxx), then its arguments are the names of its attributes
Xliff OK. No MI
TimToady but we can't guarantee that any base class will not participate in future MI
Xliff ugexe: "multi method new(Str $fn)" and "multi method new(IO::Handle $fh)"
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
Xliff Str method new uses callwith() to move things along
ugexe m: class Foo { multi method new($x) { say 1 }; multi method new ($x, $y) { say 2 }; }; Foo.new(1); Foo.new(1,2)
camelia rakudo-moar 41b685: OUTPUT«1␤2␤»
Xliff Hrm.... 23:56
I'm using single parameters with different types.
ugexe i dont think thats your problem
Xliff So... named params it is.
Well, you aren't trying to use callwith() in your example. 23:57
m: class Foo { multi method new($x) { say 1 }; multi method new ($x, $y) { say 2 }; }; Foo.new(1); Foo.new(1,2)
camelia rakudo-moar 41b685: OUTPUT«1␤2␤»
Xliff ahh... but to assign attributes, I need a BUILD, don't I? 23:58
:S
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)
camelia rakudo-moar 41b685: OUTPUT«2␤»
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␤␤»
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)
camelia rakudo-moar 41b685: OUTPUT«2␤2␤»