»ö« 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:01 pyrimidine joined 00:02 llfourn joined, cpage_ joined
IOninja so quiet... 00:06
IOninja blasts www.youtube.com/watch?v=09U69zGLXwE full volume
🤘🤘🤘
00:10 pyrimidine left 00:11 b2gills left 00:14 lukaramu_ left 00:24 risou_awy is now known as risou 00:26 b2gills joined 00:36 cibs left
IOninja m: say (^3, [^3])».Numeric 00:37
camelia ((0 1 2) [0 1 2])
IOninja burnt myself a bit.
m: say (^3, [^3]).map: *.Numeric
camelia (3 3)
00:38 cibs joined
IOninja Kinda want some sort of non-nodal, non-autothreaded, single-char version of .map: *.some-method 00:38
say (^3, [^3])⏩.Numeric 00:39
say (^3, [^3])⤏.Numeric 00:40
00:41 ChoHag left 00:42 risou is now known as risou_awy 00:43 wamba joined 00:50 gk_-1wm_- joined, gk_-1wm_- left 00:51 bjz joined
IOninja m: sub postfix:<♥> (\a) { class :: { BEGIN { for Any.^methods(:all)».name.grep( * ne any <ACCEPTS new bless BUILDALL> ) -> $name { ::?CLASS.^add_method: $name, method (|c) { ::?CLASS.FALLBACK: $name, |c } } }; method FALLBACK ($m, |c) { a.map: { ."$m"(|c) }; } }.new }; say (^3, [^3])♥.Numeric 00:51
camelia (3 3)
IOninja packs this up into a module 00:52
gonna call it "M" 00:53
1-letter "Map" <=> 1-char .map
00:55 cdg left
IOninja is it somehow possible to add a sub that would be visible everywhere? 00:58
Like, I'd alias `perl6` to `perl6 -MM` and it'd always load my module with the above sub and it'd just be available everywhere in the code?
01:02 aborazmeh joined, aborazmeh left, aborazmeh joined
ugexe i've wanted something like that, but one step further - perl6 -Me 'use MONKEY-TYPING; #`do bad things`' 01:04
perl6 -Me 'use MONKEY-TYPING; #`do bad things`' script.pl6
01:08 bjz_ joined 01:10 bjz left
IOninja m: use nqp; QAST::Block.new 01:12
camelia Could not find symbol '&Block'
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
IOninja We can't use QAST stuff in userspace at all? 01:13
llfourn you have to do the use differently...one sec
use QAST:from<NQP>; 01:14
IOninja m: use QAST:from<NQP>; say QAST::Block.new.^name
camelia QAST::Block
IOninja llfourn++ thanks
llfourn :)
01:14 dj_goku left 01:25 pyrimidine joined
IOninja Well, I guess it is possible to add a sub to CORE::, since $*W is available in BEGIN 01:29
01:30 pyrimidine left
IOninja m: use nqp; use QAST:from<NQP>; BEGIN nqp::atpos($*W.cur_lexpad, 0).push: QAST::Op.new( :op('bind'), QAST::Var.new( :name('$x'), :scope('lexical'), :decl('var') ), QAST::IVal.new( :value(0) ) ); say $x 01:48
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$x' is not declared
at <tmp>:1
------> 3) ), QAST::IVal.new( :value(0) ) ); say 7⏏5$x
IOninja *sigh*
IOninja gives up for now
01:49 ZzZombo_ joined, ZzZombo is now known as Guest16972, ZzZombo_ left, ZzZombo_ joined, ZzZombo_ is now known as ZzZombo 01:52 Guest16972 left 01:53 dj_goku joined 01:56 aborazmeh left 01:58 aborazmeh joined, aborazmeh left, aborazmeh joined 01:59 dj_goku left 02:00 bjz_ left, mcmillhj joined 02:04 bjz joined 02:05 mcmillhj left 02:13 imcsk8_ joined, bjz left, imcsk8 left 02:14 gk_-1wm joined 02:22 cdg joined 02:25 risou_awy is now known as risou 02:30 gk_-1wm left 02:34 bjz joined 02:36 kurahaupo_ left 02:37 aborazmeh left 02:38 wamba left 02:40 todd joined
todd Hi All, I have been looking at perl6maven.com/introduction-to-perl...ast-arrays 02:40
IOninja \o 02:41
todd seems to me that I am quoting the guy. What is wrong with
IOninja Are you Todd?
todd Yes, I am Todd. Also known as "His Resplendances", but yo can call me "T" for short. 02:42
perl6 -e 'my @x = ('abc', 'def'); say @x;'
===SORRY!=== Error while compiling -e Undeclared routines: abc used at line 1. Did you mean 'abs'? def used at line 1
IOninja todd: shell quoting
todd which means?
Oh I get it 02:43
timotimo you're sending my @x = (abc, def); say @x; to perl6 as code
because ' belongs to the shell
02:43 risou is now known as risou_awy
IOninja perl6 -e 'my @x = (‘abc’, ‘def’); say @x;' 02:43
todd perl6 -e "my @x = ('abc', 'def'); say @x;"
02:43 gk-------1__w__m joined, gk-------1__w__m left
todd fixes it 02:43
IOninja Unless you're on Windows, your milage with that will vary
by which I mean it'll often be zero :) 02:44
'cause shell vars get interpolated
You can /msg camelia to run one liners or use the REPL (just run `perl6` with no args to start it) 02:45
02:45 ilbot3 left
todd Cannot call 'push' on an immutable 'List' 02:45
IOninja mhm
todd push ( @Report, "Completed with $ErrorCount errors\n" ); 02:46
IOninja todd: toss the parentheses or the space between push and (
Right now you're calling push(List)
todd I get away with thiw on Perl 5, but not perl 6. I could fid anything on perl6.org
IOninja Perl 5's a different language.
Death to parentheses! 02:47
todd I way to add the string as a new cell at the end of the array. What am I doing wrong?
MasterDuke docs.perl6.org/language/5to6-nutsh...Whitespace
IOninja With the code above?
02:47 ilbot3 joined, ChanServ sets mode: +v ilbot3
IOninja remove parentheses 02:48
todd ah poop. Did it again. "push(" fixed it. Thank you!
IOninja buggable: eco Slang::Tuxic
buggable IOninja, Slang::Tuxic 'allows to call subs as: foo (args)': github.com/FROGGS/p6-Slang-Tuxic
todd works without any paranthisis too. Thank you! 02:49
I take that back 02:50
Geth ecosystem: 28749e7295 | (Zoffix Znet)++ | META.list
Add M to the ecosystem

M, the 1-character Map: non-nodal, non-autothreading .map(*.some-method):
  github.com/zoffixznet/perl6-M
02:51
IOninja @Report.push: "Completed with $ErrorCount errors\n"; works too
todd cool. thank you! 02:53
what is wrong with this? 02:54
IOninja with... ?
todd for @Report -> my $Line { $StringFullOfLineFeeds .= ( "$Line" ~ "\n" ); }
Invalid typename 'my' in parameter declaration.
IOninja todd: don't use `my`
and those parentheses aren't needed
Death to parentheses! 02:55
todd dang!
IOninja Don't need the quotes around the variable either
this works too: for @Report { $StringFullOfLineFeeds .= "$^Line\n"; }
02:56 pyrimidine joined
todd Thank you! 02:56
for @Report -> $Line { $StringFullOfLineFeeds .=( "$Line" ~ "\n" ); } 02:57
02:57 yadzi joined
todd No such method 'Completed with 0 errors ' for invocant of type 'Any' in sub eMailReport at CimTrakCheckAndResatart.pl6 line 65 02:57
what now?
IOninja Death to parentheses!
todd where this time? 02:58
02:58 yadzi left
IOninja ( "$Line" ~ "\n" ) 02:58
or put a space before it
02:58 Actualeyes joined, yadzi joined
todd not catching it 02:58
IOninja for @Report -> $Line { $StringFullOfLineFeeds .= ( "$Line" ~ "\n" ); } 02:59
^ note .it's now '.= (' and not '.=('
todd hi yadzi, we talk a lot on the mailing list!
IOninja Oh oops
I lie
Sorry :)
todd: It's ~= in Perl 6, not .=
03:01 pyrimidine left
IOninja .= is a method call 03:01
todd mumble. That fixed it. Thank you!
IOninja m: my $x = 'meows'; $x .= uc; say $x
camelia MEOWS
IOninja m: my $x = 'meows'; $x .= uc .= flip; say $x
camelia SWOEM
todd Interesting!
Net::SMTP anyone know the syntax to pass multiple eMail address in "To"? 03:04
comma seperated did not work
IOninja Based on the docs, I'd say pass them as a Positional 03:05
[email@hidden.address] [email@hidden.address]
['foo@bar.com', [email@hidden.address]
etc
todd a space and no comma? 03:06
IOninja Correct.
That's like qw/foo@bar.com [email@hidden.address] in Perl 5 (except I think it'd whine about '@' won't it?)
todd Bad to address: The following address failed to send: 03:07
IOninja Ah, no works.
hobbs no, qw is non-interpolating :)
IOninja It's the '#' it complains about :P
m: sub ($to) { for $to.list { .say } }( [email@hidden.address] [email@hidden.address] )
camelia foo@bar.com
meow@meow.com
IOninja todd: reading its code and it should work... 03:08
Does it work when you use the addresses one at a time?
todd that worked. Wow. That was obscure! 03:09
IOninja huh?
What worked? Sending one at a time? Well, it should work sending several at the same time with [email@hidden.address] [email@hidden.address]
todd address1\naddress2 03:10
worked
IOninja :S
todd placing "\n" between the addresses as a delimiter
IOninja By [email@hidden.address] [email@hidden.address] I meant literally, not a string 03:11
todd and they are showing up in my eMail too
IOninja m: dd [email@hidden.address] [email@hidden.address]
camelia ("foo\@bar.com", "meow\@meow.com")
IOninja ^ it makes a two-item list of strings
todd thank you! Got to go! 03:12
03:12 todd left
IOninja \o 03:12
it just ends up sending raw "RCPT TO:$address" 03:13
with newlines in it
03:18 cdg left 03:19 llfourn left 03:21 Actualeyes left 03:23 llfourn joined 03:24 noganex joined, Khisanth left 03:25 aborazmeh joined, aborazmeh left, aborazmeh joined 03:27 noganex_ left 03:30 kurahaupo joined 03:34 kent\n left, aborazmeh left 03:37 AlexDaniel left 03:38 Khisanth joined
Geth routine-map/master: 4 commits pushed by (Zoffix Znet)++ 03:39
03:42 kent\n joined, dj_goku joined
IOninja wonder why it included `master` branch name :S 03:43
Oh it just always does it in this format.
Geth routine-map: fc1ae3201d | (Zoffix Znet)++ | bin/viewer.p6
Add missing CSS selector
03:44
03:47 dj_goku left
IOninja eyes src/core/IO/Spec/QNX.pm 03:50
never heard of that OS...
no free version? Would've loved to run tests on it...
samcv qnx never heard of it 04:18
looked it up. seems for embedded things mostly?
not too much info on the site
04:19 Actualeyes joined, nightfrog left
IOninja looks like they offer free licenses for educational purposes. Need to sign up for an account and accept all terms tho 04:22
04:23 nightfrog joined
geekosaur qnx is a realtime OS with a (now I think deprecated) POSIX API and a native RT API 04:25
04:25 astj joined
IOninja What's RT API? 04:26
geekosaur "realtime"
IOninja Thanks.
geekosaur as in, guaranteed response time scheduling (this is indeed most useful in embedded contexts)
04:26 risou_awy is now known as risou
geekosaur necessary for things like CNC (industrial control systems), train switching, etc. 04:27
IOninja oops... map.perl6.party is missing all the types that have `::` in their names. OOps :S 04:28
m: say CORE::<IO>.keys 04:29
camelia ()
IOninja m: say CORE::<IO::ArgFiles>
camelia Nil
IOninja how u do dis
m: say CORE::<IO>::.keys
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say CORE::<IO>:7⏏5:.keys
expecting any of:
colon pair
IOninja m: say CORE::IO::.keys 04:30
camelia (Handle Dir File Notification Path Local Pathy Pipe Socket Special ArgFiles Spec)
04:30 astj left
IOninja Ahh 04:30
TimToady m: say IO::.keys
camelia (Handle Dir File Notification Path Local Pathy Pipe Socket Special ArgFiles Spec)
TimToady IO is already in CORE :P 04:31
or should I say, you're already in CORE
IOninja How can I programmatically look it up tho?
m: say ::('CORE::IO::').keys
camelia (0)
IOninja Like I wanna loop over all the core stuff, so I guess from CORE::.keys I get the `IO`, but how to get to CORE::IO::.keys from that 04:32
TimToady m: say CORE::<IO>.WHO.keys 04:34
camelia (Handle Dir File Notification Path Local Pathy Pipe Socket Special ArgFiles Spec)
IOninja Ah. Thanks
04:37 aborazmeh joined, aborazmeh left, aborazmeh joined 04:43 risou is now known as risou_awy 04:45 dj_goku joined 04:50 kurahaupo left 04:52 Cabanoss- joined 04:56 Cabanossi left, Cabanoss- is now known as Cabanossi
ZzZombo Great: Too many positionals passed; expected 1 argument but got 2 04:59
in method root at I:\Developer\Perl\VDF\lib\.precomp\98EAEE29307DC37D4338EA65C19B9FA6D589C4AA.1485800890.21532\11\115941A6FC88ECE1A178278587E96C028C0B56B9 line 1
How am I supposed to figure the error location out of that?
IOninja e: gist.github.com/zoffixznet/8ae188e...88bbc27685 05:00
evalable6 IOninja, It looks like a URL, but mime type is ‘text/html; charset=utf-8’ while I was expecting something with ‘text/plain’ or ‘perl’ in it. I can only understand raw links, sorry.
IOninja evalable6: you're dumb
evalable6 IOninja, rakudo-moar 3de7b08: OUTPUT«(exit code 1) 04===SORRY!04=== Error while compiling /tmp/kdIAJF6IfH␤Undeclared routines:␤ dumb used at line 1. Did you mean 'DUMP'?␤ you're used at line 1␤»
IOninja e: gist.githubusercontent.com/zoffixz...917f/p6.p6
evalable6 IOninja, Successfully fetched the code from the provided URL.
IOninja, rakudo-moar 3de7b08: OUTPUT«(exit code 1) --------------␤&infix:<+|>␤sub infix:<+|> (Mu $?, Mu $?) { #`(Sub+{<anon|7836492…»
IOninja, Full output: gist.github.com/671cb0cbb9192aa56b...0a3e641882
05:00 mcmillhj joined
IOninja ^ can't figure out what makes it crash... seems to be on `take Mix` but that code alone don't repro the issue :/ 05:01
m: Mix.so 05:02
camelia Invocant requires an instance of type Baggy, but a type object was passed. Did you forget a .new?
in block <unit> at <tmp> line 1
IOninja well, dammit... Sure! Figure it out right after asking -_-
ZzZombo: as I've said before. We can't fix issues we don't know about it. Report it. 05:03
05:05 mcmillhj left
IOninja huggable: rakudobug 05:06
huggable IOninja, Report bugs by emailing to [email@hidden.address]
05:09 dj_goku_ joined 05:10 llfourn_ joined, john51 joined 05:11 khw left, user10 joined 05:12 shmibs_ joined, [particle]1 joined, ZzZombo_ joined 05:13 obfusk_ joined, ZzZombo__ joined, ZzZombo is now known as Guest5178, ZzZombo__ left, ZzZombo__ joined, ZzZombo__ is now known as ZzZombo 05:14 _kristia1 joined, Woodi_ joined, bartolin_ joined, lep_ joined, effbiai_ joined, effbiai_ left, effbiai_ joined, cibs_ joined, lucs_ joined, Hor|zon__ joined, notostraca joined, nine_ joined, rjbs- joined, ilbelkyr_ joined, tinita_ joined, Shozan joined, diakopte1 joined, obra_ joined, sivoais_ joined, xiaomiao joined, perlpilot_ joined, neady joined, profan_ joined 05:15 broquain1 joined, sQuEE` joined, erdic_ joined, stux|RC-only joined, yadzi left, Guest5178 left 05:16 Woodi left, ilbelkyr left, bartolin left, dj_goku left, aborazmeh left, cibs left, sivoais left, user9 left, perlpilot left, zengargoyle left, k-man left, obra left, lucs left, nine left, pecastro left, diakopter left, Actualeyes left, cpage_ left, erdic left, eady left, broquaint left, ccakes left, sQuEE left, eaterof left, wcummings left, SHODAN left, raydiak left, stux|RC left, llfourn left, lep-delete left, Hor|zon left, effbiai left, gabiruh left, _kristian left, b2gills left, telex left, araujo left, john51_ left, obfusk left, rjbs left, shmibs left, tinita left, TEttinger left, risou_awy left, SCHAAP137 left, drrho left, profan left, [particle] left, DrEeevil left, user10 is now known as user9, erdic_ is now known as erdic, shmibs_ is now known as shmibs
IOninja weeeeeeeeeee 05:16
05:17 raydiak joined, ZzZombo_ left, araujo joined, araujo left, araujo joined, cpage_ joined, gabiruh joined, Actualeyes joined 05:18 ccakes joined, k-man joined, risou_awy joined, drrho joined, aborazmeh joined, aborazmeh left, aborazmeh joined, b2gills joined 05:19 wcummings joined, timeless left, mrsolo left, eater joined, PotatoGim left 05:20 ggherdov left, john51 left, john51 joined 05:21 pecastro joined, zengargoyle joined, telex joined 05:22 ggherdov joined 05:23 PotatoGim joined, sivoais_ left, mrsolo joined 05:24 sivoais joined 05:25 timeless joined, ggherdov left 05:26 aborazmeh left, ggherdov joined, ggherdov left 05:27 ggherdov joined 05:28 SCHAAP137 joined 05:38 cpage__ joined 05:41 drrho_ joined, b2gills left 05:42 telex left, b2gills joined, cpage_ left, drrho left, cpage__ is now known as cpage_, telex joined 05:48 risou_awy is now known as risou 05:59 mr-foobar joined 06:00 rurban joined, rurban left
ZzZombo where are the specs for the <> syntax that makes for $cont<> work? 06:04
IOninja "specs"? 06:05
ZzZombo yes? that makes that treat $cont as Iterable and not scalar?
what*
06:06 CIAvash joined 06:09 bjz left 06:15 bjz joined 06:16 gdonald left, gdonald joined 06:18 Actualeyes left
IOninja m: my $f = 2; my @slow = <a b c d>; my @files = ^10; say @slow Z @files.batch: Int(@files/3*2 / @slow) 06:21
camelia ((a (0)) (b (1)) (c (2)) (d (3)))
IOninja What's the trick to make it include all the elements? So it'd add (4), (5), (6) ... (9) 06:22
Woodi_ x or X ?
samcv like [+] but hyper?
Woodi_ hallo today :)
IOninja the goal is ((a (0)) (b (1)) (c (2)) (d (3)) (4) (5) (6) (7) (8) (9))
m: my $f = 2; my @slow = <a b c d>; my @files = ^10; say @slow Z @files.batch: 2 06:24
camelia ((a (0 1)) (b (2 3)) (c (4 5)) (d (6 7)))
Woodi_ looks like right join with slipping NULLs :)
IOninja and here it'd be ((a (0 1)) (b (2 3)) (c (4 5)) (d (6 7)) (8 9))
don't care about proper structure; it all gets flattened in the end
06:25 Seym0ur joined 06:26 Seym0ur left
samcv m: my $f = 2; my @slow = <a b c d>; my @files = ^10; my @result = @slow Z @files.batch: 2; @result.append(@files.tail(@files.elems - @result.elems)) 06:28
camelia ( no output )
samcv m: my $f = 2; my @slow = <a b c d>; my @files = ^10; my @result = @slow Z @files.batch: 2; @result.append(@files.tail(@files.elems - @result.elems)).say
camelia [(a (0 1)) (b (2 3)) (c (4 5)) (d (6 7)) 4 5 6 7 8 9]
samcv not quite
IOninja m: my $f = 2; my @slow = <a b c d>; my @files = ^10; my @result = flat @slow Z @files.batch: 2; @result.append(@files.tail(@files.elems - @result.elems)).say
camelia [a 0 1 b 2 3 c 4 5 d 6 7]
06:28 pyrimidine joined
IOninja m: my $f = 2; my @slow = <a b c d>; my @files = ^10; my @result = flat @slow Z @files.batch: 2; @result.append(@files.tail(@files - @result - @slow)).say 06:29
camelia [a 0 1 b 2 3 c 4 5 d 6 7]
IOninja m: my $f = 2; my @slow = <a b c d>; my @files = ^10; my @result = flat @slow Z @files.batch: 2; @result.append(@files.tail(@files - @result + @slow)).say 06:30
camelia [a 0 1 b 2 3 c 4 5 d 6 7 8 9]
IOninja samcv++
samcv :)
wait what does subtracting arrays do
hah
IOninja Arrays are Cool, their numeric view is the number of elements 06:31
samcv m: my @files = 1,2,3; my @other = 1,2,3; @other - @files
camelia WARNINGS for <tmp>:
Useless use of "-" in expression "@other - @files" in sink context (line 1)
samcv m: my @files = 1,2,3; my @other = 1,2,3; say @other - @files
camelia 0
samcv like perl 5 then
got it
06:33 pyrimidine left 06:40 pyrimidine joined 06:41 Actualeyes joined 06:45 pyrimidine left 07:01 cibs_ left, mcsnolte left, rurban joined
masak m: my @our-apples = "apple" xx 3; my @my-apples = "apple" xx 5; say @our-apples - @my-apples 07:02
camelia -2
masak morning, #perl6
07:02 cibs joined
gfldex m: my @our-apples = "apple" xx 3; my @my-peaches = "peach" xx 5; say @our-apples - @my-peaches 07:03
camelia -2
07:13 tardisx left 07:15 tardisx joined 07:30 toolforger joined
toolforger m: say Inf - Inf 07:31
camelia NaN
samcv m: say NaN - NaN
camelia NaN
samcv :P
toolforger just checking some edge cases :-)
e.g.
m: say 0/0 07:32
camelia Attempt to divide by zero using div
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
toolforger erm
m: say 0.0/o.0
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed postfix call
at <tmp>:1
------> 3say 0.0/o.7⏏050
toolforger dammit
m: say 0.0/0.0
camelia Attempt to divide by zero using div
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
toolforger Heh. That's a deviation from ieee rules
Ah right 07:34
m: say <0/0>.Num
camelia NaN
toolforger Not sure what's going on, I don't know what the angle brackets and the .Num suffix actually do 07:35
m: NaN == NaN 07:38
camelia WARNINGS for <tmp>:
Useless use of "==" in expression "NaN == NaN" in sink context (line 1)
toolforger m: say NaN == NaN
camelia False
toolforger m: say NaN === NaN
camelia True
toolforger good.
07:42 rindolf joined
samcv m: say - NaN 07:47
camelia NaN
07:56 andrzejk_ joined 07:59 darutoko joined 08:03 ZzZombo_ joined, ZzZombo_ left, ZzZombo_ joined, ZzZombo is now known as Guest61180, ZzZombo_ is now known as ZzZombo 08:04 ZzZombo_ joined 08:05 ZzZombo_ left, ZzZombo_ joined, ZzZombo is now known as Guest95600, ZzZombo_ is now known as ZzZombo, Guest61180 left 08:08 Guest95600 left 08:21 pyrimidine joined 08:26 pyrimidine left 08:38 pyrimidine joined 08:44 hchienjo joined
hchienjo Hello everyone. 08:44
08:44 mxco86 joined 08:45 pyrimidine left 09:05 andrzejk_ left, andrzejk_ joined 09:06 toolforger left
samcv hello hchienjo 09:07
hchienjo Was wondering, where should the tests for iterable.sort live in? S32-list? 09:09
samcv: In relation to this issue: github.com/perl6/roast/issues/230 09:10
09:10 xtreak joined
samcv yeah? 09:10
09:13 RabidGravy joined
hchienjo samcv: Thanks. 09:16
samcv oh where they should go, sorry didn't see that message, i'm blind 09:17
sorry :) let me tell you
sec
should be in S07 09:19
maybe hold on
yeah i'd say 32 is fine. since things were revised in the GLR 09:20
it should probably go in 32
09:21 wamba joined
samcv if you want to contribute I would create a new test file just for the flat method and the flat routine 09:21
09:23 cibs left
samcv hchienjo, any more questions? 09:23
09:24 sena_kun joined
hchienjo samcv: Not at the moment. I have already written three tests in a flat.t file. 09:24
samcv great :)
09:24 cibs joined
samcv and if you want to add the new test for running `make spectest` edit /t/spectest.data and add it 09:25
this is in the rakudo not the roast repo
09:26 CIAvash left
hchienjo samcv: Right on time, I already have cloned rakudo and was about to test. 09:29
samcv :)
09:35 notostraca left 09:36 andrzejk_ left
hchienjo samcv: What if I want to run a test of a specific file first? Before running for the whole test suite? 09:37
09:37 DarthGandalf left
samcv make t/spec/s99-blah/file.t 09:37
09:38 DarthGandalf joined 09:42 yadzi joined
hchienjo samcv: Awesome. Thanks. 09:43
09:46 yadzi left 09:47 xtreak left
hchienjo is brokenchicken: Zoffix? 09:48
09:49 yadzi joined
sena_kun hchienjo, yep. And IOninja too. 09:49
hchienjo sena_kun: Oh, I got used to seeing some names here. It has been a while. 10:01
sena_kun hchienjo, well, I'm not experienced guy here to talk, but there weren't *radical* nick changes for last year, afaik. Except for Zoffix. :) 10:04
10:06 gdonald left, araraloren joined, gdonald joined
araraloren afternoon, #Perl 6 10:07
10:16 hchienjo left 10:25 yusrideb left 10:30 bjz left 10:33 hchienjo joined
RabidGravy boom! 10:39
10:40 bjz joined 10:41 pyrimidine joined
samcv zoffix, nobody is in this channel by that name :P you seem to be confused 10:42
10:43 bjz left 10:46 bjz joined, pyrimidine left 10:50 girafe left 11:02 yusrideb joined 11:04 mrdside___ joined 11:11 hchienjo left 11:15 mrdside___ left 11:17 cibs left 11:19 cibs joined 11:29 Actualeyes left 11:30 lukaramu joined
ZzZombo what is this: 11:44
$res.=" $_" if $section.condition -> $_;
Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.
at I:\Developer\Perl\VDF\lib\Grammar\VDF.pm6 (Grammar::VDF):206
------> $res.=" $_"<HERE> if $section.condition -> $_;
?
11:44 profan_ is now known as profan 11:45 eroux joined 11:46 itcharlie joined
RabidGravy well apart from the syntax error, the idiom sets the $res to the result of calling the method named in $_ on it 11:47
sena_kun ZzZombo, I'm not sure, but... Perhaps you want "~=" instead of ".="? Since ".=" is a call of method with assignment. And I don't understand fully your "->", what should it mean?
ZzZombo aw, P5 strikes again
RabidGravy ah, yes if you meant a string operation then waht sena_kun said
11:50 mr-foobar left
RabidGravy but 11:50
m: my Version $v; given "new" { $v .="$_"() }; say $v.perl; # for example
camelia Version.new
RabidGravy which is why you are getting the error message that you are 11:51
ZzZombo ya, I mixed up P5 and P6. 11:52
RabidGravy I spend my working day forgetting that I am writing Perl 5 and typing "$foo.method" and wondering why I get an error 11:53
this is exacerbated by on any given day being exposed to Scala or Javascript 11:54
11:54 bjz left 11:55 bjz_ joined 11:59 ZzZombo left
RabidGravy also I am sorely tempted to "fix" Perl 5 to support $foo->?method 11:59
12:01 tinita_ is now known as tinita 12:05 Actualeyes joined 12:13 setty1 left 12:19 espadrine joined 12:31 pyrimidine joined 12:32 ZzZombo joined 12:36 pyrimidine left 12:42 pyrimidine joined 12:47 pyrimidine left 12:51 mr-foobar joined 12:52 andrzejk_ joined 12:55 setty1 joined
ZzZombo is there any writing how to write a serializer for recursive data type that preferrably won't hang on anything bigger than a few elements in it? 12:55
timotimo is JSON::Fast not fast enough? 12:56
ZzZombo But I'm not serializing into JSON. I want to save parsed and probably changed data back into source form. 12:57
timotimo there's nothing for you on modules.perl6.org?
there's serializers for XML, TOML, Serialize::Naive and Serialize::Tiny are probably something proprietary? then there's PerlStore, no clue what that is, and there's all the JSON ones, and there's something called "Avro" 12:58
apache avro, eh? 12:59
12:59 firefish5000 joined
ZzZombo I have a different format, not one of those widely used. 12:59
timotimo oh, so you're forced to comply with a given format 13:00
i didn't realize that
13:00 sammers left
llfourn_ ZzZombo: just recursively walk your data structure and return objects after visiting each node. 13:00
timotimo llfourn_: that's not fast :)
llfourn_ does it need to be fast? 13:01
timotimo that's how JSON::Tiny does it. JSON::Fast has something a bit more efficient
13:01 girafe joined
timotimo yes, he said he wants one "that preferrably won't hang on anything bigger than a few elements in it" 13:01
ZzZombo and that just blew my computer up. Did you notice I've timed out.
timotimo though i have no idea why something would "hang" with more than "a few elements"
i did not notice that
you probably infinitely recursed instead of making progress
ZzZombo well, I had to reboot. Now I'm gonna run tests under a VM, I guess. 13:02
timotimo just set a ulimit
13:02 bjz joined
ZzZombo ulimit? 13:02
timotimo yup, check out ulimit -a
13:02 bjz_ left
timotimo watch out, though, the "maximum resident set size" option is usually not implemented 13:03
ZzZombo that's for Unix though, isn't it? 13:06
timotimo oh, you're on windows? 13:08
ZzZombo yep 13:09
moritz you could use Perl 6 in docker, and define some resource limits on the docker level
timotimo how well does docker work on windows?
llfourn_ doubts the computer is hanging because of FDs
timotimo and can you use ulimit on "ubuntu on windows10"? 13:10
llfourn_ docker should work pretty well on windows. It uses HyperV now from what I heard. 13:12
13:13 sammers joined
IOninja ZzZombo: .= is a method call and you can provide the method name in a string; in which case you need parens after it. 13:25
firefish5000 I cannot figure out whats up with my grammars, the smallest changes seem to grossly affect the output. (for instance, adding {say 'fix'} into the non-working token may cause to to finally correctly match)
IOninja m: my $x = 'meows'; $x .= 'uc'() .= 'flip'(); say $x
camelia SWOEM
moritz firefish5000: a {} block delimits longest-token matching 13:26
so it's legitimate that it can affect outcomes
IOninja hchienjo, I'm guessing you've read a particular article to know of that name... Keep in mind not everything is entirely true on the Internet. 13:27
firefish5000 oh, that explains why my debugging attempts have been failing so miserably! Thanks moritz 13:28
moritz firefish5000: are you aware of Grammar::Tracer?
IOninja toolforger, angled brackets in that case a Rat literal. Only the Num view of a Rat follows IEEE floating point rules; so for example 0/0 + 0e0 won't explode, but 0/0 + 0 will
moritz firefish5000: <plug type="blatnat">the grammar chapter of leanpub.com/perl6 might interest you</plug> 13:29
(though I don't talk much about LTM in there, TBH) 13:30
llfourn_ things do become much easier once you get used to LTM
firefish5000 yes, and I use it extensively. but I wasn't aware my code blocks affected the output. I will need to re-read up on grammars. thanks!
13:32 lukaramu_ joined
llfourn_ m: "foo" ~~ /$<a>=.*|$<b>=foo/; say ?$/<a> 13:33
camelia True
llfourn_ m: "foo" ~~ /{} $<a>=.*|$<b>=foo/; say ?$/<a> 13:34
camelia False
llfourn_ firefish5000: ^demo :)
13:34 bjz_ joined 13:35 lukaramu left 13:36 bjz left 13:37 rurban1 joined 13:38 yadzi left 13:40 rurban left 13:48 ZzZombo_ joined, ZzZombo_ left, ZzZombo_ joined, ZzZombo is now known as Guest16036, ZzZombo_ is now known as ZzZombo 13:51 llfourn_ left, Guest16036 left, xtreak joined 13:52 kurahaupo joined 13:53 ZzZombo left, ZzZombo joined, ZzZombo left, ZzZombo joined 13:55 gdonald left, gdonald joined
ZzZombo Hmm, how do I make useful error messaging in grammars? 13:56
13:56 dalek left 13:57 dalek joined, ChanServ sets mode: +v dalek 14:00 bjz_ left
moritz ZzZombo: perlgeek.de/blog-en/perl-6/2017-00...rrors.html 14:01
14:01 kurahaupo left, pyrimidine joined, bjz joined
IOninja s: <.5>, 'FatRat', \() 14:03
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/b283.../Rat.pm#L4
IOninja m: dd <4.9999999999999999999999999999>
camelia RatStr.new(<49999999999999999999999999999/10000000000000000000000000000>, "4.9999999999999999999999999999")
IOninja TimToady: I don't see where a RatStr knows how to become a FatRat properly. Looks like it just binds numerator/denominator that are >uint64 and that's where the "magic"'s at. 14:05
14:05 AlexDaniel joined
IOninja m: dd Rat.new(49999999999999999999999999999, 10000000000000000000000000000).FatRat 14:05
camelia FatRat.new(49999999999999999999999999999, 10000000000000000000000000000)
IOninja basically ^ that's what it does
14:06 pyrimidine left
IOninja m: dd 0e0+val 17 ~ '0' x 307 ~ '.0' 14:10
camelia Inf
IOninja m: dd 0e0+Rat.new: (17 ~ '0' x 307 ~ '').Int, 1 14:11
camelia Inf
14:11 risou is now known as risou_awy
IOninja m: dd 0e0+Rat.new: (17 ~ '0' x 305 ~ '').Int, 1 14:11
camelia 1.7e+306
IOninja m: dd 0e0+Rat.new: (17 ~ '0' x 306 ~ '').Int, 1
camelia Inf
14:12 andrzejk_ left
IOninja And looks our Rat.Num algo is busted. Supposed to return a proper number up-to ~1.7e308 14:12
(Rational.Num) 14:15
14:26 itaipu joined 14:28 gdonald left, gdonald_ joined
IOninja m: Int.abs 14:32
camelia Invocant requires an instance of type Int, but a type object was passed. Did you forget a .new?
in block <unit> at <tmp> line 1
IOninja
.oO( so much for undef == 0 thing... )
Let's toss it in 6.d :}
b2gills m: say <a b c> Z <A B C D>; say roundrobin <a b c> , <A B C D> # IOninja I believe you were looking for roundrobin earlier 14:33
camelia ((a A) (b B) (c C))
((a A) (b B) (c C) (D))
14:34 diakopte1 is now known as diakopter
IOninja doh 14:34
b2gills++ indeed I did 14:35
14:35 bjz left
b2gills I regularly forget about it too, along with ff and fff 14:35
timotimo we really need a ffs infix operator that does something appropriate 14:37
14:44 lichtkind_ joined 14:46 ilbelkyr_ is now known as ilbelkyr 14:47 llfourn joined 14:48 lichtkind__ left 14:51 araraloren left, kurahaupo joined 14:52 llfourn left, ChoHag joined 14:56 risou_awy is now known as risou 15:01 xtreak left 15:02 itcharlie left
ZzZombo moritz, many thanks! 15:03
15:09 yusrideb left 15:11 llfourn joined 15:13 risou is now known as risou_awy
ZzZombo how could I escape a string so it would be displayed with metacharacters shown as \n or \t? 15:25
IOninja m: "\t \n".perl.say 15:26
camelia "\t \n"
ZzZombo that will also tinker with " 15:28
yea, it quotes the whole string, and escapes quotes inside it. 15:30
15:31 MasterDuke left 15:32 MasterDuke joined
IOninja What are metacharacters? 15:32
MasterDuke ZzZombo: have you looked at docs.perl6.org/language/quoting?
docs.perl6.org/language/quoting 15:33
AlexDaniel MasterDuke: I think he wants it other way round
15:33 sena_kun left
MasterDuke ah, wasn't exactly sure what was being asked 15:33
AlexDaniel e: ‘␉ ␤’.trans((“\n”, “\t”) => (「\n」, 「\t」)) 15:35
evalable6 AlexDaniel, rakudo-moar 0be7247: OUTPUT«»
AlexDaniel oops :)
e: say ‘␉ ␤’.trans((“\n”, “\t”) => (「\n」, 「\t」))
evalable6 AlexDaniel, rakudo-moar 0be7247: OUTPUT«␉ \n»
AlexDaniel ah, say!
IOninja m: "\n \t".trans("\n\t" => *.perl).say 15:38
camelia Only Pair objects are allowed as arguments to Str.trans, got WhateverCode
in block <unit> at <tmp> line 1
IOninja Booo!
moritz m: "\n \t".trans("\n\t" => {.perl}).say 15:39
camelia Any Any
IOninja m: "\n \t".subst(:g, /<[\n\t]>/, *.perl).say
camelia Match.new(ast => Any, list => (), hash => Map.new(()), to => 1, orig => "\n \t", from => 0) Match.new(ast => Any, list => (), hash => Map.new(()), to => 3, orig => "\n \t", from => 2)
IOninja m: "\n \t".subst(:g, /<[\n\t]>/, *.Str.perl).say
camelia "\n" "\t"
15:40 tires joined
ZzZombo Q:q: works with directly typed \n 15:40
IOninja heh 15:41
ZzZombo sbut not with metacharacters coming from interpolated variables.
IOninja ZzZombo: it just doesn't consider \n special
ZzZombo wut
Q:q!Just a literal "\n" here!;
that's the example in the docs, and it indeed works. 15:42
IOninja indeed it does :)
15:44 andrzejk_ joined 15:47 lukaramu_ left
AlexDaniel ZzZombo: just wondering, why do you need this? 15:52
ZzZombo showing preceeding lines of grammar parse error. Newlines, tabs and whatever keeps screwing up that and making it barely readable. 15:53
AlexDaniel ah 15:54
15:57 risou_awy is now known as risou
IOninja Looks like the IO grant will do some major changes. And some things are documented, despite there being zero tests for routines. Their behaviour is undesirable and since there's no roast to block the changes, I'll make them... 15:59
Gonna draft an advanced notice telling users wtf's happening. My ETA for these changes going in: 2017.04 Rakudo and Star releases. 16:00
s/draft/publish/;
(Re documented without tests: it's 'cause they were documented prior to our implementing a policy of not doing that)
moritz it would be really awesome if old-style IO and new-style IO could coexist for a while, to ease the transition 16:01
IOninja Don't see a good way to do that.
MasterDuke do any of the modules currently in the ecosystem use the stuff that's going to change? 16:02
IOninja The release will come with detailed upgrade guide ("if you're using X, you're supposed to be using Y") and I'll publish an announcement basically a realease and a half in advance, so IMO it's not as bad. 16:03
16:04 kurahaupo left
moritz ok 16:06
ZzZombo what is better to put in alternation first, something that is gonna succeed often or fail quickly? 16:07
16:10 tires left
firefish5000 It depends, I would chose succeed often by default, but if it takes long enough to fail, I would go the other way around. 16:11
IOninja MasterDuke: I hope so :) 16:18
AlexDaniel that sounded evil 16:20
16:20 risou is now known as risou_awy
IOninja No, the hope is the stuff I'm changing is useful enough to be used so the work isn't useless. 16:21
No one seems to be using link(). There's a bunch that use `seek` 16:23
16:23 zakharyas joined
IOninja A problem tho: (a) a module updates for new changes; (b) user uses the module with an older compiler. 16:24
16:24 rindolf left
IOninja The devs have free pass to make these changes since our contract with the user is: we don't break 6.c-errata tests. And we won't. 16:25
16:25 itaipu left
IOninja In reality: our tests in this area are crap and users are using stuff they think won't change. 16:25
Plan C: delay this until 6.d; but then all the books being published right now will be heavily outdated and wrong in just a few months after their publication. 16:26
mst surely the books should be targeting 6.d ? 16:27
IOninja Well, the .seek change can at least be done while still supporting old interface. No one seems to be using `link` anyway. I guess I'll publish an advance notice and we'll decide what to do on any other things that'll pop up. 16:28
mst: they will be published before 6.d. We don't even know when 6.d will happen yet.
mst ah
if we're fixing up I/O can we have unix socket support now? 16:29
IOninja Not as part of the grant, because I don't know what that even is. But I saw enough people ask about it that I'll look into it after the grant. 16:30
16:32 llfourn left, lucs_ is now known as lucs, rindolf joined
mst also, rakudo could really do with a way to get a perl6-level filehandle out of an fdno 16:33
AlexDaniel oh, what a surprising problem! Books get outdated fast!
moritz +1
maybe we can make the new IO part of v6.d 16:34
IOninja moritz: you mean +1 on plan C?
moritz IOninja: +1 to mst's request to have fdno available 16:35
IOninja Ah :)
ZzZombo I forgot, how can I change "file.txt" to "file.log" (not rename!)?
AlexDaniel ?
IOninja ZzZombo: currently, with .subst
m: say "file.txt".subst(/'.')> <-[.]>+$/, 'log').say 16:36
camelia filelogtxt
True
IOninja really...
ZzZombo there is .catfile that I scarcely remember used in that.
IOninja m: "file.txt".subst(/'.' <-[.]>+ $/, '.log').say 16:37
camelia file.log
IOninja mc: say "file.txt".subst(/'.')> <-[.]>+$/, 'log').say
committable6 IOninja, ¦«2015.12»: filelogtxt␤True
IOninja oh doh
m: say "file.txt".subst(/'.' <( <-[.]>+$/, 'log').say 16:38
camelia file.log
True
ZzZombo m: "file.txt.bak".subst(/'.' <-[.]>+ $/, '.log').say
camelia file.txt.log
ZzZombo m: "file".subst(/'.' <-[.]>+ $/, '.log').say
camelia file
ZzZombo ^
IOninja m: say "file".split('.')[^(*-1)].join('.') ~ '.log' 16:41
camelia .log
IOninja hah
m: say with "file".split('.') { ($_ == 1 ?? .head !! .[^(*-1].join('.')) ~ '.log' } 16:42
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun
at <tmp>:1
------> 3say7⏏5 with "f…
IOninja m: say do with "file".split('.') { ($_ == 1 ?? .head !! .[^(*-1].join('.')) ~ '.log' }
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')'
at <tmp>:1
------> 3plit('.') { ($_ == 1 ?? .head !! .[^(*-17⏏5].join('.')) ~ '.log' }
expecting any of:
IOninja m: say do with "file".split('.') { ($_ == 1 ?? .head !! .[^(*-1)].join('.')) ~ '.log' }
camelia file.log
IOninja m: say do with "file.txt".split('.') { ($_ == 1 ?? .head !! .[^(*-1)].join('.')) ~ '.log' }
camelia file.log
IOninja m: say do with "file.txt.bak".split('.') { ($_ == 1 ?? .head !! .[^(*-1)].join('.')) ~ '.log' }
camelia file.txt.log
16:42 pyrimidine joined 16:44 khw joined 16:47 pyrimidine left
IOninja m: dd 'a'.split(/.+ )> '.'/, 2, :v, :skip-empty)[0] ~ '.log' 16:50
camelia "a.log"
IOninja m: dd 'a.txt'.split(/.+ )> '.'/, 2, :v, :skip-empty)[0] ~ '.log'
camelia "a.log"
IOninja m: dd 'a.txt.bak'.split(/.+ )> '.'/, 2, :v, :skip-empty)[0] ~ '.log'
camelia "a.txt.log"
16:52 itaipu joined 16:57 drrho_ left
IOninja m: my $x; say 4.6e-1.Rat($x with $x) 16:58
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3my $x; say 4.6e-1.Rat($x with 7⏏5$x)
IOninja What's its problem?
17:00 drrho_ joined
IOninja kinda makes with returning Empty pointless if you still gotta wrap it into extra parens and slip them in 17:02
IOninja goes with $x // Empty
17:03 zakharyas left 17:05 cdg joined
IOninja m: class Foo { method meow ($x = 42) { dd $x } }; my $x; say Foo.meow($x // Empty) 17:05
camelia Slip $x = Empty
Nil
IOninja damn, it's not what I want
m: class Foo { method meow ($x = 42) { dd $x } }; my $x; Foo.meow(|($x with $x))
camelia Int $x = 42
IOninja m: class Foo { method meow ($x = 42) { dd $x } }; my $x = 42; Foo.meow(|($x with $x)) 17:06
camelia Int $x = 42
IOninja m: class Foo { method meow ($x = 42) { dd $x } }; my $x = 72; Foo.meow(|($x with $x))
camelia Int $x = 72
IOninja Why do I need to slip the slip :S
s: &prefix:<|> 17:07
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/0be7...t.pm#L1466
IOninja s: Empty, 'Slip', \()
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/0be7...Slip.pm#L4
IOninja doesn't get it
zengargoyle m: say ("file.txt" ~ ".log").subst(/\.txt\.log$/,".log") 17:09
camelia file.log
17:17 itaipu left 17:18 rurban joined 17:20 rurban1 left
IOninja DBIish install fails on Rakudo's HEAD: "MVMArray: atpos expected string register" 17:27
gist.github.com/zoffixznet/8379e2f...8cf1f09d02 17:28
zengargoyle m: say "file.txt".subst(/\.txt$/,"") ~ ".log"
camelia file.log
17:29 llfourn joined 17:30 itaipu joined 17:31 bwisti joined 17:33 llfourn left 17:35 gdonald_ left, gdonald_ joined 17:39 unclechu joined 17:50 i7r6 joined
IOninja .tell cale2 note that since you have a commit bit in perl6 repos, any time you use online editor to make a PR you create a branch in the repo; once PR is processed, don't forget to use the "Delete branch" button. I see there's a couple of `WildYorkies-patch-` branches in perl6/doc. Would you mind deleting them if they were merged/closed already? 17:53
yoleaux IOninja: I'll pass your message to cale2.
17:58 risou_awy is now known as risou 18:00 rurban1 joined, i7r6 left 18:02 rurban2 joined, rurban2 left 18:03 rurban left
MasterDuke IOninja: i just created a rakudo PR to fix the DBIish install 18:05
18:05 rurban1 left 18:06 avarab is now known as avar
firefish5000 Alright, I'm finally starting to get slang workin! Yall ain't gonna stop me now 18:07
gfldex steps out of the way 18:08
firefish5000 runs into him anyways 18:09
I never said I was good at it, ill get their in the long run with 'breaks and crashes' in between 18:11
gfldex firefish5000: i'm quite sure your slang will be as cool as this robot! www.youtube.com/watch?v=nHohqPChqjc
18:13 espadrine left
TimToady firefish5000: note that in a pinch you can use <!!{ say "stuff" }> because negative assertions don't affect LTM, and !! ends up being a positive assertion 18:15
you can't just use ? because <?{}> does affect LTM 18:16
18:16 risou is now known as risou_awy
TimToady but also note that the !! is relying on say returning true 18:16
18:20 kenjia joined 18:23 yadzi joined 18:27 cdg left, zakharyas joined, cdg joined 18:28 ZzZombo left 18:29 ZzZombo joined, ZzZombo is now known as Guest60735 18:30 llfourn joined 18:34 llfourn left 18:35 dwarring joined 18:38 andrzejk_ left 18:43 pyrimidi_ joined
dwarring m: role R { multi method foo( :$a!, ) { }; multi method foo( :$b!, ) { } }; 18:45
camelia ( no output )
dwarring m: role R { multi method foo( :$a!, ) { }; multi method foo( :$b!, ) { } }; class C does R {}
camelia 5===SORRY!5=== Error while compiling <tmp>
MVMArray: atpos expected string register
at <tmp>:1
dwarring bisect: role R { multi method foo( :$a!, ) { }; multi method foo( :$b!, ) { } }; class C does R {}
bisectable6 dwarring, Bisecting by exit code (old=2015.12 new=0be7247). Old exit code: 0
dwarring, bisect log: gist.github.com/48e331230ac07ac243...9cf9aed6be
dwarring, (2017-02-12) github.com/rakudo/rakudo/commit/b2...8dad8c0632
IOninja hehe
MasterDuke: would you know what makes it unhappy? ^ 18:46
Oh, you're way ahead of the game :) 18:47
MasterDuke IOninja: pretty sure it's the same thing as what made DBIish unhappy. it doesn't error locally (i have my PR applied)
18:47 cdg left
IOninja MasterDuke++ Meged. Thanks. 18:47
*Merged
18:47 cdg joined 18:48 pyrimidi_ left
dwarring rebuilding ;-) 18:48
18:48 pyrimidine joined 18:53 pyrimidine left 18:57 espadrine joined 18:58 risou_awy is now known as risou 18:59 darutoko left 19:02 pyrimidine joined
Geth specs: a4ceadef10 | (Zoffix Znet)++ | v6d.pod
Remove dummy precision parameters from...

  ...Rational.Rat and Rational.FatRat coercers
19:05
19:06 andrzejk_ joined 19:07 zakharyas left, notostraca joined
IOninja m: $_ = 42; when 42 { proceed when 42 }; say 'meows' 19:11
camelia meows
IOninja m: $_ = 42; when 42 { proceed when 42; say 'wat' }; say 'meows'
camelia meows
IOninja wtf... fails locally...
sjn IOninja: what are you trying to do? 19:13
IOninja nevermind misread output of my code; works fine 19:14
dwarring MasterDuke++ # quick-fix 19:16
timotimo MasterDuke: i think the NULLs we have in the sql output of the profiler should be 0 instead 19:17
MasterDuke timotimo: feel free to make any changes you like, you know the profiler and its output much better than i 19:22
i think i just did that because the json for them was empty, but i'm not going to swear to that 19:23
timotimo yeah, makes sense 19:24
but we only make those empty because that's cheaper than to put the key in and set its value to 0
MasterDuke ah, ok. then making the sql output 0 does probably make more sense 19:27
timotimo yeah 19:28
NULL in sql is a very ... "different" beast
Geth specs: 2253c29713 | (Zoffix Znet)++ | v6d.pod
Add Int to .Rat/.FatRat tossage proposal too

there's one test in atan2 that for a strange reason decided to use epsilon...
19:29
19:29 llfourn joined
MasterDuke i'm off to bring in some groceries and then kill orcs, will make that change later if you don't 19:29
timotimo i've made it locally, i'd just have to commit it 19:31
19:33 llfourn left 19:42 yadzi left
timotimo MasterDuke: it looks like the sql output doesn't let us see what routines allocate what 19:48
19:52 cdg_ joined 19:54 cdg left
timotimo sets up some foreing keys 19:55
to make the schema easier to understand by just looking at it
20:03 dmaestro joined
IOninja follows MasterDuke's lead to kill things... 20:06
20:13 rmusial joined
timotimo it's annoying to rebuild both rakudo and nqp to test something for the profiler 20:17
maybe i should profile a piece of nqp code instead
moritz what's the shortcut for 'if defined' again?
timotimo "with" 20:21
moritz timotimo: ah, thanks
AlexDaniel moritz: there's also 「without」 and 「orwith」 20:22
moritz what's orwith? 20:29
AlexDaniel m: my $x; my $y = 42; with $x { say ‘hello’ } orwith $y { say ‘world’ }
camelia world
AlexDaniel m: my $x = 42; my $y; with $x { say ‘hello’ } orwith $y { say ‘world’ }
camelia hello
AlexDaniel like if/elsif
moritz ah, makes sense, kindof :-) 20:30
20:30 llfourn joined
AlexDaniel if/elsif/else → with/orwith/else 20:30
though you can mix them I guess
m: my $x = 42; my $y; with $x { say ‘hello’ } elsif True { say ‘world’ }
camelia hello
AlexDaniel yea
IOninja m: 42 andthen .say 20:33
camelia 42
lizmat www.quora.com/Which-is-better-Perl...-Pepersack # no mention of Perl 6 :-( 20:35
20:35 llfourn left
moritz do we have any unicode property for the width of a character? 20:38
AlexDaniel ooooooh, we had something added
very recently
timotimo we do, yeah 20:39
AlexDaniel m: say ‘x’.uniprop(‘East_Asian_Width’)
camelia Na
timotimo i think it's called .. yes
Na.
20:39 kenjia left
AlexDaniel m: say ‘字’.uniprop(‘East_Asian_Width’) 20:40
camelia W
moritz m: say '⽝'.uniprop('East_Asian_Width')
camelia W
moritz that's less useful than I hoped for, but not hopeless 20:41
AlexDaniel moritz: why is it not enough for your use case?
let's see how recent that is…
bisect: say '⽝'.uniprop('East_Asian_Width')
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=81fcd1b) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/0f45dbd9d1f8c92437...926178a932
AlexDaniel, (2016-12-11) github.com/rakudo/rakudo/commit/64...42ff7362a1
moritz m: say "\c[ZERO WIDTH SPACE]"..uniprop('East_Asian_Width'
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3IDTH SPACE]"..uniprop('East_Asian_Width'7⏏5<EOL>
moritz m: say "\c[ZERO WIDTH SPACE]".uniprop('East_Asian_Width')
camelia N
AlexDaniel bisect: old=HEAD~500 say '⽝'.uniprop('East_Asian_Width')
bisectable6 AlexDaniel, Bisecting by output (old=HEAD~500 new=81fcd1b) because on both starting points the exit code is 0 20:42
AlexDaniel, bisect log: gist.github.com/80a642b4bbdac78100...b8b5cd7515
AlexDaniel, (2017-01-31) github.com/rakudo/rakudo/commit/9e...978bd56057
AlexDaniel this is the one
moritz AlexDaniel: I had hoped for something that gives me 0 for zero-width stuff, 1 for regular, and 2 for double-width characters
so only available in 2017.02 20:43
AlexDaniel yup
20:44 BenGoldberg joined 20:46 cibs left 20:47 cibs joined 20:49 andrzejk_ left
AlexDaniel u: ZERO WIDTH 20:49
unicodable6 AlexDaniel, U+200B ZERO WIDTH SPACE [Cf] (​)
AlexDaniel, U+200C ZERO WIDTH NON-JOINER [Cf] (‌)
AlexDaniel, gist.github.com/c24bb2b5ba39d2ff35...68957d2f78
AlexDaniel u: Cf
unicodable6 AlexDaniel, U+00AD SOFT HYPHEN [Cf] (­)
AlexDaniel, U+0600 ARABIC NUMBER SIGN [Cf] (؀)
AlexDaniel, gist.github.com/6394bd21a8c16e78ba...8f00f09cc9 20:50
moritz gist.github.com/moritz/0e1d4968212...b802b68481
in my terminal, the - signs are not aligned :( 20:51
in the browser, they are
AlexDaniel moritz: just wondering, why not .contains ? 20:54
moritz AlexDaniel: because I'm not used to .contains :-)
20:56 Cabanossi left, rindolf left, itaipu left, Cabanossi joined
moritz AlexDaniel: but will replace, thanks 20:59
AlexDaniel moritz: as for character width… you never know! 21:01
m: say ‘⩶’.uniprop('East_Asian_Width')
camelia N
AlexDaniel so this one is neutral, right? What does this even mean… 21:03
“Strictly speaking, it makes no sense to talk of narrow and wide for neutral characters, but because for all practical purposes they behave like Na”
well thank you very much, unicode! But this does not help
21:03 Cabanossi left 21:04 Cabanossi joined
AlexDaniel unicode.org/reports/tr11/ 21:04
TL;DR there's no way to know 21:05
BenGoldberg wonders if it would be a good idea to have a perl6 builtin uniname-like(Str --> Seq). 21:12
Iterating through all unicode points to find the ones which match something seems a bit silly. 21:13
21:13 itcharlie joined, itaipu joined
BenGoldberg Otoh, searching a unicode database file for a specific string, then backing up the beginning of the line and capturing to the end of the line, seems like a much more efficient proposition. 21:14
moritz in some real-life examples, it looks less jagged when I just assume everything is one character wide than when I assume my width() sub is correct 21:15
BenGoldberg: it takes less than two seconds to do search through all character names, so I find that acceptable for my use case 21:16
21:21 itaipu left
moritz I just wrote "codepint" instead of "codepoint". Not a pun I ever made intentionally. 21:24
DrForr Obviously it's your subonscious calling to you. 21:25
*subconscious
moritz given that I drink alcohol roughly once every two or three years, that's highly unlikely :-)
AlexDaniel BenGoldberg: builtin? Why?
BenGoldberg: create a module for it, I'll start using it on the next day 21:26
however, as moritz already mentioned, iterating through all characters is fast enough 21:27
unicodable does it, it's fine
u: POO PILE 21:28
unicodable6 AlexDaniel, U+1F4A9 PILE OF POO [So] (💩)
AlexDaniel not even a second right? :P
though that's obviously cheating, here's a proper test
u: onehusneohusntoahusnteoahu
unicodable6 AlexDaniel, Found nothing!
AlexDaniel ouch… 4 seconds :P
21:31 llfourn joined 21:32 kyan joined 21:36 llfourn left
zengargoyle hey, anybody going to SCALE 15x (the Southern California 21:39
Linux Expo) 21:40
DrForr genehack was just mentioning it on Twitter.
zengargoyle grumbles at irssi for truncating my history buffer...
DrForr: yep, looking forward to meeting genehack 21:41
los angeles perlmongers has a booth so please drop by. (my slot is Sat 10-2) 21:43
DrForr Too late notice for me, but if Fred (Moyer) stops by let hin know I said hi. 21:44
zengargoyle i'll keep an eye out. 21:45
22:10 cschwenz joined 22:15 BenGoldberg left 22:16 wamba left 22:20 BenGoldberg joined 22:26 RabidGravy left 22:33 chinarulezzz joined, llfourn joined 22:35 cschwenz left 22:37 Voldenet left 22:38 llfourn left
BenGoldberg m: class Test { my multi trait_mod<is>(Routine $r, :$testy!) { dd $r.name }; method foo() is testy }; 22:38
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3class Test { my multi trait_mod7⏏5<is>(Routine $r, :$testy!) { dd $r.name
expecting any of:
new name to be defined
BenGoldberg m: class Test { my multi trait_mod:<is>(Routine $r, :$testy!) { dd $r.name }; method foo() is testy };
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3) { dd $r.name }; method foo() is testy 7⏏5};
22:38 chinarulezzz left
BenGoldberg m: class Test { my multi trait_mod:<is>(Routine $r, :$testy!) { dd $r.name }; method foo() is testy {*} }; 22:38
camelia "foo"
BenGoldberg m: class Test { my multi trait_mod:<is>(Routine $r, :$testy!) { dd $r.signature }; method foo(Int) is testy {*} }; 22:39
camelia :(Test $: Int $, *%_)
IOninja no need for `my`; it's the default
BenGoldberg Ok. 22:40
mst your routine is testy? did somebody shit in its cheerios?
22:42 Voldenet joined, Voldenet left, Voldenet joined
BenGoldberg Is there any convenient way of constructing a Signature other than as a literal? 22:44
22:45 lukaramu joined, bjz joined
IOninja A convenient way other than the convenient way? :) 22:46
m: use nqp; say nqp::p6bindattrinvres(Signature.new, Signature, '@!params', nqp::list(class :: is Parameter { method name {'meows'}}.new)) 22:53
camelia (;; meows)
IOninja m: Seq.Bool 22:56
camelia Invocant requires an instance of type Seq, but a type object was passed. Did you forget a .new?
in block <unit> at <tmp> line 1
IOninja Need to go through the codebase and see where we use an only method that shadows the Mu/Any defaults :/
23:00 itcharlie left 23:05 NegrN7 joined 23:06 NegrN7 left 23:08 llfourn joined 23:09 nightfrog left
BenGoldberg m: my constant $foo = 3; dd ++$foo; 23:11
camelia Cannot resolve caller prefix:<++>(Int); the following candidates
match the type but require mutable arguments:
(Mu:D $a is rw)
(Int:D $a is rw)

The following do not match for other reasons:
(Bool $a is rw)
(Mu:U $a is rw)…
BenGoldberg m: my constant $foo = 3; dd $foo;
camelia 3
23:11 cdg joined 23:13 llfourn left 23:15 cdg_ left, cdg left
timotimo MasterDuke: i'm too headachy and tired to work with the code ... can you also put in something that makes every node in the callgraph unique? OSLT? because "id" is really not "uid" 23:18
BenGoldberg m: use nqp; dd nqp::list(); 23:19
camelia ()
BenGoldberg m: use nqp; dd nqp::list().WHAT;
camelia ()
23:19 nightfrog joined 23:20 grumble left 23:25 grumble joined, skids joined
IOninja m: gist.github.com/zoffixznet/c534fbd...3f2f0d779c 23:27
camelia AST
Any
Any
Any
Any
Any
Any
Array
Associative
Attribute
Attribute
Attribute
Attribute
Awaiter::Blocking
Awaiter::Blocking
Backtrace
Backtrace::Frame
Bag
BagHash
Baggy
Blob
Block
Bool
Buf
CX::Done
CX::Emit…
timotimo that's the one that asploded before, aye?
IOninja How does that ^ end up finding X::Syntax::Adverb if I set $level < 1 there? 23:28
Trying to figure out why it seems to hang if I set $level < 2
timotimo: it still does
m: Seq.Bool
camelia Invocant requires an instance of type Seq, but a type object was passed. Did you forget a .new?
in block <unit> at <tmp> line 1
IOninja ^ I just avoided calling that
timotimo m: CORE::.keys.grep('X::').say
camelia ()
timotimo m: CORE::.keys.grep('X').say
camelia (X)
timotimo hm.
m: CORE::X::.keys.say 23:29
camelia (CompUnit NoSuchSymbol Constructor Method Range NotEnoughDimensions Trait EXPORTHOW PseudoPackage Set Sequence Inheritance NYI Pairup IO Package Redeclaration SecurityPolicy OS UnitScope IllegalOnFixedDimensionArray TooManyDimensions PoisonedAlias Proc N…
timotimo m: CORE::X::.keys.grep('Syntax').say
camelia (Syntax)
23:29 espadrine left
IOninja Or stuff like `CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File` which is many levels... 23:30
m: 'CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File'.chars.say
camelia 71
timotimo don't we have a .take that you could use instead of take $_?
IOninja timotimo: nope
timotimo interesting
IOninja It puns so can't take any roles that can't pun
BenGoldberg m: sub foo(Int $bar) { $bar }; use nqp; my $params := nqp::getattr( &foo, List, '$!params' ); my $first := nqp::atpos( $params, 0 ); dd $first;
camelia P6opaque: no such attribute '$!params' in type List when trying to get a value
in block <unit> at <tmp> line 1
timotimo right
IOninja m: Any::Grepper.take
camelia Method 'pull-one' must be implemented by Any::Grepper because it is required by roles: Any::Grepper.
in block <unit> at <tmp> line 1
timotimo that's definitely javascript-style code you got there :P 23:31
IOninja me?
23:31 gdonald_ left 23:32 gdonald_ joined
timotimo having a sub { }(blah) 23:32
maybe i should run this code instead of trying to do it in my head 23:33
while same head is kind of achey
it's doing some very strange things, indeed. 23:36
like digging into all the signal constants a few hundred times each
(not actually hundreds)
probably because each of the enum values has the same WHO that the type itself has 23:37
so it goes through the whole enum whenever it finds a single element of it
IOninja: are you running into a problem where it runs forever?
IOninja Yes, if I set $level < 2 instead of $level < 1 23:38
And I don't get how it manages to get `CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File` when $level < 1 23:39
BenGoldberg m: sub foo(Int $bar = 3) { $bar }; my $first := &foo.signature.params[0]; use nqp; nqp::bindattr( $first, Parameter, '$!default_value', { 42 } ); dd foo(); 23:41
camelia 3
23:41 lep_ left
BenGoldberg m: sub foo(Int $bar = 3) { $bar }; my $first := &foo.signature.params[0]; use nqp; dd nqp::getattr( $first, Parameter, '$!default_value' ); 23:41
camelia 3
23:43 lep-delete joined
BenGoldberg m: sub foo(Int $bar = 3) { $bar }; my $first := &foo.signature.params[0]; use nqp; nqp::bindattr( $first, Parameter, '$!default_value', 42); dd foo(); 23:43
camelia 3
BenGoldberg wonders whether what he's trying is possible.
timotimo i have a theory 23:44
IOninja whatisit?
timotimo digging into PrecompilationUnit at 1
taking CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File
IOninja m: say PrecompilationUnit
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
PrecompilationUnit used at line 1
IOninja m: say $*REPO
timotimo no, allow me
camelia inst#/home/camelia/.perl6
IOninja OK 23:45
m: say $*REPO.^name
camelia CompUnit::Repository::Installation
IOninja m: say CORE::<$*REPO>
camelia Nil
timotimo m: say CORE::('CompUnit')::('PrecompilationUnit')::.keys
camelia Method 'bytecode' must be implemented by CompUnit::PrecompilationUnit because it is required by roles: CompUnit::PrecompilationUnit.
in block <unit> at <tmp> line 1
timotimo whoops :)
m: say CORE::('CompUnit')::('PrecompilationUnit')::WHO.keys
camelia (0)
timotimo m: say CORE::('CompUnit')::('PrecompilationUnit')::.WHO.keys
camelia (File)
timotimo but wait there's more 23:46
m: say CORE::('CompUnit')::('PrecompilationUnit')::('File').^long_name
camelia No such method 'long_name' for invocant of type 'Perl6::Metamodel::ClassHOW'
in block <unit> at <tmp> line 1
timotimo m: say CORE::('CompUnit')::('PrecompilationUnit')::('File').^name
camelia CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File
timotimo there you go (?)
IOninja oh heh
m: say CORE::('CompUnit')::('PrecompilationStore')::('File')::<CompUnit>.WHO.keys 23:47
camelia (Grepper)
IOninja really
m: say CORE::('CompUnit')::('PrecompilationStore')::('File')::<CompUnit>::.WHO.keys
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3ompilationStore')::('File')::<CompUnit>:7⏏5:.WHO.keys
expecting any of:
colon pair
IOninja OK. I think I'll just stick $level < 1 in there and be done with it for now.
It finds all the IO stuff and that's what I need ATM
timotimo well, one important part is this:
m: say CORE::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::('SIGSEGV').name 23:48
camelia No such method 'name' for invocant of type 'Signal'
in block <unit> at <tmp> line 1
timotimo m: say CORE::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::('SIGSEGV').^name
camelia Signal
timotimo you see the problem? :)
IOninja Nope.
timotimo no?
m: say CORE::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::.keys
camelia (0)
timotimo m: say CORE::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::('SIGSEGV').WHO.keys
camelia (SIGINT SIGSEGV SIGTERM SIGTTIN SIGXFSZ SIGEMT SIGFPE SIGIO SIGWINCH SIGURG SIGSTOP SIGTHR SIGHUP SIGILL SIGPROF SIGBREAK SIGTRAP SIGKILL SIGSYS SIGALRM SIGBUS SIGTSTP SIGINFO SIGPIPE SIGCONT SIGCHLD SIGTTOU SIGXCPU SIGVTALRM SIGUSR2 SIGSTKFLT SIGPWR SIG…
IOninja Does it just take ages and not really hang when $level < 2? It's just one more level, I'd think
timotimo imagin ehow long it takes to get through all signals that way 23:49
IOninja Oh OK
timotimo++ thanks
timotimo same for More, Less, Same
and SeekFromEnd and friends
IOninja m: say CORE::('SIGSEGV')::('SIGSEGV').DEFINITE
camelia True
IOninja Yeah, sticking a .DEFINITE lets me use higher levels 23:50
timotimo you want to throw out anything where .HOW.WHAT equals the .HOW.WHAT of any enum you want to use 23:51
IOninja Ah, don't need any levels at all
timotimo it'd be enough to have a seen hash
that's not keyed on paths or names, but on the actual objects
IOninja hmm... 23:54
m: my %hash := :{}; %hash{Mu} = 5;
camelia Cannot resolve caller postcircumfix:<{ }>(:{}, Mu, 5); none of these signatures match:
(\SELF, \key)
(\SELF, \key, Mu \ASSIGN)
(\SELF, \key, Mu :$BIND! is raw)
(\SELF, \key, :$delete!, *%other)
(\SELF, \key, :$exists!, *%oth…
IOninja m: my %hash := :{ Mu => 5};
camelia ( no output )
timotimo heh. 23:55
IOninja :)
timotimo well, use its WHICH :)
m: my %hash; %hash{Mu.WHICH} = 5; say %hash
camelia {Mu|U40058776 => 5}
timotimo m: my %hash; %hash{Mu.WHAT.WHICH} = 5; say %hash
camelia {Mu|U13885336 => 5}
BenGoldberg m: my %hash := :{}; %hash.push: Mu => 5; dd %hash;
camelia :{}
timotimo that's a named argument
IOninja m: my %hash := :{}; %hash.push: (Mu) => 5; dd %hash; 23:56
timotimo m: my %hash := :{}; %hash.push: (Mu) => 5; dd %hash;
camelia Type check failed in binding to key; expected Any but got Mu (Mu)
in block <unit> at <tmp> line 1
timotimo haha :D
BenGoldberg m: my %hash := :{}; %hash.push: Pair.new(Mu, 5); dd %hash;
camelia Type check failed in binding to key; expected Any but got Mu (Mu)
in block <unit> at <tmp> line 1
BenGoldberg m: my %hash := :{}; %hash.push: item Mu => 5; dd %hash;
camelia Trailing item in Hash[Mu,Any].push
in block <unit> at <tmp> line 1
:{}
timotimo well, an object hash is with Any keys 23:57
m: my %hash := Hash[Mu,Mu].new(); %hash.push: (Mu) => 5; dd %hash
camelia (my Mu %{Mu} = (Mu) => 5)
timotimo there you go
MasterDuke timotimo: what do you mean "every node in the callgraphe unique"? you mean something like give every table a new autoincrementing primary key?
IOninja Ohhh
BenGoldberg m: my %hash := :{}; %hash.push: item Failure.new('blah') => 5; dd %hash;
camelia :{(Failure.new(exception => X::AdHoc.new(payload => "blah"), backtrace => Backtrace.new)) => 5}
timotimo not every table
at the moment you can have many entries in callees where "id" matches
anyway, i'm not so sure you can properly reconstruct the call graph just from the sql 23:58
IOninja m: gist.github.com/zoffixznet/635a974...b39d9d707f 23:59
camelia AST
Any
Array
Associative
Attribute
Awaiter::Blocking
Backtrace
Backtrace::Frame
Bag
BagHash
Baggy
Blob
Block
Bool
Buf
CX::Done
CX::Emit
CX::Last
CX::Next
CX::Proceed
CX::Redo
CX::Return
CX::Succeed
CX::Take…
IOninja I call that a win. timotimo++