Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-25

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 pyrimidine joined #perl6
00:02 llfourn joined #perl6
00:02 cpage_ joined #perl6
00:06 IOninja so quiet...
00:06 * IOninja blasts https://www.youtube.com/watch?v=09U69zGLXwE full volume
00:06 IOninja 🤘🤘🤘
00:26 b2gills joined #perl6
00:37 IOninja m: say (^3, [^3])».Numeric
00:37 camelia rakudo-moar 3de7b0: OUTPUT: «((0 1 2) [0 1 2])␤»
00:37 IOninja burnt myself a bit.
00:37 IOninja m: say (^3, [^3]).map: *.Numeric
00:37 camelia rakudo-moar 3de7b0: OUTPUT: «(3 3)␤»
00:38 cibs joined #perl6
00:38 IOninja Kinda want some sort of non-nodal, non-autothreaded, single-char version of .map: *.some-method
00:39 IOninja say (^3, [^3])⏩.Numeric
00:40 IOninja say (^3, [^3])⤏.Numeric
00:43 wamba joined #perl6
00:50 gk_-1wm_- joined #perl6
00:50 gk_-1wm_- left #perl6
00:51 bjz joined #perl6
00:51 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 rakudo-moar 3de7b0: OUTPUT: «(3 3)␤»
00:52 * IOninja packs this up into a module
00:53 IOninja gonna call it "M"
00:53 IOninja 1-letter "Map" <=> 1-char .map
00:58 IOninja is it somehow possible to add a sub that would be visible everywhere?
00:58 IOninja 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 #perl6
01:02 aborazmeh joined #perl6
01:04 ugexe i've wanted something like that, but one step further - perl6 -Me 'use MONKEY-TYPING; #`do bad things`'
01:04 ugexe perl6 -Me 'use MONKEY-TYPING; #`do bad things`' script.pl6
01:08 bjz_ joined #perl6
01:12 IOninja m: use nqp; QAST::Block.new
01:12 camelia rakudo-moar 3de7b0: OUTPUT: «Could not find symbol '&Block'␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
01:13 IOninja We can't use QAST stuff in userspace at all?
01:13 llfourn you have to do the use differently...one sec
01:14 llfourn use QAST:from<NQP>;
01:14 IOninja m: use QAST:from<NQP>; say QAST::Block.new.^name
01:14 camelia rakudo-moar 3de7b0: OUTPUT: «QAST::Block␤»
01:14 IOninja llfourn++ thanks
01:14 llfourn :)
01:25 pyrimidine joined #perl6
01:29 IOninja Well, I guess it is possible to add a sub to CORE::, since $*W is available in BEGIN
01:48 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 rakudo-moar 3de7b0: OUTPUT: «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␤»
01:48 IOninja *sigh*
01:48 * IOninja gives up for now
01:49 ZzZombo_ joined #perl6
01:49 ZzZombo_ joined #perl6
01:53 dj_goku joined #perl6
01:58 aborazmeh joined #perl6
01:58 aborazmeh joined #perl6
02:00 mcmillhj joined #perl6
02:04 bjz joined #perl6
02:13 imcsk8_ joined #perl6
02:14 gk_-1wm joined #perl6
02:22 cdg joined #perl6
02:34 bjz joined #perl6
02:40 todd joined #perl6
02:40 todd Hi All,  I have been looking at http://perl6maven.com/introduction-to-perl6-screencast-arrays
02:41 IOninja \o
02:41 todd seems to me that I am quoting the guy.  What is wrong with
02:41 IOninja Are you Todd?
02:46 todd Yes, I am Todd.  Also known as "His Resplendances", but yo can call me "T" for short.
02:46 todd perl6 -e 'my @x = ('abc', 'def'); say @x;'
02:46 todd ===SORRY!=== Error while compiling -e Undeclared routines:     abc used at line 1. Did you mean 'abs'?     def used at line 1
02:46 IOninja todd: shell quoting
02:46 todd which means?
02:46 todd Oh I get it
02:46 timotimo you're sending my @x = (abc, def); say @x; to perl6 as code
02:46 timotimo because ' belongs to the shell
02:46 IOninja perl6 -e 'my @x = (‘abc’, ‘def’); say @x;'
02:46 todd perl6 -e "my @x = ('abc', 'def'); say @x;"
02:46 gk-------1__w__m joined #perl6
02:46 gk-------1__w__m left #perl6
02:46 todd fixes it
02:46 IOninja Unless you're on Windows, your milage with that will vary
02:46 IOninja by which I mean it'll often be zero :)
02:46 IOninja 'cause shell vars get interpolated
02:46 IOninja You can /msg camelia to run one liners or use the REPL (just run `perl6` with no args to start it)
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:48 IOninja remove parentheses
02:48 todd ah poop.  Did it again.  "push(" fixed it.  Thank you!
02:48 IOninja buggable: eco Slang::Tuxic
02:48 buggable IOninja, Slang::Tuxic 'allows to call subs as: foo (args)': https://github.com/FROGGS/p6-Slang-Tuxic
02:49 todd works without any paranthisis too.  Thank you!
02:50 todd I take that back
02:51 Geth ¦ ecosystem: 28749e7295 | (Zoffix Znet)++ | META.list
02:51 Geth ¦ ecosystem: Add M to the ecosystem
02:51 Geth ¦ ecosystem:
02:51 Geth ¦ ecosystem: M, the 1-character Map: non-nodal, non-autothreading .map(*.some-method):
02:51 Geth ¦ ecosystem: https://github.com/zoffixznet/perl6-M
02:51 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/28749e7295
02:51 IOninja @Report.push: "Completed with $ErrorCount errors\n"; works too
02:53 todd cool.  thank you!
02:54 todd what is wrong with this?
02:54 IOninja with... ?
02:54 todd for @Report -> my $Line { $StringFullOfLineFeeds .= ( "$Line" ~ "\n" ); }
02:54 todd Invalid typename 'my' in parameter declaration.
02:54 IOninja todd: don't use `my`
02:54 IOninja and those parentheses aren't needed
02:55 IOninja Death to parentheses!
02:55 todd dang!
02:55 IOninja Don't need the quotes around the variable either
02:55 IOninja this works too:  for @Report { $StringFullOfLineFeeds .= "$^Line\n"; }
02:56 pyrimidine joined #perl6
02:56 todd Thank you!
02:57 todd for @Report -> $Line { $StringFullOfLineFeeds .=( "$Line" ~ "\n" ); }
02:57 yadzi joined #perl6
02:57 todd No such method 'Completed with 0 errors  ' for invocant of type 'Any'   in sub eMailReport at CimTrakCheckAndResatart.pl6 line 65
02:57 todd what now?
02:57 IOninja Death to parentheses!
02:58 todd where this time?
02:58 IOninja ( "$Line" ~ "\n" )
02:58 IOninja or put a space before it
02:58 Actualeyes joined #perl6
02:58 yadzi joined #perl6
02:58 todd not catching it
02:59 IOninja for @Report -> $Line { $StringFullOfLineFeeds .= ( "$Line" ~ "\n" ); }
02:59 IOninja ^ note .it's now '.= (' and not '.=('
02:59 todd hi yadzi, we talk a lot on the mailing list!
02:59 IOninja Oh oops
02:59 IOninja I lie
02:59 IOninja Sorry :)
02:59 IOninja todd: It's ~= in Perl 6, not .=
03:01 IOninja .= is a method call
03:01 todd mumble.  That fixed it.  Thank you!
03:01 IOninja m: my $x = 'meows'; $x .= uc; say $x
03:01 camelia rakudo-moar 3de7b0: OUTPUT: «MEOWS␤»
03:01 IOninja m: my $x = 'meows'; $x .= uc .= flip; say $x
03:01 camelia rakudo-moar 3de7b0: OUTPUT: «SWOEM␤»
03:01 todd Interesting!
03:04 todd Net::SMTP  anyone know the syntax to pass multiple eMail address in "To"?
03:04 todd comma seperated did not work
03:05 IOninja Based on the docs, I'd say pass them as a Positional
03:05 IOninja <foo@bar.com  meow@meow.com>
03:05 IOninja ['foo@bar.com',  'meow@meow.com']
03:05 IOninja etc
03:06 todd a space and no comma?
03:06 IOninja Correct.
03:06 IOninja That's like qw/foo@bar.com  meow@meow.com/ in Perl 5 (except I think it'd whine about '@' won't it?)
03:07 todd Bad to address:  The following address failed to send:
03:07 IOninja Ah, no works.
03:07 hobbs no, qw is non-interpolating :)
03:07 IOninja It's the '#' it complains about :P
03:07 IOninja m: sub ($to) { for $to.list { .say } }( <foo@bar.com  meow@meow.com> )
03:07 camelia rakudo-moar 3de7b0: OUTPUT: «foo@bar.com␤meow@meow.com␤»
03:08 IOninja todd: reading its code and it should work...
03:08 IOninja Does it work when you use the addresses one at a time?
03:09 todd that worked.  Wow.  That was obscure!
03:09 IOninja huh?
03:09 IOninja What worked? Sending one at a time? Well, it should work sending several at the same time with <foo@bar.com  meow@meow.com>
03:10 todd address1\naddress2
03:10 todd worked
03:10 IOninja :S
03:10 todd placing "\n" between the addresses as a delimiter
03:11 IOninja By <foo@bar.com  meow@meow.com> I meant literally, not a string
03:11 todd and they are showing up in my eMail too
03:11 IOninja m: dd <foo@bar.com  meow@meow.com>
03:11 camelia rakudo-moar 3de7b0: OUTPUT: «("foo\@bar.com", "meow\@meow.com")␤»
03:11 IOninja ^ it makes a two-item list of strings
03:12 todd thank you!  Got to go!
03:12 IOninja \o
03:13 IOninja it just ends up sending raw "RCPT TO:$address"
03:13 IOninja with newlines in it
03:23 llfourn joined #perl6
03:24 noganex joined #perl6
03:25 aborazmeh joined #perl6
03:25 aborazmeh joined #perl6
03:30 kurahaupo joined #perl6
03:38 Khisanth joined #perl6
03:39 Geth ¦ routine-map/master: 4 commits pushed by (Zoffix Znet)++
03:39 Geth ¦ routine-map/master: 974b2aa3bf | Exclude apostrophe in internal sub name detection
03:39 Geth ¦ routine-map/master: d6b67e5327 | Workaround for SEGV
03:39 Geth ¦ routine-map/master: d3109a1da8 | Add button to repo
03:39 Geth ¦ routine-map/master: 1dc813c433 | use ascending default sort on name
03:39 Geth ¦ routine-map/master: review: https://github.com/perl6/routine-map/compare/ee7fb894bc...1dc813c433
03:42 kent\n joined #perl6
03:42 dj_goku joined #perl6
03:43 IOninja wonder why it included `master` branch name :S
03:43 IOninja Oh it just always does it in this format.
03:44 Geth ¦ routine-map: fc1ae3201d | (Zoffix Znet)++ | bin/viewer.p6
03:44 Geth ¦ routine-map: Add missing CSS selector
03:44 Geth ¦ routine-map: review: https://github.com/perl6/routine-map/commit/fc1ae3201d
03:50 * IOninja eyes src/core/IO/Spec/QNX.pm
03:50 IOninja never heard of that OS...
03:50 IOninja no free version? Would've loved to run tests on it...
04:18 samcv qnx never heard of it
04:18 samcv looked it up. seems for embedded things mostly?
04:18 samcv not too much info on the site
04:19 Actualeyes joined #perl6
04:22 IOninja looks like they offer free licenses for educational purposes. Need to sign up for an account and accept all terms tho
04:23 nightfrog joined #perl6
04:25 geekosaur qnx is a realtime OS with a (now I think deprecated) POSIX API and a native RT API
04:25 astj joined #perl6
04:26 IOninja What's RT API?
04:26 geekosaur "realtime"
04:26 IOninja Thanks.
04:26 geekosaur as in, guaranteed response time scheduling (this is indeed most useful in embedded contexts)
04:27 geekosaur necessary for things like CNC (industrial control systems), train switching, etc.
04:28 IOninja oops... map.perl6.party is missing all the types that have `::` in their names. OOps :S
04:29 IOninja m: say CORE::<IO>.keys
04:29 camelia rakudo-moar 3de7b0: OUTPUT: «()␤»
04:29 IOninja m: say CORE::<IO::ArgFiles>
04:29 camelia rakudo-moar 3de7b0: OUTPUT: «Nil␤»
04:29 IOninja how u do dis
04:29 IOninja m: say CORE::<IO>::.keys
04:29 camelia rakudo-moar 3de7b0: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say CORE::<IO>:7⏏5:.keys␤    expecting any of:␤        colon pair␤»
04:30 IOninja m: say CORE::IO::.keys
04:30 camelia rakudo-moar 3de7b0: OUTPUT: «(Handle Dir File Notification Path Local Pathy Pipe Socket Special ArgFiles Spec)␤»
04:30 IOninja Ahh
04:30 TimToady m: say IO::.keys
04:30 camelia rakudo-moar 3de7b0: OUTPUT: «(Handle Dir File Notification Path Local Pathy Pipe Socket Special ArgFiles Spec)␤»
04:31 TimToady IO is already in CORE :P
04:31 TimToady or should I say, you're already in CORE
04:31 IOninja How can I programmatically look it up tho?
04:31 IOninja m: say ::('CORE::IO::').keys
04:31 camelia rakudo-moar 3de7b0: OUTPUT: «(0)␤»
04:32 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:34 TimToady m: say CORE::<IO>.WHO.keys
04:34 camelia rakudo-moar 3de7b0: OUTPUT: «(Handle Dir File Notification Path Local Pathy Pipe Socket Special ArgFiles Spec)␤»
04:34 IOninja Ah. Thanks
04:37 aborazmeh joined #perl6
04:37 aborazmeh joined #perl6
04:45 dj_goku joined #perl6
04:52 Cabanoss- joined #perl6
04:59 ZzZombo Great: Too many positionals passed; expected 1 argument but got 2
04:59 ZzZombo in method root at I:\Developer\Perl\VDF\lib\.precomp\98EAEE29307DC37D4338EA65C19B9FA6D589C4AA.1485800890.21532\11\115941A6FC88ECE1A178278587E96C028C0B56B9 line 1
04:59 ZzZombo How am I supposed to figure the error location out of that?
05:00 IOninja e: https://gist.github.com/zoffixznet/8ae188e136ccace378ca5d88bbc27685
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.
05:00 IOninja evalable6: you're dumb
05:00 evalable6 IOninja, rakudo-moar 3de7b08: OUTPUT«(exit code 1) ===SORRY!=== Error while compiling /tmp/kdIAJF6IfH␤Undeclared routines:␤    dumb used at line 1. Did you mean 'DUMP'?␤    you're used at line 1␤»
05:00 IOninja e: https://gist.githubusercontent.com/zoffixznet/8ae188e136ccace378ca5d88bbc27685/raw/77385b2f96a8a6d1fbf0d723f92508b6b66c917f/p6.p6
05:00 evalable6 IOninja, Successfully fetched the code from the provided URL.
05:00 evalable6 IOninja, rakudo-moar 3de7b08: OUTPUT«(exit code 1) --------------␤&infix:<+|>␤sub infix:<+|> (Mu $?, Mu $?) { #`(Sub+{<anon|7836492…»
05:00 evalable6 IOninja, Full output: https://gist.github.com/671cb0cbb9192aa56bd9760a3e641882
05:00 mcmillhj joined #perl6
05:01 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:02 IOninja m: Mix.so
05:02 camelia rakudo-moar 3de7b0: OUTPUT: «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␤␤»
05:02 IOninja well, dammit... Sure! Figure it out right after asking -_-
05:03 IOninja ZzZombo: as I've said before. We can't fix issues we don't know about it. Report it.
05:06 IOninja huggable: rakudobug
05:06 huggable IOninja, Report bugs by emailing to rakudobug@perl.org
05:09 dj_goku_ joined #perl6
05:10 llfourn_ joined #perl6
05:10 john51 joined #perl6
05:11 user10 joined #perl6
05:12 shmibs_ joined #perl6
05:12 [particle]1 joined #perl6
05:12 ZzZombo_ joined #perl6
05:13 obfusk_ joined #perl6
05:13 ZzZombo__ joined #perl6
05:13 ZzZombo__ joined #perl6
05:14 _kristia1 joined #perl6
05:14 Woodi_ joined #perl6
05:14 bartolin_ joined #perl6
05:14 lep_ joined #perl6
05:14 effbiai_ joined #perl6
05:14 effbiai_ joined #perl6
05:14 cibs_ joined #perl6
05:14 lucs_ joined #perl6
05:14 Hor|zon__ joined #perl6
05:14 notostraca joined #perl6
05:14 nine_ joined #perl6
05:14 rjbs- joined #perl6
05:14 ilbelkyr_ joined #perl6
05:14 tinita_ joined #perl6
05:14 Shozan joined #perl6
05:14 diakopte1 joined #perl6
05:14 obra_ joined #perl6
05:14 sivoais_ joined #perl6
05:14 xiaomiao joined #perl6
05:14 perlpilot_ joined #perl6
05:14 neady joined #perl6
05:14 profan_ joined #perl6
05:15 broquain1 joined #perl6
05:15 sQuEE` joined #perl6
05:15 erdic_ joined #perl6
05:15 stux|RC-only joined #perl6
05:16 IOninja weeeeeeeeeee
05:17 raydiak joined #perl6
05:17 araujo joined #perl6
05:17 araujo joined #perl6
05:17 cpage_ joined #perl6
05:17 gabiruh joined #perl6
05:17 Actualeyes joined #perl6
05:18 ccakes joined #perl6
05:18 k-man joined #perl6
05:18 risou_awy joined #perl6
05:18 drrho joined #perl6
05:18 aborazmeh joined #perl6
05:18 aborazmeh joined #perl6
05:18 b2gills joined #perl6
05:19 wcummings joined #perl6
05:19 eater joined #perl6
05:20 john51 joined #perl6
05:21 pecastro joined #perl6
05:21 zengargoyle joined #perl6
05:21 telex joined #perl6
05:22 ggherdov joined #perl6
05:23 PotatoGim joined #perl6
05:23 mrsolo joined #perl6
05:24 sivoais joined #perl6
05:25 timeless joined #perl6
05:26 ggherdov joined #perl6
05:27 ggherdov joined #perl6
05:28 SCHAAP137 joined #perl6
05:38 cpage__ joined #perl6
05:41 drrho_ joined #perl6
05:42 b2gills joined #perl6
05:42 telex joined #perl6
05:59 mr-foobar joined #perl6
06:00 rurban joined #perl6
06:04 ZzZombo where are the specs for the <> syntax that makes for $cont<> work?
06:05 IOninja "specs"?
06:05 ZzZombo yes? that makes that treat $cont as Iterable and not scalar?
06:05 ZzZombo what*
06:06 CIAvash joined #perl6
06:15 bjz joined #perl6
06:16 gdonald joined #perl6
06:21 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 rakudo-moar e8af85: OUTPUT: «((a (0)) (b (1)) (c (2)) (d (3)))␤»
06:22 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 ?
06:22 samcv like [+] but hyper?
06:22 Woodi_ hallo today :)
06:22 IOninja the goal is ((a (0)) (b (1)) (c (2)) (d (3)) (4) (5) (6) (7) (8) (9))
06:24 IOninja m: my $f = 2; my @slow = <a b c d>; my @files = ^10; say @slow Z @files.batch: 2
06:24 camelia rakudo-moar e8af85: OUTPUT: «((a (0 1)) (b (2 3)) (c (4 5)) (d (6 7)))␤»
06:24 Woodi_ looks like right join with slipping NULLs :)
06:24 IOninja and here it'd be ((a (0 1)) (b (2 3)) (c (4 5)) (d (6 7)) (8 9))
06:24 IOninja don't care about proper structure; it all gets flattened in the end
06:25 Seym0ur joined #perl6
06:26 Seym0ur left #perl6
06:28 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 rakudo-moar e8af85: ( no output )
06:28 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
06:28 camelia rakudo-moar e8af85: OUTPUT: «[(a (0 1)) (b (2 3)) (c (4 5)) (d (6 7)) 4 5 6 7 8 9]␤»
06:28 samcv not quite
06:28 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
06:28 camelia rakudo-moar e8af85: OUTPUT: «[a 0 1 b 2 3 c 4 5 d 6 7]␤»
06:28 pyrimidine joined #perl6
06:29 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 rakudo-moar e8af85: OUTPUT: «[a 0 1 b 2 3 c 4 5 d 6 7]␤»
06:30 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 rakudo-moar e8af85: OUTPUT: «[a 0 1 b 2 3 c 4 5 d 6 7 8 9]␤»
06:30 IOninja samcv++
06:30 samcv :)
06:30 samcv wait what does subtracting arrays do
06:30 samcv hah
06:31 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
06:31 camelia rakudo-moar e8af85: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "-" in expression "@other - @files" in sink context (line 1)␤»
06:31 samcv m: my @files = 1,2,3; my @other = 1,2,3; say @other - @files
06:31 camelia rakudo-moar e8af85: OUTPUT: «0␤»
06:31 samcv like perl 5 then
06:31 samcv got it
06:40 pyrimidine joined #perl6
06:41 Actualeyes joined #perl6
07:01 rurban joined #perl6
07:02 masak m: my @our-apples = "apple" xx 3; my @my-apples = "apple" xx 5; say @our-apples - @my-apples
07:02 camelia rakudo-moar cdc71c: OUTPUT: «-2␤»
07:02 masak morning, #perl6
07:02 cibs joined #perl6
07:03 gfldex m: my @our-apples = "apple" xx 3; my @my-peaches = "peach" xx 5; say @our-apples - @my-peaches
07:03 camelia rakudo-moar cdc71c: OUTPUT: «-2␤»
07:15 tardisx joined #perl6
07:30 toolforger joined #perl6
07:31 toolforger m: say Inf - Inf
07:31 camelia rakudo-moar cdc71c: OUTPUT: «NaN␤»
07:31 samcv m: say NaN - NaN
07:31 camelia rakudo-moar cdc71c: OUTPUT: «NaN␤»
07:31 samcv :P
07:31 toolforger just checking some edge cases :-)
07:31 toolforger e.g.
07:32 toolforger m: say 0/0
07:32 camelia rakudo-moar cdc71c: OUTPUT: «Attempt to divide by zero using div␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
07:32 toolforger erm
07:32 toolforger m: say 0.0/o.0
07:32 camelia rakudo-moar cdc71c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call␤at <tmp>:1␤------> 3say 0.0/o.7⏏0␤»
07:32 toolforger dammit
07:32 toolforger m: say 0.0/0.0
07:32 camelia rakudo-moar cdc71c: OUTPUT: «Attempt to divide by zero using div␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
07:32 toolforger Heh. That's a deviation from ieee rules
07:34 toolforger Ah right
07:34 toolforger m: say <0/0>.Num
07:34 camelia rakudo-moar cdc71c: OUTPUT: «NaN␤»
07:35 toolforger Not sure what's going on, I don't know what the angle brackets and the .Num suffix actually do
07:38 toolforger m: NaN == NaN
07:38 camelia rakudo-moar cdc71c: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "==" in expression "NaN == NaN" in sink context (line 1)␤»
07:38 toolforger m: say NaN == NaN
07:38 camelia rakudo-moar cdc71c: OUTPUT: «False␤»
07:38 toolforger m: say NaN === NaN
07:38 camelia rakudo-moar cdc71c: OUTPUT: «True␤»
07:38 toolforger good.
07:42 rindolf joined #perl6
07:47 samcv m: say - NaN
07:47 camelia rakudo-moar cdc71c: OUTPUT: «NaN␤»
07:56 andrzejk_ joined #perl6
07:59 darutoko joined #perl6
08:03 ZzZombo_ joined #perl6
08:03 ZzZombo_ joined #perl6
08:04 ZzZombo_ joined #perl6
08:05 ZzZombo_ joined #perl6
08:21 pyrimidine joined #perl6
08:38 pyrimidine joined #perl6
08:44 hchienjo joined #perl6
08:44 hchienjo Hello everyone.
08:44 mxco86 joined #perl6
09:05 andrzejk_ joined #perl6
09:06 toolforger left #perl6
09:07 samcv hello hchienjo
09:09 hchienjo Was wondering, where should the tests for iterable.sort live in? S32-list?
09:10 hchienjo samcv: In relation to this issue: https://github.com/perl6/roast/issues/230
09:10 xtreak joined #perl6
09:10 samcv yeah?
09:13 RabidGravy joined #perl6
09:16 hchienjo samcv: Thanks.
09:17 samcv oh where they should go, sorry didn't see that message, i'm blind
09:17 samcv sorry :) let me tell you
09:17 samcv sec
09:19 samcv should be in S07
09:19 samcv maybe hold on
09:20 samcv yeah i'd say 32 is fine. since things were revised in the GLR
09:20 samcv it should probably go in 32
09:21 wamba joined #perl6
09:21 samcv if you want to contribute I would create a new test file just for the flat method and the flat routine
09:23 samcv hchienjo, any more questions?
09:24 sena_kun joined #perl6
09:24 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 #perl6
09:25 samcv and if you want to add the new test for running `make spectest` edit /t/spectest.data and add it
09:25 samcv this is in the rakudo not the roast repo
09:29 hchienjo samcv: Right on time, I already have cloned rakudo and was about to test.
09:29 samcv :)
09:37 hchienjo samcv: What if I want to run a test of a specific file first? Before running for the whole test suite?
09:37 samcv make t/spec/s99-blah/file.t
09:38 DarthGandalf joined #perl6
09:42 yadzi joined #perl6
09:43 hchienjo samcv: Awesome. Thanks.
09:48 hchienjo is brokenchicken: Zoffix?
09:49 yadzi joined #perl6
09:49 sena_kun hchienjo, yep. And IOninja too.
10:01 hchienjo sena_kun: Oh, I got used to seeing some names here. It has been a while.
10:04 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:06 araraloren joined #perl6
10:06 gdonald joined #perl6
10:07 araraloren afternoon, #Perl 6
10:33 hchienjo joined #perl6
10:39 RabidGravy boom!
10:40 bjz joined #perl6
10:41 pyrimidine joined #perl6
10:42 samcv zoffix, nobody is in this channel by that name :P you seem to be confused
10:46 bjz joined #perl6
11:02 yusrideb joined #perl6
11:04 mrdside___ joined #perl6
11:19 cibs joined #perl6
11:30 lukaramu joined #perl6
11:44 ZzZombo what is this:
11:44 ZzZombo $res.=" $_" if $section.condition -> $_;
11:44 ZzZombo Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'.
11:44 ZzZombo at I:\Developer\Perl\VDF\lib\Grammar\VDF.pm6 (Grammar::VDF):206
11:44 ZzZombo ------>                         $res.=" $_"<HERE> if $section.condition -> $_;
11:44 ZzZombo ?
11:45 eroux joined #perl6
11:46 itcharlie joined #perl6
11:47 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?
11:47 ZzZombo aw, P5 strikes again
11:47 RabidGravy ah, yes if you meant a string operation then waht sena_kun said
11:50 RabidGravy but
11:50 RabidGravy m: my Version $v;  given "new" { $v .="$_"() }; say $v.perl; # for example
11:50 camelia rakudo-moar fafe66: OUTPUT: «Version.new␤»
11:51 RabidGravy which is why you are getting the error message that you are
11:52 ZzZombo ya, I mixed up P5 and P6.
11:53 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:54 RabidGravy this is exacerbated by on any given day being exposed to Scala or Javascript
11:55 bjz_ joined #perl6
11:59 RabidGravy also I am sorely tempted to "fix" Perl 5 to support  $foo->?method
12:05 Actualeyes joined #perl6
12:19 espadrine joined #perl6
12:31 pyrimidine joined #perl6
12:32 ZzZombo joined #perl6
12:42 pyrimidine joined #perl6
12:51 mr-foobar joined #perl6
12:52 andrzejk_ joined #perl6
12:55 setty1 joined #perl6
12:55 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:56 timotimo is JSON::Fast not fast enough?
12:57 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?
12:58 timotimo 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:59 timotimo apache avro, eh?
12:59 firefish5000 joined #perl6
12:59 ZzZombo I have a different format, not one of those widely used.
13:00 timotimo oh, so you're forced to comply with a given format
13:00 timotimo i didn't realize that
13:00 llfourn_ ZzZombo: just recursively walk your data structure and return objects after visiting each node.
13:00 timotimo llfourn_: that's not fast :)
13:01 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 #perl6
13:01 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.
13:01 timotimo though i have no idea why something would "hang" with more than "a few elements"
13:01 timotimo i did not notice that
13:01 timotimo you probably infinitely recursed instead of making progress
13:02 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 #perl6
13:02 ZzZombo ulimit?
13:02 timotimo yup, check out ulimit -a
13:03 timotimo watch out, though, the "maximum resident set size" option is usually not implemented
13:06 ZzZombo that's for Unix though, isn't it?
13:08 timotimo oh, you're on windows?
13:09 ZzZombo yep
13:09 moritz you could use Perl 6 in docker, and define some resource limits on the docker level
13:09 timotimo how well does docker work on windows?
13:09 * llfourn_ doubts the computer is hanging because of FDs
13:10 timotimo and can you use ulimit on "ubuntu on windows10"?
13:12 llfourn_ docker should work pretty well on windows. It uses HyperV now from what I heard.
13:13 sammers joined #perl6
13:25 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)
13:25 IOninja m: my $x = 'meows'; $x .= 'uc'() .= 'flip'(); say $x
13:25 camelia rakudo-moar b283e5: OUTPUT: «SWOEM␤»
13:26 moritz firefish5000: a {} block delimits longest-token matching
13:26 moritz so it's legitimate that it can affect outcomes
13:27 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:28 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?
13:28 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
13:29 moritz firefish5000: <plug type="blatnat">the grammar chapter of https://leanpub.com/perl6 might interest you</plug>
13:30 moritz (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
13:30 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 #perl6
13:33 llfourn_ m: "foo" ~~ /$<a>=.*|$<b>=foo/; say ?$/<a>
13:33 camelia rakudo-moar b283e5: OUTPUT: «True␤»
13:34 llfourn_ m: "foo" ~~ /{} $<a>=.*|$<b>=foo/; say ?$/<a>
13:34 camelia rakudo-moar b283e5: OUTPUT: «False␤»
13:34 llfourn_ firefish5000: ^demo :)
13:34 bjz_ joined #perl6
13:37 rurban1 joined #perl6
13:48 ZzZombo_ joined #perl6
13:48 ZzZombo_ joined #perl6
13:51 xtreak joined #perl6
13:52 kurahaupo joined #perl6
13:53 ZzZombo joined #perl6
13:53 ZzZombo joined #perl6
13:55 gdonald joined #perl6
13:56 ZzZombo Hmm, how do I make useful error messaging in grammars?
13:57 dalek joined #perl6
14:01 moritz ZzZombo: https://perlgeek.de/blog-en/perl-6/2017-007-book-parse-errors.html
14:01 pyrimidine joined #perl6
14:01 bjz joined #perl6
14:03 IOninja s: <.5>, 'FatRat', \()
14:03 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/b283e52/src/core/Rat.pm#L4
14:03 IOninja m: dd <4.9999999999999999999999999999>
14:03 camelia rakudo-moar 0be724: OUTPUT: «RatStr.new(<49999999999999999999999999999/10000000000000000000000000000>, "4.9999999999999999999999999999")␤»
14:05 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 AlexDaniel joined #perl6
14:05 IOninja m: dd Rat.new(49999999999999999999999999999, 10000000000000000000000000000).FatRat
14:05 camelia rakudo-moar 0be724: OUTPUT: «FatRat.new(49999999999999999999999999999, 10000000000000000000000000000)␤»
14:05 IOninja basically ^ that's what it does
14:10 IOninja m: dd 0e0+val 17 ~ '0' x 307 ~ '.0'
14:10 camelia rakudo-moar 0be724: OUTPUT: «Inf␤»
14:11 IOninja m: dd 0e0+Rat.new: (17 ~ '0' x 307 ~ '').Int, 1
14:11 camelia rakudo-moar 0be724: OUTPUT: «Inf␤»
14:11 IOninja m: dd 0e0+Rat.new: (17 ~ '0' x 305 ~ '').Int, 1
14:11 camelia rakudo-moar 0be724: OUTPUT: «1.7e+306␤»
14:11 IOninja m: dd 0e0+Rat.new: (17 ~ '0' x 306 ~ '').Int, 1
14:11 camelia rakudo-moar 0be724: OUTPUT: «Inf␤»
14:12 IOninja And looks our Rat.Num algo is busted. Supposed to return a proper number up-to ~1.7e308
14:15 IOninja (Rational.Num)
14:26 itaipu joined #perl6
14:28 gdonald_ joined #perl6
14:32 IOninja m: Int.abs
14:32 camelia rakudo-moar 0be724: OUTPUT: «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␤␤»
14:32 IOninja .oO( so much for undef == 0 thing... )
14:32 IOninja Let's toss it in 6.d :}
14:33 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 rakudo-moar 0be724: OUTPUT: «((a A) (b B) (c C))␤((a A) (b B) (c C) (D))␤»
14:34 IOninja doh
14:35 IOninja b2gills++ indeed I did
14:35 b2gills I regularly forget about it too, along with ff and fff
14:37 timotimo we really need a ffs infix operator that does something appropriate
14:44 lichtkind_ joined #perl6
14:47 llfourn joined #perl6
14:51 kurahaupo joined #perl6
14:52 ChoHag joined #perl6
15:02 itcharlie left #perl6
15:03 ZzZombo moritz, many thanks!
15:11 llfourn joined #perl6
15:25 ZzZombo how could I escape a string so it would be displayed with metacharacters shown as \n or \t?
15:26 IOninja m: "\t \n".perl.say
15:26 camelia rakudo-moar 0be724: OUTPUT: «"\t \n"␤»
15:28 ZzZombo that will also tinker with "
15:30 ZzZombo yea, it quotes the whole string, and escapes quotes inside it.
15:32 MasterDuke joined #perl6
15:32 IOninja What are metacharacters?
15:32 MasterDuke ZzZombo: have you looked at https://docs.perl6.org/language/quoting?
15:33 MasterDuke https://docs.perl6.org/language/quoting
15:33 AlexDaniel MasterDuke: I think he wants it other way round
15:33 MasterDuke ah, wasn't exactly sure what was being asked
15:35 AlexDaniel e: ‘␉ ␤’.trans((“\n”, “\t”) => (「\n」, 「\t」))
15:35 evalable6 AlexDaniel, rakudo-moar 0be7247: OUTPUT«»
15:35 AlexDaniel oops :)
15:35 AlexDaniel e: say ‘␉ ␤’.trans((“\n”, “\t”) => (「\n」, 「\t」))
15:35 evalable6 AlexDaniel, rakudo-moar 0be7247: OUTPUT«␉ \n»
15:35 AlexDaniel ah, say!
15:38 IOninja m: "\n \t".trans("\n\t" => *.perl).say
15:38 camelia rakudo-moar 0be724: OUTPUT: «Only Pair objects are allowed as arguments to Str.trans, got WhateverCode␤  in block <unit> at <tmp> line 1␤␤»
15:38 IOninja Booo!
15:39 moritz m: "\n \t".trans("\n\t" => {.perl}).say
15:39 camelia rakudo-moar 0be724: OUTPUT: «Any Any␤»
15:39 IOninja m: "\n \t".subst(:g, /<[\n\t]>/, *.perl).say
15:39 camelia rakudo-moar 0be724: OUTPUT: «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)␤»
15:39 IOninja m: "\n \t".subst(:g, /<[\n\t]>/, *.Str.perl).say
15:39 camelia rakudo-moar 0be724: OUTPUT: «"\n" "\t"␤»
15:40 tires joined #perl6
15:40 ZzZombo Q:q: works with directly typed \n
15:41 IOninja heh
15:41 ZzZombo sbut not with metacharacters coming from interpolated variables.
15:41 IOninja ZzZombo: it just doesn't consider \n special
15:41 ZzZombo wut
15:41 ZzZombo Q:q!Just a literal "\n" here!;
15:42 ZzZombo that's the example in the docs, and it indeed works.
15:42 IOninja indeed it does :)
15:44 andrzejk_ joined #perl6
15:52 AlexDaniel ZzZombo: just wondering, why do you need this?
15:53 ZzZombo showing preceeding lines of grammar parse error. Newlines, tabs and whatever keeps screwing up that and making it barely readable.
15:54 AlexDaniel ah
15:59 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...
16:00 IOninja 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 IOninja s/draft/publish/;
16:00 IOninja (Re documented without tests: it's 'cause they were documented prior to our implementing a policy of not doing that)
16:01 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.
16:02 MasterDuke do any of the modules currently in the ecosystem use the stuff that's going to change?
16:03 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:06 moritz ok
16:07 ZzZombo what is better to put in alternation first, something that is gonna succeed often or fail quickly?
16:11 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:18 IOninja MasterDuke: I hope so :)
16:20 AlexDaniel that sounded evil
16:21 IOninja No, the hope is the stuff I'm changing is useful enough to be used so the work isn't useless.
16:23 IOninja No one seems to be using link(). There's a bunch that use `seek`
16:23 zakharyas joined #perl6
16:24 IOninja A problem tho: (a) a module updates for new changes; (b) user uses the module with an older compiler.
16:25 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 IOninja In reality: our tests in this area are crap and users are using stuff they think won't change.
16:26 IOninja 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:27 mst surely the books should be targeting 6.d ?
16:28 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 IOninja mst: they will be published before 6.d. We don't even know when 6.d will happen yet.
16:28 mst ah
16:29 mst if we're fixing up I/O can we have unix socket support now?
16:30 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:32 rindolf joined #perl6
16:33 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!
16:33 moritz +1
16:34 moritz maybe we can make the new IO part of v6.d
16:34 IOninja moritz: you mean +1 on plan C?
16:35 moritz IOninja: +1 to mst's request to have fdno available
16:35 IOninja Ah :)
16:35 ZzZombo I forgot, how can I change "file.txt" to "file.log" (not rename!)?
16:35 AlexDaniel ?
16:35 IOninja ZzZombo: currently, with .subst
16:36 IOninja m: say "file.txt".subst(/'.')> <-[.]>+$/, 'log').say
16:36 camelia rakudo-moar 0be724: OUTPUT: «filelogtxt␤True␤»
16:36 IOninja really...
16:36 ZzZombo there is .catfile that I scarcely remember used in that.
16:37 IOninja m: "file.txt".subst(/'.' <-[.]>+ $/, '.log').say
16:37 camelia rakudo-moar 0be724: OUTPUT: «file.log␤»
16:37 IOninja mc: say "file.txt".subst(/'.')> <-[.]>+$/, 'log').say
16:37 committable6 IOninja, ¦«2015.12»: filelogtxt␤True
16:37 IOninja oh doh
16:38 IOninja m: say "file.txt".subst(/'.' <( <-[.]>+$/, 'log').say
16:38 camelia rakudo-moar 0be724: OUTPUT: «file.log␤True␤»
16:38 ZzZombo m: "file.txt.bak".subst(/'.' <-[.]>+ $/, '.log').say
16:38 camelia rakudo-moar 0be724: OUTPUT: «file.txt.log␤»
16:38 ZzZombo m: "file".subst(/'.' <-[.]>+ $/, '.log').say
16:38 camelia rakudo-moar 0be724: OUTPUT: «file␤»
16:38 ZzZombo ^
16:41 IOninja m: say "file".split('.')[^(*-1)].join('.') ~ '.log'
16:41 camelia rakudo-moar 0be724: OUTPUT: «.log␤»
16:41 IOninja hah
16:42 IOninja m: say with "file".split('.') { ($_ == 1 ?? .head !! .[^(*-1].join('.')) ~ '.log' }
16:42 camelia rakudo-moar 0be724: OUTPUT: «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…»
16:42 IOninja m: say do with "file".split('.') { ($_ == 1 ?? .head !! .[^(*-1].join('.')) ~ '.log' }
16:42 camelia rakudo-moar 0be724: OUTPUT: «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:␤ …»
16:42 IOninja m: say do with "file".split('.') { ($_ == 1 ?? .head !! .[^(*-1)].join('.')) ~ '.log' }
16:42 camelia rakudo-moar 0be724: OUTPUT: «file.log␤»
16:42 IOninja m: say do with "file.txt".split('.') { ($_ == 1 ?? .head !! .[^(*-1)].join('.')) ~ '.log' }
16:42 camelia rakudo-moar 0be724: OUTPUT: «file.log␤»
16:42 IOninja m: say do with "file.txt.bak".split('.') { ($_ == 1 ?? .head !! .[^(*-1)].join('.')) ~ '.log' }
16:42 camelia rakudo-moar 0be724: OUTPUT: «file.txt.log␤»
16:42 pyrimidine joined #perl6
16:44 khw joined #perl6
16:50 IOninja m: dd 'a'.split(/.+ )> '.'/, 2, :v, :skip-empty)[0] ~ '.log'
16:50 camelia rakudo-moar 0be724: OUTPUT: «"a.log"␤»
16:50 IOninja m: dd 'a.txt'.split(/.+ )> '.'/, 2, :v, :skip-empty)[0] ~ '.log'
16:50 camelia rakudo-moar 0be724: OUTPUT: «"a.log"␤»
16:50 IOninja m: dd 'a.txt.bak'.split(/.+ )> '.'/, 2, :v, :skip-empty)[0] ~ '.log'
16:50 camelia rakudo-moar 0be724: OUTPUT: «"a.txt.log"␤»
16:52 itaipu joined #perl6
16:58 IOninja m: my $x; say 4.6e-1.Rat($x with $x)
16:58 camelia rakudo-moar 0be724: OUTPUT: «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)␤»
16:58 IOninja What's its problem?
17:00 drrho_ joined #perl6
17:02 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:05 cdg joined #perl6
17:05 IOninja m: class Foo { method meow ($x = 42) { dd $x } }; my $x; say Foo.meow($x // Empty)
17:05 camelia rakudo-moar 0be724: OUTPUT: «Slip $x = Empty␤Nil␤»
17:05 IOninja damn, it's not what I want
17:05 IOninja m: class Foo { method meow ($x = 42) { dd $x } }; my $x; Foo.meow(|($x with $x))
17:05 camelia rakudo-moar 0be724: OUTPUT: «Int $x = 42␤»
17:06 IOninja m: class Foo { method meow ($x = 42) { dd $x } }; my $x = 42; Foo.meow(|($x with $x))
17:06 camelia rakudo-moar 0be724: OUTPUT: «Int $x = 42␤»
17:06 IOninja m: class Foo { method meow ($x = 42) { dd $x } }; my $x = 72; Foo.meow(|($x with $x))
17:06 camelia rakudo-moar 0be724: OUTPUT: «Int $x = 72␤»
17:06 IOninja Why do I need to slip the slip :S
17:07 IOninja s: &prefix:<|>
17:07 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/0be7247/src/core/List.pm#L1466
17:07 IOninja s: Empty, 'Slip', \()
17:07 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/0be7247/src/core/Slip.pm#L4
17:07 * IOninja doesn't get it
17:09 zengargoyle m: say ("file.txt" ~ ".log").subst(/\.txt\.log$/,".log")
17:09 camelia rakudo-moar 0be724: OUTPUT: «file.log␤»
17:18 rurban joined #perl6
17:27 IOninja DBIish install fails on Rakudo's HEAD: "MVMArray: atpos expected string register"
17:28 IOninja https://gist.github.com/zoffixznet/8379e2f58d0d5f242f40b88cf1f09d02
17:28 zengargoyle m: say "file.txt".subst(/\.txt$/,"") ~ ".log"
17:28 camelia rakudo-moar 0be724: OUTPUT: «file.log␤»
17:29 llfourn joined #perl6
17:30 itaipu joined #perl6
17:31 bwisti joined #perl6
17:35 gdonald_ joined #perl6
17:39 unclechu joined #perl6
17:50 i7r6 joined #perl6
17:53 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.
18:00 rurban1 joined #perl6
18:02 rurban2 joined #perl6
18:05 MasterDuke IOninja: i just created a rakudo PR to fix the DBIish install
18:07 firefish5000 Alright, I'm finally starting to get slang workin! Yall ain't gonna stop me now
18:08 * gfldex steps out of the way
18:09 * firefish5000 runs into him anyways
18:11 firefish5000 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! https://www.youtube.com/watch?v=nHohqPChqjc
18:15 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:16 TimToady you can't just use ? because <?{}> does affect LTM
18:16 TimToady but also note that the !! is relying on say returning true
18:20 kenjia joined #perl6
18:23 yadzi joined #perl6
18:27 zakharyas joined #perl6
18:27 cdg joined #perl6
18:29 ZzZombo joined #perl6
18:30 llfourn joined #perl6
18:35 dwarring joined #perl6
18:43 pyrimidi_ joined #perl6
18:45 dwarring m: role R { multi method foo( :$a!, ) { }; multi method foo( :$b!, ) { } };
18:45 camelia rakudo-moar 0be724: ( no output )
18:45 dwarring m: role R { multi method foo( :$a!, ) { }; multi method foo( :$b!, ) { } };  class C does R {}
18:45 camelia rakudo-moar 0be724: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤MVMArray: atpos expected string register␤at <tmp>:1␤»
18:45 dwarring bisect: role R { multi method foo( :$a!, ) { }; multi method foo( :$b!, ) { } };  class C does R {}
18:45 bisectable6 dwarring, Bisecting by exit code (old=2015.12 new=0be7247). Old exit code: 0
18:45 bisectable6 dwarring, bisect log: https://gist.github.com/48e331230ac07ac24373e49cf9aed6be
18:45 bisectable6 dwarring, (2017-02-12) https://github.com/rakudo/rakudo/commit/b2e0ac09ed5fce12aaeeeb5d42e7138dad8c0632
18:45 IOninja hehe
18:46 IOninja MasterDuke: would you know what makes it unhappy? ^
18:47 IOninja 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 IOninja MasterDuke++ Meged. Thanks.
18:47 IOninja *Merged
18:47 cdg joined #perl6
18:48 * dwarring rebuilding ;-)
18:48 pyrimidine joined #perl6
18:57 espadrine joined #perl6
19:02 pyrimidine joined #perl6
19:05 Geth ¦ specs: a4ceadef10 | (Zoffix Znet)++ | v6d.pod
19:05 Geth ¦ specs: Remove dummy precision parameters from...
19:05 Geth ¦ specs:
19:05 Geth ¦ specs: ...Rational.Rat and Rational.FatRat coercers
19:05 Geth ¦ specs: review: https://github.com/perl6/specs/commit/a4ceadef10
19:06 andrzejk_ joined #perl6
19:07 notostraca joined #perl6
19:11 IOninja m: $_ = 42; when 42 { proceed when 42 }; say 'meows'
19:11 camelia rakudo-moar 356fee: OUTPUT: «meows␤»
19:11 IOninja m: $_ = 42; when 42 { proceed when 42; say 'wat' }; say 'meows'
19:11 camelia rakudo-moar 356fee: OUTPUT: «meows␤»
19:11 IOninja wtf... fails locally...
19:13 sjn IOninja: what are you trying to do?
19:14 IOninja nevermind misread output of my code; works fine
19:16 dwarring MasterDuke++ # quick-fix
19:17 timotimo MasterDuke: i think the NULLs we have in the sql output of the profiler should be 0 instead
19:22 MasterDuke timotimo: feel free to make any changes you like, you know the profiler and its output much better than i
19:23 MasterDuke i think i just did that because the json for them was empty, but i'm not going to swear to that
19:24 timotimo yeah, makes sense
19:24 timotimo but we only make those empty because that's cheaper than to put the key in and set its value to 0
19:27 MasterDuke ah, ok. then making the sql output 0 does probably make more sense
19:28 timotimo yeah
19:28 timotimo NULL in sql is a very ... "different" beast
19:29 Geth ¦ specs: 2253c29713 | (Zoffix Znet)++ | v6d.pod
19:29 Geth ¦ specs: Add Int to .Rat/.FatRat tossage proposal too
19:29 Geth ¦ specs:
19:29 Geth ¦ specs: there's one test in atan2 that for a strange reason decided to use epsilon...
19:29 Geth ¦ specs: review: https://github.com/perl6/specs/commit/2253c29713
19:29 llfourn joined #perl6
19:29 MasterDuke i'm off to bring in some groceries and then kill orcs, will make that change later if you don't
19:31 timotimo i've made it locally, i'd just have to commit it
19:48 timotimo MasterDuke: it looks like the sql output doesn't let us see what routines allocate what
19:52 cdg_ joined #perl6
19:55 * timotimo sets up some foreing keys
19:55 timotimo to make the schema easier to understand by just looking at it
20:03 dmaestro joined #perl6
20:06 * IOninja follows MasterDuke's lead to kill things...
20:13 rmusial joined #perl6
20:17 timotimo it's annoying to rebuild both rakudo and nqp to test something for the profiler
20:17 timotimo maybe i should profile a piece of nqp code instead
20:17 moritz what's the shortcut for 'if defined' again?
20:21 timotimo "with"
20:21 moritz timotimo: ah, thanks
20:22 AlexDaniel moritz: there's also 「without」 and 「orwith」
20:29 moritz what's orwith?
20:29 AlexDaniel m: my $x; my $y = 42; with $x { say ‘hello’ } orwith $y { say ‘world’ }
20:29 camelia rakudo-moar a4af70: OUTPUT: «world␤»
20:29 AlexDaniel m: my $x = 42; my $y; with $x { say ‘hello’ } orwith $y { say ‘world’ }
20:29 camelia rakudo-moar a4af70: OUTPUT: «hello␤»
20:29 AlexDaniel like if/elsif
20:30 moritz ah, makes sense, kindof :-)
20:30 llfourn joined #perl6
20:30 AlexDaniel if/elsif/else → with/orwith/else
20:30 AlexDaniel though you can mix them I guess
20:30 AlexDaniel m: my $x = 42; my $y; with $x { say ‘hello’ } elsif True { say ‘world’ }
20:30 camelia rakudo-moar a4af70: OUTPUT: «hello␤»
20:30 AlexDaniel yea
20:33 IOninja m: 42 andthen .say
20:33 camelia rakudo-moar 79d567: OUTPUT: «42␤»
20:35 lizmat https://www.quora.com/Which-is-better-Perl-or-Python/answer/Joe-Pepersack # no mention of Perl 6 :-(
20:38 moritz do we have any unicode property for the width of a character?
20:38 AlexDaniel ooooooh, we had something added
20:38 AlexDaniel very recently
20:39 timotimo we do, yeah
20:39 AlexDaniel m: say ‘x’.uniprop(‘East_Asian_Width’)
20:39 camelia rakudo-moar 79d567: OUTPUT: «Na␤»
20:39 timotimo i think it's called .. yes
20:39 timotimo Na.
20:40 AlexDaniel m: say ‘字’.uniprop(‘East_Asian_Width’)
20:40 camelia rakudo-moar 79d567: OUTPUT: «W␤»
20:40 moritz m: say '⽝'.uniprop('East_Asian_Width')
20:40 camelia rakudo-moar 79d567: OUTPUT: «W␤»
20:41 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?
20:41 AlexDaniel let's see how recent that is…
20:41 AlexDaniel bisect: say '⽝'.uniprop('East_Asian_Width')
20:41 bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=81fcd1b) because on both starting points the exit code is 0
20:41 bisectable6 AlexDaniel, bisect log: https://gist.github.com/0f45dbd9d1f8c92437dd41926178a932
20:41 bisectable6 AlexDaniel, (2016-12-11) https://github.com/rakudo/rakudo/commit/64b5c2fae62504ee4dab9854b3cb4042ff7362a1
20:41 moritz m: say "\c[ZERO WIDTH SPACE]"..uniprop('East_Asian_Width'
20:41 camelia rakudo-moar 79d567: OUTPUT: «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>␤»
20:41 moritz m: say "\c[ZERO WIDTH SPACE]".uniprop('East_Asian_Width')
20:41 camelia rakudo-moar 79d567: OUTPUT: «N␤»
20:41 AlexDaniel bisect: old=HEAD~500 say '⽝'.uniprop('East_Asian_Width')
20:42 bisectable6 AlexDaniel, Bisecting by output (old=HEAD~500 new=81fcd1b) because on both starting points the exit code is 0
20:42 bisectable6 AlexDaniel, bisect log: https://gist.github.com/80a642b4bbdac78100729ab8b5cd7515
20:42 bisectable6 AlexDaniel, (2017-01-31) https://github.com/rakudo/rakudo/commit/9ed4449db57cab39a115c5347387d5978bd56057
20:42 AlexDaniel this is the one
20:42 moritz AlexDaniel: I had hoped for something that gives me 0 for zero-width stuff, 1 for regular, and 2 for double-width characters
20:43 moritz so only available in 2017.02
20:43 AlexDaniel yup
20:44 BenGoldberg joined #perl6
20:47 cibs joined #perl6
20:49 AlexDaniel u: ZERO WIDTH
20:49 unicodable6 AlexDaniel, U+200B ZERO WIDTH SPACE [Cf] (​)
20:49 unicodable6 AlexDaniel, U+200C ZERO WIDTH NON-JOINER [Cf] (‌)
20:49 unicodable6 AlexDaniel, https://gist.github.com/c24bb2b5ba39d2ff35378168957d2f78
20:49 AlexDaniel u: Cf
20:49 unicodable6 AlexDaniel, U+00AD SOFT HYPHEN [Cf] (­)
20:49 unicodable6 AlexDaniel, U+0600 ARABIC NUMBER SIGN [Cf] (؀)
20:50 unicodable6 AlexDaniel, https://gist.github.com/6394bd21a8c16e78ba6cde8f00f09cc9
20:50 moritz https://gist.github.com/moritz/0e1d4968212a1b3ef5b23eb802b68481
20:51 moritz in my terminal, the - signs are not aligned :(
20:51 moritz in the browser, they are
20:54 AlexDaniel moritz: just wondering, why not .contains ?
20:54 moritz AlexDaniel: because I'm not used to .contains :-)
20:56 Cabanossi joined #perl6
20:59 moritz AlexDaniel: but will replace, thanks
21:01 AlexDaniel moritz: as for character width… you never know!
21:01 AlexDaniel m: say ‘⩶’.uniprop('East_Asian_Width')
21:01 camelia rakudo-moar 81fcd1: OUTPUT: «N␤»
21:03 AlexDaniel so this one is neutral, right? What does this even mean…
21:03 AlexDaniel “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”
21:03 AlexDaniel well thank you very much, unicode! But this does not help
21:04 Cabanossi joined #perl6
21:04 AlexDaniel http://unicode.org/reports/tr11/
21:05 AlexDaniel TL;DR there's no way to know
21:12 * BenGoldberg wonders if it would be a good idea to have a perl6 builtin uniname-like(Str --> Seq).
21:13 BenGoldberg Iterating through all unicode points to find the ones which match something seems a bit silly.
21:13 itcharlie joined #perl6
21:13 itaipu joined #perl6
21:14 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:15 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:16 moritz BenGoldberg: it takes less than two seconds to do search through all character names, so I find that acceptable for my use case
21:24 moritz I just wrote "codepint" instead of "codepoint". Not a pun I ever made intentionally.
21:25 DrForr Obviously it's your subonscious calling to you.
21:25 DrForr *subconscious
21:25 moritz given that I drink alcohol roughly once every two or three years, that's highly unlikely :-)
21:25 AlexDaniel BenGoldberg: builtin? Why?
21:26 AlexDaniel BenGoldberg: create a module for it, I'll start using it on the next day
21:27 AlexDaniel however, as moritz already mentioned, iterating through all characters is fast enough
21:27 AlexDaniel unicodable does it, it's fine
21:28 AlexDaniel u: POO PILE
21:28 unicodable6 AlexDaniel, U+1F4A9 PILE OF POO [So] (💩)
21:28 AlexDaniel not even a second right? :P
21:28 AlexDaniel though that's obviously cheating, here's a proper test
21:28 AlexDaniel u: onehusneohusntoahusnteoahu
21:28 unicodable6 AlexDaniel, Found nothing!
21:28 AlexDaniel ouch… 4 seconds :P
21:31 llfourn joined #perl6
21:32 kyan joined #perl6
21:39 zengargoyle hey, anybody going to SCALE 15x (the Southern California
21:40 zengargoyle Linux Expo)
21:40 DrForr genehack was just mentioning it on Twitter.
21:40 * zengargoyle grumbles at irssi for truncating my history buffer...
21:41 zengargoyle DrForr: yep, looking forward to meeting genehack
21:43 zengargoyle los angeles perlmongers has a booth so please drop by.  (my slot is Sat 10-2)
21:44 DrForr Too late notice for me, but if Fred (Moyer) stops by let hin know I said hi.
21:45 zengargoyle i'll keep an eye out.
22:10 cschwenz joined #perl6
22:20 BenGoldberg joined #perl6
22:33 chinarulezzz joined #perl6
22:33 llfourn joined #perl6
22:38 BenGoldberg m: class Test { my multi trait_mod<is>(Routine $r, :$testy!) { dd $r.name }; method foo() is testy };
22:38 camelia rakudo-moar 5843ee: OUTPUT: «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␤»
22:38 BenGoldberg m: class Test { my multi trait_mod:<is>(Routine $r, :$testy!) { dd $r.name }; method foo() is testy };
22:38 camelia rakudo-moar 5843ee: OUTPUT: «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 #perl6
22:38 BenGoldberg m: class Test { my multi trait_mod:<is>(Routine $r, :$testy!) { dd $r.name }; method foo() is testy {*} };
22:38 camelia rakudo-moar 5843ee: OUTPUT: «"foo"␤»
22:39 BenGoldberg m: class Test { my multi trait_mod:<is>(Routine $r, :$testy!) { dd $r.signature }; method foo(Int) is testy {*} };
22:39 camelia rakudo-moar 5843ee: OUTPUT: «:(Test $: Int $, *%_)␤»
22:39 IOninja no need for `my`; it's the default
22:40 BenGoldberg Ok.
22:40 mst your routine is testy? did somebody shit in its cheerios?
22:42 Voldenet joined #perl6
22:42 Voldenet joined #perl6
22:44 BenGoldberg Is there any convenient way of constructing a Signature other than as a literal?
22:45 lukaramu joined #perl6
22:45 bjz joined #perl6
22:46 IOninja A convenient way other than the convenient way? :)
22:53 IOninja m: use nqp; say nqp::p6bindattrinvres(Signature.new, Signature, '@!params', nqp::list(class :: is Parameter { method name {'meows'}}.new))
22:53 camelia rakudo-moar 318f8e: OUTPUT: «(;; meows)␤»
22:56 IOninja m: Seq.Bool
22:56 camelia rakudo-moar 318f8e: OUTPUT: «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␤␤»
22:56 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 #perl6
23:05 NegrN7 joined #perl6
23:08 llfourn joined #perl6
23:11 BenGoldberg m: my constant $foo = 3; dd ++$foo;
23:11 camelia rakudo-moar 318f8e: OUTPUT: «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)…»
23:11 BenGoldberg m: my constant $foo = 3; dd $foo;
23:11 camelia rakudo-moar 318f8e: OUTPUT: «3␤»
23:11 cdg joined #perl6
23:18 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:19 BenGoldberg m: use nqp; dd nqp::list();
23:19 camelia rakudo-moar 318f8e: OUTPUT: «()␤»
23:19 BenGoldberg m: use nqp; dd nqp::list().WHAT;
23:19 camelia rakudo-moar 318f8e: OUTPUT: «()␤»
23:19 nightfrog joined #perl6
23:25 grumble joined #perl6
23:25 skids joined #perl6
23:27 IOninja m: https://gist.github.com/zoffixznet/c534fbd74b846d51d6565c3f2f0d779c
23:27 camelia rakudo-moar 318f8e: OUTPUT: «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…»
23:27 timotimo that's the one that asploded before, aye?
23:28 IOninja How does that ^ end up finding X::Syntax::Adverb if I set $level < 1 there?
23:28 IOninja Trying to figure out why it seems to hang if I set $level < 2
23:28 IOninja timotimo: it still does
23:28 IOninja m: Seq.Bool
23:28 camelia rakudo-moar 318f8e: OUTPUT: «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␤␤»
23:28 IOninja ^ I just avoided calling that
23:28 timotimo m: CORE::.keys.grep('X::').say
23:28 camelia rakudo-moar 318f8e: OUTPUT: «()␤»
23:28 timotimo m: CORE::.keys.grep('X').say
23:28 camelia rakudo-moar 318f8e: OUTPUT: «(X)␤»
23:28 timotimo hm.
23:29 timotimo m: CORE::X::.keys.say
23:29 camelia rakudo-moar 318f8e: OUTPUT: «(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…»
23:29 timotimo m: CORE::X::.keys.grep('Syntax').say
23:29 camelia rakudo-moar 318f8e: OUTPUT: «(Syntax)␤»
23:30 IOninja Or stuff like `CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File` which is many levels...
23:30 IOninja m: 'CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File'.chars.say
23:30 camelia rakudo-moar 318f8e: OUTPUT: «71␤»
23:30 timotimo don't we have a .take that you could use instead of take $_?
23:30 IOninja timotimo: nope
23:30 timotimo interesting
23:30 IOninja It puns so can't take any roles that can't pun
23:30 BenGoldberg m: sub foo(Int $bar) { $bar }; use nqp; my $params := nqp::getattr( &foo, List, '$!params' ); my $first := nqp::atpos( $params, 0 ); dd $first;
23:30 camelia rakudo-moar 318f8e: OUTPUT: «P6opaque: no such attribute '$!params' in type List when trying to get a value␤  in block <unit> at <tmp> line 1␤␤»
23:30 timotimo right
23:30 IOninja m: Any::Grepper.take
23:30 camelia rakudo-moar 318f8e: OUTPUT: «Method 'pull-one' must be implemented by Any::Grepper because it is required by roles: Any::Grepper.␤  in block <unit> at <tmp> line 1␤␤»
23:31 timotimo that's definitely javascript-style code you got there :P
23:31 IOninja me?
23:32 gdonald_ joined #perl6
23:32 timotimo having a sub { }(blah)
23:33 timotimo maybe i should run this code instead of trying to do it in my head
23:33 timotimo while same head is kind of achey
23:36 timotimo it's doing some very strange things, indeed.
23:36 timotimo like digging into all the signal constants a few hundred times each
23:36 timotimo (not actually hundreds)
23:37 timotimo probably because each of the enum values has the same WHO that the type itself has
23:37 timotimo so it goes through the whole enum whenever it finds a single element of it
23:37 timotimo IOninja: are you running into a problem where it runs forever?
23:38 IOninja Yes, if I set $level < 2 instead of $level < 1
23:39 IOninja And I don't get how it manages to get `CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File` when $level < 1
23:41 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 rakudo-moar 318f8e: OUTPUT: «3␤»
23:41 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 rakudo-moar 318f8e: OUTPUT: «3␤»
23:43 lep-delete joined #perl6
23:43 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 rakudo-moar 318f8e: OUTPUT: «3␤»
23:43 * BenGoldberg wonders whether what he's trying is possible.
23:44 timotimo i have a theory
23:44 IOninja whatisit?
23:44 timotimo digging into PrecompilationUnit at 1
23:44 timotimo taking CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File
23:44 IOninja m: say PrecompilationUnit
23:44 camelia rakudo-moar 318f8e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    PrecompilationUnit used at line 1␤␤»
23:44 IOninja m: say $*REPO
23:44 timotimo no, allow me
23:44 camelia rakudo-moar 318f8e: OUTPUT: «inst#/home/camelia/.perl6␤»
23:45 IOninja OK
23:45 IOninja m: say $*REPO.^name
23:45 camelia rakudo-moar 318f8e: OUTPUT: «CompUnit::Repository::Installation␤»
23:45 IOninja m: say CORE::<$*REPO>
23:45 camelia rakudo-moar 318f8e: OUTPUT: «Nil␤»
23:45 timotimo m: say CORE::('CompUnit')::('PrecompilationUnit')::.keys
23:45 camelia rakudo-moar 318f8e: OUTPUT: «Method 'bytecode' must be implemented by CompUnit::PrecompilationUnit because it is required by roles: CompUnit::PrecompilationUnit.␤  in block <unit> at <tmp> line 1␤␤»
23:45 timotimo whoops :)
23:45 timotimo m: say CORE::('CompUnit')::('PrecompilationUnit')::WHO.keys
23:45 camelia rakudo-moar 318f8e: OUTPUT: «(0)␤»
23:45 timotimo m: say CORE::('CompUnit')::('PrecompilationUnit')::.WHO.keys
23:45 camelia rakudo-moar 318f8e: OUTPUT: «(File)␤»
23:46 timotimo but wait there's more
23:46 timotimo m: say CORE::('CompUnit')::('PrecompilationUnit')::('File').^long_name
23:46 camelia rakudo-moar 318f8e: OUTPUT: «No such method 'long_name' for invocant of type 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at <tmp> line 1␤␤»
23:46 timotimo m: say CORE::('CompUnit')::('PrecompilationUnit')::('File').^name
23:46 camelia rakudo-moar 318f8e: OUTPUT: «CompUnit::PrecompilationStore::File::CompUnit::PrecompilationUnit::File␤»
23:46 timotimo there you go (?)
23:46 IOninja oh heh
23:47 IOninja m: say CORE::('CompUnit')::('PrecompilationStore')::('File')::<CompUnit>.WHO.keys
23:47 camelia rakudo-moar 318f8e: OUTPUT: «(Grepper)␤»
23:47 IOninja really
23:47 IOninja m: say CORE::('CompUnit')::('PrecompilationStore')::('File')::<CompUnit>::.WHO.keys
23:47 camelia rakudo-moar 318f8e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3ompilationStore')::('File')::<CompUnit>:7⏏5:.WHO.keys␤    expecting any of:␤        colon pair␤»
23:47 IOninja OK. I think I'll just stick $level < 1 in there and be done with it for now.
23:47 IOninja It finds all the IO stuff and that's what I need ATM
23:47 timotimo well, one important part is this:
23:48 timotimo m: say CORE::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::('SIGSEGV').name
23:48 camelia rakudo-moar 318f8e: OUTPUT: «No such method 'name' for invocant of type 'Signal'␤  in block <unit> at <tmp> line 1␤␤»
23:48 timotimo m: say CORE::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::('SIGSEGV').^name
23:48 camelia rakudo-moar 318f8e: OUTPUT: «Signal␤»
23:48 timotimo you see the problem? :)
23:48 IOninja Nope.
23:48 timotimo no?
23:48 timotimo m: say CORE::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::.keys
23:48 camelia rakudo-moar 318f8e: OUTPUT: «(0)␤»
23:48 timotimo m: say CORE::('SIGSEGV')::('SIGSEGV')::('SIGSEGV')::('SIGSEGV').WHO.keys
23:48 camelia rakudo-moar 318f8e: OUTPUT: «(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…»
23:48 IOninja Does it just take ages and not really hang when $level < 2? It's just one more level, I'd think
23:49 timotimo imagin ehow long it takes to get through all signals that way
23:49 IOninja Oh OK
23:49 IOninja timotimo++ thanks
23:49 timotimo same for More, Less, Same
23:49 timotimo and SeekFromEnd and friends
23:49 IOninja m: say CORE::('SIGSEGV')::('SIGSEGV').DEFINITE
23:49 camelia rakudo-moar 318f8e: OUTPUT: «True␤»
23:50 IOninja Yeah, sticking a .DEFINITE lets me use higher levels
23:51 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
23:51 timotimo it'd be enough to have a seen hash
23:51 timotimo that's not keyed on paths or names, but on the actual objects
23:54 IOninja hmm...
23:54 IOninja m: my %hash := :{}; %hash{Mu} = 5;
23:54 camelia rakudo-moar 318f8e: OUTPUT: «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…»
23:54 IOninja m: my %hash := :{ Mu => 5};
23:54 camelia rakudo-moar 318f8e: ( no output )
23:55 timotimo heh.
23:55 IOninja :)
23:55 timotimo well, use its WHICH :)
23:55 timotimo m: my %hash; %hash{Mu.WHICH} = 5; say %hash
23:55 camelia rakudo-moar 318f8e: OUTPUT: «{Mu|U40058776 => 5}␤»
23:55 timotimo m: my %hash; %hash{Mu.WHAT.WHICH} = 5; say %hash
23:55 camelia rakudo-moar 318f8e: OUTPUT: «{Mu|U13885336 => 5}␤»
23:55 BenGoldberg m: my %hash := :{}; %hash.push: Mu => 5; dd %hash;
23:55 camelia rakudo-moar 318f8e: OUTPUT: «:{}␤»
23:55 timotimo that's a named argument
23:56 IOninja m: my %hash := :{}; %hash.push: (Mu) => 5; dd %hash;
23:56 timotimo m: my %hash := :{}; %hash.push: (Mu) => 5; dd %hash;
23:56 camelia rakudo-moar 318f8e: OUTPUT: «Type check failed in binding to key; expected Any but got Mu (Mu)␤  in block <unit> at <tmp> line 1␤␤»
23:56 camelia rakudo-moar 318f8e: OUTPUT: «Type check failed in binding to key; expected Any but got Mu (Mu)␤  in block <unit> at <tmp> line 1␤␤»
23:56 timotimo haha :D
23:56 BenGoldberg m: my %hash := :{}; %hash.push: Pair.new(Mu, 5); dd %hash;
23:56 camelia rakudo-moar 318f8e: OUTPUT: «Type check failed in binding to key; expected Any but got Mu (Mu)␤  in block <unit> at <tmp> line 1␤␤»
23:56 BenGoldberg m: my %hash := :{}; %hash.push: item Mu => 5; dd %hash;
23:56 camelia rakudo-moar 318f8e: OUTPUT: «Trailing item in Hash[Mu,Any].push␤  in block <unit> at <tmp> line 1␤:{}␤»
23:57 timotimo well, an object hash is with Any keys
23:57 timotimo m: my %hash := Hash[Mu,Mu].new(); %hash.push: (Mu) => 5; dd %hash
23:57 camelia rakudo-moar 318f8e: OUTPUT: «(my Mu %{Mu} = (Mu) => 5)␤»
23:57 timotimo there you go
23:57 MasterDuke timotimo: what do you mean "every node in the callgraphe unique"? you mean something like give every table a new autoincrementing primary key?
23:57 IOninja Ohhh
23:57 BenGoldberg m: my %hash := :{}; %hash.push: item Failure.new('blah') => 5; dd %hash;
23:57 camelia rakudo-moar 318f8e: OUTPUT: «:{(Failure.new(exception => X::AdHoc.new(payload => "blah"), backtrace => Backtrace.new)) => 5}␤»
23:57 timotimo not every table
23:57 timotimo at the moment you can have many entries in callees where "id" matches
23:58 timotimo anyway, i'm not so sure you can properly reconstruct the call graph just from the sql
23:59 IOninja m: https://gist.github.com/zoffixznet/635a974885182ad3f0081ab39d9d707f
23:59 camelia rakudo-moar 318f8e: OUTPUT: «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…»
23:59 IOninja I call that a win. timotimo++

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

Perl 6 | Reference Documentation | Rakudo