Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-26

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 timotimo cool
00:05 bbkr joined #perl6
00:10 llfourn joined #perl6
00:21 timotimo well, i'm very glad i could help
00:21 timotimo i feel pretty useless today in general :\
00:26 IOninja :)
00:27 IOninja Well, I would've given up otherwise :)
00:27 IOninja So you were useful
00:29 timotimo <3
00:33 timotimo moritz: how do we make other sites-enabled on www.p6c.org work with https? gtk-dlls.p6c.org for example just forwards you to tthe design docs
00:34 timotimo oh, i see, a le-ssl.conf exists
00:34 * timotimo doesn't know how to work that
00:35 MasterDuke timotimo: got distracted by dinner. do you have some example code that produces a small profile i can work with?
00:36 timotimo i didn't have anything. maybe use --profile-compile with one of the nqp files?
00:36 timotimo so you don't have to rebuild rakudo every time
00:37 IOninja Presumably you just run `sudo certbot --apache` and then select gtk-dlls.p6c.org to enable the SSL on
00:37 timotimo oh? let's see
00:37 timotimo no such command exists here
00:38 IOninja hehe, I don't get design docs; chrome cries: "Attackers might be trying to steal your information from gtk-dlls.p6c.org"
00:38 timotimo ah, it's installed to root's home
00:38 timotimo well, yeah, of course
00:38 timotimo you get the design docs when you say "yeah take me there anyway please"
00:38 IOninja mhm
00:39 timotimo this is pleasantly easy
00:39 IOninja indeed
00:39 llfourn joined #perl6
00:40 timotimo it seems like i made it
00:40 timotimo i selected the Secure version
00:40 IOninja yup SSL works for me
00:40 timotimo because you really don't want to download dlls over http
00:40 timotimo also, we want to update those
00:40 timotimo but i forgot where they came from
00:41 MasterDuke timotimo: i just ran `./nqp-m --profile --profile-filename=t.json -e 'sub a($a) { my $b := 0; while ++$b < $a { say("a"); }; }; a(2); a(4); say("a");'` and then the same thing with .sql
00:41 IOninja Wonder if that breaks anything... like something trying to download them using, say, LWP::Simple without SSL sock installed
00:41 IOninja star: use LWP::Simple; LWP::Simple.get: "http://gtk-dlls.p6c.org/libatk-1.0-0.dll"
00:41 camelia star-m 2016.10: OUTPUT: «501 Protocol scheme 'https' is only supported if IO::Socket::SSL is installed <URL:https://gtk-dlls.p6c.org/libatk-1.0-0.dll>␤␤  in method request_shell at /home/camelia/star-2016.10/share/perl6/site/sources/2A99795C71C31D3D9A9D39DCFC0379F0F4CDEDC5 (LWP:…»
00:41 MasterDuke and i see callee entries with the same id value in both
00:41 timotimo ugh. to hell with windows ;_;
00:50 gdonald_ joined #perl6
00:55 * AlexDaniel looks at some code that he decided to “commit later”
00:55 * AlexDaniel will never do this mistake again
00:58 IOninja m: my @data; say +@data; @ = @data.sort: *.<name>;
00:58 camelia rakudo-moar dd4dfb: OUTPUT: «0␤This type (Scalar) does not support elems␤  in block <unit> at <tmp> line 1␤␤»
00:59 aindilis` joined #perl6
00:59 IOninja This Routine Map script is a cornucopia of bugs.
00:59 aborazmeh joined #perl6
00:59 aborazmeh joined #perl6
00:59 AlexDaniel m: my @data; @data.sort: *.<name>;
00:59 camelia rakudo-moar dd4dfb: ( no output )
01:00 AlexDaniel m: my @data; say +@data; @data.sort: *.<name>;
01:00 camelia rakudo-moar dd4dfb: OUTPUT: «0␤This type (Scalar) does not support elems␤  in block <unit> at <tmp> line 1␤␤»
01:00 AlexDaniel m: my @data; say +@data
01:00 camelia rakudo-moar dd4dfb: OUTPUT: «0␤»
01:00 AlexDaniel WTF?
01:00 IOninja reification
01:00 IOninja m: my @data; @data.elems; @data.sort;
01:00 camelia rakudo-moar dd4dfb: OUTPUT: «This type (List) does not support elems␤  in block <unit> at <tmp> line 1␤␤»
01:00 AlexDaniel :-|
01:09 SmokeMachine IOninja: sorry again, but I read about roles that can't be punned... all roles can be punned with it: https://github.com/FCO/Punnable
01:13 IOninja SmokeMachine: it's too hackish for my tastests.
01:20 IOninja man, unique :with(&[eqv]) on a bunch of Method objects takes ages :/
01:22 IOninja oh, wait. These aren't methods but complex structures :}
01:26 IOninja hm, still slow as hell. 4863 objects
01:26 IOninja Methods and Submethods
01:31 girafe2 joined #perl6
01:33 IOninja hm, it uses an array instead of a hash to keep seen things :S weird
01:35 * IOninja does something about it
01:35 IOninja But first... COFFEE!
01:36 MasterDuke the `:&as!, :&with!` version looks the same
01:45 IOninja Ah, I see. It calls the :&with for all the seen elements for each new element
01:45 IOninja hence the array
01:45 * IOninja leaves it alone
01:46 IOninja I need to use :as{.perl} instead of :with(&[eqv])
01:46 IOninja It was running for 20m on the 4863 Method objects before I killed it just now
01:46 IOninja m: say 4863²
01:46 camelia rakudo-moar dd4dfb: OUTPUT: «23648769␤»
01:47 IOninja or is it O(n!)
01:48 IOninja m: my $n = 0; @ = <a b c>.unique: :with{$n++; rand}; say $n
01:48 camelia rakudo-moar dd4dfb: OUTPUT: «Too many positionals passed; expected 0 or 1 arguments but got 2␤  in block <unit> at <tmp> line 1␤␤»
01:48 IOninja m: my $n = 0; @ = <a b c>.unique: :with{@ = $^a, $^b; $n++; rand}; say $n
01:48 camelia rakudo-moar dd4dfb: OUTPUT: «2␤»
01:48 IOninja m: my $n = 0; @ = ^10 .unique: :with{@ = $^a, $^b; $n++; rand}; say $n
01:48 camelia rakudo-moar dd4dfb: OUTPUT: «9␤»
01:48 IOninja m: my $n = 0; @ = ^1000 .unique: :with{@ = $^a, $^b; $n++; rand}; say $n
01:48 camelia rakudo-moar dd4dfb: OUTPUT: «999␤»
01:49 IOninja m: my $n = 0; my @z = ^1000 .unique: :with{@ = $^a, $^b; $n++; rand}; say $n; say @z.elems
01:49 camelia rakudo-moar dd4dfb: OUTPUT: «999␤1␤»
01:49 IOninja m: my $n = 0; my @z = ^1000 .unique: :with{@ = $^a, $^b; $n++; rand}; say $n; say @z
01:49 camelia rakudo-moar dd4dfb: OUTPUT: «999␤[0]␤»
01:49 IOninja dahell
01:50 IOninja ah
01:50 IOninja m: my $n = 0; my @z = ^1000 .unique: :with{@ = $^a, $^b; $n++; 0}; say $n; say @z
01:50 camelia rakudo-moar dd4dfb: OUTPUT: «499500␤[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84…»
01:50 IOninja m: my $n = 0; my @z = ^1000 .unique: :with{@ = $^a, $^b; $n++; 0}; say $n;
01:50 camelia rakudo-moar dd4dfb: OUTPUT: «499500␤»
01:51 IOninja m: my $n = 0; @ = ^10 .unique: :with{@ = $^a, $^b; $n++; 0}; say $n;
01:51 camelia rakudo-moar dd4dfb: OUTPUT: «45␤»
01:51 IOninja m: say [*] ^10+1
01:51 camelia rakudo-moar dd4dfb: OUTPUT: «3628800␤»
01:51 IOninja m: my $n = 0; @ = ^4863 .unique: :with{@ = $^a, $^b; $n++; 0}; say $n;
01:52 camelia rakudo-moar dd4dfb: OUTPUT: «(timeout)»
01:54 IOninja So it's around O(n²/2)
01:54 IOninja m: say 4863²/2
01:54 camelia rakudo-moar dd4dfb: OUTPUT: «11824384.5␤»
01:54 IOninja don't look that many. Maybe I'm wrong :)
01:55 IOninja m: for ^1000 { $ = infix:<eqv> Int.^methods[10..11] }; say now - INIT now
01:55 camelia rakudo-moar dd4dfb: OUTPUT: «0.080323␤»
01:55 IOninja m: for ^11824384 { $ = infix:<eqv> Int.^methods[10..11] }; say now - INIT now
01:55 camelia rakudo-moar dd4dfb: OUTPUT: «(timeout)»
01:55 IOninja m: say (11824384*0.080323)/1000
01:55 camelia rakudo-moar dd4dfb: OUTPUT: «949.76999603␤»
01:56 IOninja so like 15 minutes
02:02 Geth ¦ routine-map: 7cdabb7337 | (Zoffix Znet)++ | 2 files
02:02 Geth ¦ routine-map: Add missing methods
02:02 Geth ¦ routine-map:
02:02 Geth ¦ routine-map: The introspection does not descend into types with `::` in names.
02:02 Geth ¦ routine-map: Fix by using recursive sub.
02:02 Geth ¦ routine-map: review: https://github.com/perl6/routine-map/commit/7cdabb7337
02:02 IOninja Looks much better now: https://map.perl6.party/
02:03 IOninja Found 4790 entries now vs ~2500 prior
02:03 IOninja there's a gazillion candidates for stuff like .Bool and stuff lol
02:05 timotimo that is so much data, i'd almost call it unusable?!
02:05 timotimo but how do i know
02:06 IOninja Depends on your use I guess.
02:06 IOninja Would be nice to collapse by name...
02:07 Guest60735 joined #perl6
02:07 MasterDuke IOninja: is sorting still really slow?
02:07 IOninja ? sorting of what?
02:08 MasterDuke by arity and such
02:08 IOninja Was it really slow?
02:10 MasterDuke 5-7s, but it locks my browser for the first 3-4
02:10 Geth ¦ routine-map: d8f10f7ed8 | (Zoffix Znet)++ | mapper.p6
02:10 Geth ¦ routine-map: Include number of unique routine names during generation
02:10 Geth ¦ routine-map: review: https://github.com/perl6/routine-map/commit/d8f10f7ed8
02:10 IOninja Only 1291 routines with unique names.
02:11 IOninja Get a better browser :P
02:11 IOninja It takes a few seconds in Chrome, but nothing locks up
02:12 AlexDaniel I've noticed that lately too, chromium works smoother, for whatever reason
02:12 MasterDuke FF 51
02:12 IOninja Firefox is crap
02:13 AlexDaniel IOninja: perhaps, but at least it doesn't force its understand of how a keyboard layout should work on me
02:13 AlexDaniel understanding*
02:13 IOninja hm, sorting by filename seems to be busted... :/
02:13 ZzZombo How can I make s/// return the modified copy, like in P5 with IIRC :s?
02:13 AlexDaniel use S///
02:13 AlexDaniel with capital S
02:13 IOninja ZzZombo: use .subst()
02:14 MasterDuke i switched from FF to chrome a long time ago, but then switched back cause chrome got slower and slower. it also didn't handle lots of tabs well
02:16 AlexDaniel MasterDuke: you're so privileged to be able to switch browsers like this…
02:17 AlexDaniel for me it has always been like this: 1) Open Chromium 2) Realize that Ctrl+Shift+Left/Right does not work 3) Well, perhaps next time? Switch back to FF
02:17 MasterDuke the silver lining of not knowing any other languages well enough to want or be able to use them in everyday life
02:17 AlexDaniel ah, it's even worse. Selecting with shift doesn't work at all…
02:20 AlexDaniel maybe I should submit a bug report though…
02:22 cdg joined #perl6
02:23 IOninja m: -> :$x :$y {}
02:23 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot put required parameter $y after variadic parameters␤at <tmp>:1␤------> 3-> :$x :$y7⏏5 {}␤    expecting any of:␤        constraint␤»
02:26 cdg joined #perl6
02:27 bobv joined #perl6
02:28 MasterDuke is there any convenient way to know the equivalent of /usr/bin/time's maxresidentk during runtime?
02:30 IOninja m: sub x (% (:$made-on, :$routines, :$total, :$unique)) {␤␤␤␤␤␤␤␤␤␤␤␤␤ Q:c:to/END/␤y{$total}y␤END␤ }( |%(:42made-on, :42routines, :42total, :42unique) )
02:30 camelia rakudo-moar dd4dfb: OUTPUT: «Too few positionals passed; expected 1 argument but got 0␤  in sub x at <tmp> line 15␤  in block <unit> at <tmp> line 1␤␤»
02:31 IOninja m: sub x (% (:$made-on, :$routines, :$total, :$unique)) {␤␤␤␤␤␤␤␤␤␤␤␤␤ Q:c:to/END/␤y{$total}y␤␤␤␤␤␤␤␤␤␤␤{'meow'}␤END␤ }( |%(:42made-on, :42routines, :42total, :42unique) )
02:31 camelia rakudo-moar dd4dfb: OUTPUT: «Too few positionals passed; expected 1 argument but got 0␤  in sub x at <tmp> line 26␤  in block <unit> at <tmp> line 1␤␤»
02:31 IOninja Bug. If anyone wants to report (reported `line` is for the HEREDOC's last block, even though the issue is in `sub x`'s arguments)
02:33 bjz joined #perl6
02:40 IOninja heh, joke's on me for lauding Chrome over FF... The sorting ain't broken in FF
02:40 IOninja but is in Chrome
02:46 Geth ¦ routine-map: e75143f64a | (Zoffix Znet)++ | 2 files
02:46 Geth ¦ routine-map: Add info to page: generated on, total, total unique
02:46 Geth ¦ routine-map: review: https://github.com/perl6/routine-map/commit/e75143f64a
02:51 aborazmeh joined #perl6
02:51 aborazmeh joined #perl6
02:52 IOninja Reported: https://rt.perl.org/Ticket/Display.html?id=130862#txn-1451087
02:59 IOninja Came up with a good title for the final result of IO grant and changed routines and whatnot: IOcalipse
02:59 IOninja :)
03:00 * IOninja boots up work laptop to design a trendy logo
03:06 IOninja Well, maybe framing it as a disaster is a bad idea....
03:07 IOninja I got it! IOwesomeness
03:07 IOninja :D
03:08 IOninja Amusing that http://www.thesaurus.com/browse/good?s=t lists `bad` as synonym of `good`
03:08 IOninja *cue Hamlet*
03:11 hobbs are you a bad enough dude to rescue the president?
03:14 IOninja Rescuing Mr. Donald indeed would be pretty bad :P
03:15 IOninja I recall someone had a B&W Camelia logo? Any files...
03:16 IOninja Like this one but vector: https://madcapjake.github.io/2015/perl6-file-icons/
03:17 AlexDaniel there was a whole repo of these
03:18 IOninja Juerd: yo where's the svg's at
03:18 gdonald_ joined #perl6
03:19 hobbs in the arcade edition it was President Ronnie
03:21 AlexDaniel IOninja: https://github.com/MadcapJake/metamorphosis/tree/master/images :(
03:22 AlexDaniel no svg
03:22 IOninja Thanks. PNG will do for my current need.
03:23 IOninja If anyone digs up SVGs, please add them to https://github.com/perl6/marketing/tree/master/LOGOs/Camelia
03:23 AlexDaniel actually…
03:23 AlexDaniel https://juerd.nl/tmp/Camelia_mono_1path.svg
03:23 IOninja hah cool
03:23 AlexDaniel IOninja: I mean… you said “like this one but vector”
03:24 AlexDaniel but that's exactly the same image used in the article
03:24 IOninja .ask Juerd what's the license for https://juerd.nl/tmp/Camelia_mono_1path.svg ? I wanna add it to https://github.com/perl6/marketing/
03:24 yoleaux IOninja: I'll pass your message to Juerd.
03:24 noganex_ joined #perl6
03:24 IOninja AlexDaniel: oh :)
03:25 cdg joined #perl6
03:25 IOninja Artistic License 2.0 requires release under same lisense innit?
03:26 AlexDaniel IOninja: the license is… © 2009 Larry Wall
03:26 AlexDaniel as, I believe, it is the same image but with different colors
03:27 kurahaupo__ joined #perl6
03:27 IOninja That's the original one.
03:29 IOninja Section 4 of the license appears to allow distribution under different license. As long as doesn't introduce conflicts with original.
03:30 AlexDaniel original one what?
03:31 IOninja AlexDaniel: the original color logo of camelia
03:31 AlexDaniel IOninja: yea, so what makes you assume that it is Artistic License 2.0?
03:31 AlexDaniel IOninja: because if so, I'd much rather see the copyright notice go in the docs footer
03:32 IOninja AlexDaniel: first paragraph: https://raw.githubusercontent.com/perl6/mu/master/misc/camelia.txt
03:32 AlexDaniel ah
03:34 AlexDaniel hm… right…
03:36 AlexDaniel perhaps there's a reason why this has to be in the footer
03:36 AlexDaniel although I cannot come up with any
03:45 Geth ¦ doc: 07b1eff619 | (Zoffix Znet)++ | template/footer.html
03:45 Geth ¦ doc: Link to details of logo's license
03:45 Geth ¦ doc: review: https://github.com/perl6/doc/commit/07b1eff619
03:46 IOninja Because people may want to use it and it's useful to have legal info easily available.
03:53 cibs joined #perl6
04:03 Juerd IOninja: Same as the original. It's a minor adaptation.
04:03 yoleaux 03:24Z <IOninja> Juerd: what's the license for https://juerd.nl/tmp/Camelia_mono_1path.svg ? I wanna add it to https://github.com/perl6/marketing/
04:03 Juerd afk
04:09 cibs joined #perl6
04:10 cdg joined #perl6
04:21 bjz joined #perl6
04:24 dalek marketing: 87621b0 | (Zoffix Znet)++ | LOGOs/Camelia/Camelia-Black-and-White.svg:
04:24 dalek marketing: Add BW Camelia logo
04:24 yoleaux 24 Feb 2017 14:30Z <AlexDaniel> dalek: ahoi, please update that repo to use geth instead: Change the webhook to https://geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
04:24 dalek marketing: review: https://github.com/perl6/marketing/commit/87621b05b9
04:24 AlexDaniel IOninja: ↑
04:25 AlexDaniel .tell dalek ahoi, please update that repo to use geth instead: Change the webhook to https://geth.perl6.party/?chan=#perl6-dev (or #moarvm for moarvm), Content-type: application/json and "Send me everything."
04:25 yoleaux AlexDaniel: I'll pass your message to dalek.
04:25 Geth ¦ marketing: 87621b05b9 | (Zoffix Znet)++ | LOGOs/Camelia/Camelia-Black-and-White.svg
04:25 Geth ¦ marketing: Add BW Camelia logo
04:25 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/87621b05b9
04:32 pyrimidi_ joined #perl6
04:34 giraffe joined #perl6
04:36 travis-ci joined #perl6
04:36 travis-ci Doc build errored. Zoffix Znet 'Link to details of logo's license'
04:36 travis-ci https://travis-ci.org/perl6/doc/builds/205429215 https://github.com/perl6/doc/compare/6d2afb711352...07b1eff619bc
04:36 travis-ci left #perl6
04:37 IOninja The job exceeded the maximum time limit for jobs, and has been terminated.
04:38 AlexDaniel .oO( why bother with bots when you can replace them all with people )
04:43 yadzi joined #perl6
04:46 geekosaur https://www.sciencedaily.com/releases/2017/02/170223142117.htm so when's the first zoffixbot nervous breakdown?
04:51 Cabanoss- joined #perl6
04:57 IOninja grrr
04:58 IOninja Why yes, GitHub. Please go down when I want to push my last commit for the day
05:11 bjz_ joined #perl6
05:16 IOninja m: Str.^lookup('say').wrap: -> | { say "yo, upgrade, bruh!"; callsame }; "foo".say
05:16 camelia rakudo-moar dd4dfb: OUTPUT: «yo, upgrade, bruh!␤foo␤»
05:17 IOninja For IO upgrade: can make a module that'll wrap affected routines. Include the module. Run your code. Find out if you need to upgrade.
05:17 IOninja s/IO upgrade/breaking upgrades/
05:18 IOninja though I think wrappage and precomp is busticated
05:18 * IOninja drops to bed
05:22 tbrowder_ joined #perl6
05:22 Peter_WR joined #perl6
05:22 xfix joined #perl6
05:23 damnlie joined #perl6
05:25 olinkl_ joined #perl6
05:30 samcv_ joined #perl6
05:31 Ulti_ joined #perl6
05:39 olinkl joined #perl6
05:40 bjz joined #perl6
06:08 mcmillhj joined #perl6
06:26 cibs joined #perl6
06:32 moritz timotimo: re ssl, there's a script /root/letsencrypt/more-certs.sh that controls the creation of SSL certs
06:45 yadzi left #perl6
06:46 pyrimidine joined #perl6
06:47 wamba joined #perl6
07:13 mcmillhj joined #perl6
07:17 darutoko joined #perl6
07:21 moritz timotimo: I've changed the script to also include gtk-dlls.p6c.org in the SSL cert
07:21 moritz timotimo: but I don't know which domain you actually want the SSL cert for :-)
07:38 CIAvash joined #perl6
07:41 moritz m: say "ø\c[COMBINING TILDE]".ords
07:41 camelia rakudo-moar dd4dfb: OUTPUT: «(248 771)␤»
07:41 moritz m: say "ø\c[COMBINING TILDE]".comb.map(&ord)
07:41 camelia rakudo-moar dd4dfb: OUTPUT: «(248)␤»
07:42 moritz m: say "ø\c[COMBINING TILDE]"
07:42 camelia rakudo-moar dd4dfb: OUTPUT: «ø̃␤»
07:59 gdonald_ joined #perl6
08:19 n1ce joined #perl6
08:20 rindolf joined #perl6
08:24 bjz joined #perl6
08:44 grondilu joined #perl6
08:55 jraglin__ joined #perl6
09:00 RabidGravy joined #perl6
09:04 llfourn joined #perl6
09:05 jraglin joined #perl6
09:14 llfourn joined #perl6
09:20 mcmillhj joined #perl6
09:22 mr-foobar joined #perl6
09:29 cibs joined #perl6
09:30 mcmillhj joined #perl6
09:36 domidumont joined #perl6
09:37 user9 joined #perl6
09:38 Xliff joined #perl6
09:41 mr-foobar joined #perl6
09:44 mcmillhj joined #perl6
09:49 mcmillhj joined #perl6
10:09 moritz I'm running a design competition for a new cover design for my book: https://en.99designs.de/book-cover-design/contests/programming-language-book-cover-butterfly-700780/entries
10:09 moritz I'd appreciate some feedback on which designs you like
10:10 moritz the designer of the current logo is uncomfortable with my use of it
10:17 RabidGravy I like them all :)
10:19 moritz that's good to know, but has no selective force :-)
10:19 moritz my wife leans towards #6, and I generally trust here with aesthetics more than myself
10:20 jast I find the typography weak in the entries by Chupavi and CsapoDesign
10:20 moritz #3, #6, #7 and #17 are my current favorites
10:20 moritz (tbh my wife hasn't seen #17 yet, it's new)
10:21 mcmillhj joined #perl6
10:21 llfourn joined #perl6
10:21 moritz jast: good point
10:22 jast and all of them aren't kerned properly to my eyes
10:22 jast I do like the concept in #3 and #7, though
10:22 jast they'd be better without the shutterstock watermarks, of course ;)
10:23 moritz that'll go away when I decide for one, and pay :-)
10:23 moritz and there's an iteration process, so I can ask for things like a more interesting font
10:23 jast personally I dislike the use of lucida calligraphy in #17 (and many others by that designers), it's just so overused
10:27 dotness joined #perl6
10:28 jast in #6 the background composition doesn't work for me... the strange combination of gray and blue in the vignette effect, plus the nova-ish stuff, seems gimmicky to me and looks kinda muted when your focus is on the center
10:28 Actualeyes left #perl6
10:39 moritz jast: thanks for the feedback, very good points
10:44 zengargoyle i sorta like 3 and 17.  wish there was was a butterfly coming out of a cocoon or like an origami folding pattern for a butterfly to get that 'coming to life' sort of feeling.
10:49 zengargoyle or that evolution progression caterpilar, cocoon, butterfly.
10:50 bjz_ joined #perl6
10:50 TeamBlast joined #perl6
10:55 ZzZombo_ joined #perl6
10:55 ZzZombo_ joined #perl6
11:04 kurahaupo joined #perl6
11:04 domidumont joined #perl6
11:04 ZzZombo joined #perl6
11:04 ZzZombo joined #perl6
11:05 ZzZombo joined #perl6
11:05 ZzZombo joined #perl6
11:12 mcmillhj joined #perl6
11:15 ZzZombo joined #perl6
11:15 ZzZombo joined #perl6
11:21 geekosaur joined #perl6
11:29 mcmillhj joined #perl6
11:43 bjz joined #perl6
11:47 espadrine joined #perl6
11:47 RabidGravy Okay this is weird https://github.com/perl6-community-modules/testml-pm6/issues/7 - I thought it was broken by lexical loading but even if I move the require into the same method it seems unable to find the sub
11:50 RabidGravy but my mental faculties are somewhat degraded by a surfeit of alcohol yesterday so it could just be me
11:54 kurahaupo joined #perl6
12:04 ZzZombo how the fox do I export multiple multies of the same name from a module?
12:06 RabidGravy should it just work?
12:06 ZzZombo can't is export subs in classes, can I?
12:06 ZzZombo Doesn't work.
12:07 geekosaur joined #perl6
12:12 astj joined #perl6
12:13 lukaramu joined #perl6
12:16 astj joined #perl6
12:17 mcmillhj joined #perl6
12:17 unclechu hey guys, can you recommend me any good book about perl6? is there one exists?
12:18 MasterDuke huggable: books
12:18 huggable MasterDuke, "Perl 6 At A Glance"  https://deeptext.media/perl6-at-a-glance/ (print only for now); "Perl 6 By Example": https://leanpub.com/perl6 (can order preview digital copies) ; "Think Perl 6: How to Think Like a Computer Scientist": http://shop.oreilly.com/product/0636920065883.do
12:18 MasterDuke unclechu: ^^^
12:19 unclechu thanks :) i was trying to search by `book` on faq page at perl6.org but found nothing
12:20 MasterDuke unclechu: good feedback, mind creating an issue here https://github.com/perl6/perl6.org ?
12:21 moritz https://perl6.org/resources/ has a list of books
12:22 Geth ¦ perl6.org: daaeaf8146 | (Moritz Lenz)++ | source/resources/index.html
12:22 Geth ¦ perl6.org: Mention that might book can be bought right now
12:22 Geth ¦ perl6.org:
12:22 Geth ¦ perl6.org: which was not obvious from the "in work" comment
12:22 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/daaeaf8146
12:25 MasterDuke moritz: you can also get a an early/preview release ebook of Laurent's book
12:25 moritz MasterDuke: of parts of the book, yes
12:28 ikang007 joined #perl6
12:32 mcmillhj joined #perl6
12:33 aborazmeh joined #perl6
12:33 aborazmeh joined #perl6
12:34 ufobat joined #perl6
12:34 * masak is about to attempt some trolling
12:34 masak dear #perl6, is this a bug?
12:34 masak m: say is-palindrome "())(" given my &is-palindrome = { $^s eq $s.flip }
12:34 camelia rakudo-moar dd4dfb: OUTPUT: «True␤»
12:34 masak o.O
12:36 masak inspired by https://twitter.com/belbeeno/status/834548166338895872
12:36 moritz masak: it's a bug, but in the parenthesis, not in Rakudo :-)
12:39 masak how can I correct my program?
12:40 masak I want it to work, not to... do a wrong thing
12:40 masak will Rakudo get better parentheses at some point?
12:40 masak I think the present generation of parentheses is faulty (see above)
12:42 AlexDaniel joined #perl6
12:42 moritz ask them Unicode folks!
12:43 * moritz fetches the detroll spray
12:44 moritz m: say 'möp'.NFC ~~ Uni
12:44 camelia rakudo-moar dd4dfb: OUTPUT: «True␤»
12:48 moritz m: say 'möp'.NFC.Str
12:48 camelia rakudo-moar dd4dfb: OUTPUT: «möp␤»
12:48 moritz m: say 'möp'.Uni
12:48 camelia rakudo-moar dd4dfb: OUTPUT: «No such method 'Uni' for invocant of type 'Str'␤  in block <unit> at <tmp> line 1␤␤»
12:56 * masak .oO( error: möp cannot go to Uni )
12:58 rindolf joined #perl6
13:00 * masak .oO( ǝpoɔıun )
13:19 SmokeMachine moritz: my favorite is the #19 but I'd remove the parentheses around the number 6
13:32 musca joined #perl6
13:32 lukaramu_ joined #perl6
13:33 ZzZombo how could I easily change only one argument calling nextwith, passing others as is?
13:35 geekosaur joined #perl6
13:35 masak m: multi foo(Int, Str $s) { &nextwith.assuming("OH")() }; multi foo($x, $y) { say "$x $y" }; foo 42, "HAI"
13:35 camelia rakudo-moar dd4dfb: ( no output )
13:36 masak well. it was worth a shot.
13:36 masak this works:
13:36 masak m: multi foo(Int, Str $s) { nextwith("OH", $s) }; multi foo($x, $y) { say "$x $y" }; foo 42, "HAI"
13:36 camelia rakudo-moar dd4dfb: OUTPUT: «OH HAI␤»
13:36 masak I don't know why the .assuming thing fails -- it may not be a bug
13:36 mcmillhj joined #perl6
13:37 ufobat what is actually the difference between TWEAK and BUILD? or what cant be done in BUILD but in TWEAK?
13:38 masak "The TWEAK method allows you to check things or modify attributes after object construction" -- https://docs.perl6.org/language/objects
13:38 ZzZombo well, I have several named arguments and a few positional, have to alter just one in one case, don't like having to copy ALL of them.
13:38 masak ZzZombo: you might be able to put them in array/hash, modify them, and then spread them in
13:39 ufobat m: role A {has $.x is rw}; class B is A {submethod TWEAK() {$.x = 1;}}; B.new.x.say
13:39 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Virtual method call $.x may not be used on partially constructed object (maybe you mean $!x for direct attribute access here?)␤at <tmp>:1␤------> 3w}; class B is A {submethod TWEAK() {$.x7⏏5 = 1;}…»
13:40 ufobat masak, i think i dont understand
13:42 ufobat ah TWEAK has a self whereas BUILD hasn't but it is still just "partially constructed"?
13:43 ZzZombo Why does https://docs.perl6.org/type/Iterable not specify .flatmap? https://github.com/rakudo/rakudo/blob/320c2fb/src/core/hash_slice.pm#L54 seems to imply it.
13:44 ZzZombo Where does it come from then?
13:44 ZzZombo m: say Iterable.^methods
13:44 camelia rakudo-moar dd4dfb: OUTPUT: «(iterator item flat lazy-if lazy hyper race)␤»
13:45 masak ufobat: not sure why you are using `is` for a role...?
13:46 masak ufobat: but yes, I think TWEAK still happens "during object construction" in some sense
13:46 masak not sure whether there's a good reason for that, mind
13:46 masak maybe it'd be totally kosher to refer to `self` at that point -- kind feels like it would
13:47 ufobat oh the "is" was a mistake
13:49 SmokeMachine m: class RectangleWithCachedArea {has ($.x1, $.x2, $.y1, $.y2); has $.area; submethod TWEAK() {$!area = abs( ($!x2 - $!x1) * ( $!y2 - $!y1) );}}; say RectangleWithCachedArea.new( x2 => 5, x1 => 1, y2 => 1, y1 => 0).area;
13:49 camelia rakudo-moar dd4dfb: OUTPUT: «4␤»
13:50 ufobat is there a way to set a Attribute of a Role at object construction?
13:51 ufobat i think i want to do something like this: role A {has $.x is rw}; class B does A {submethod TWEAK(*%param) {$.x = XML::XPath.new(|%param)}};
13:51 masak jnthn: if I didn't necessarily care about performance, could I somehow declare a method on a subtype? :)
13:52 gdonald_ joined #perl6
13:58 pyrimidi_ joined #perl6
14:03 ZzZombo m: my %_=%(:kv,:delete);my %h=%(abc=>123,bcd=>*);say %h<*>:|%_
14:03 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot use placeholder parameter %_ outside of a sub or block␤at <tmp>:1␤------> 3my %_7⏏5=%(:kv,:delete);my %h=%(abc=>123,bcd=>*)␤»
14:04 ZzZombo m: my %a=%(:kv,:delete);my %h=%(abc=>123,bcd=>*);say %h<*>:|%a
14:04 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3ete);my %h=%(abc=>123,bcd=>*);say %h<*>:7⏏5|%a␤    expecting any of:␤        colon pair␤»
14:04 ZzZombo m: my %a=%(:kv(1),:delete(1));my %h=%(abc=>123,bcd=>*);say %h<*>:|%a
14:04 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3(1));my %h=%(abc=>123,bcd=>*);say %h<*>:7⏏5|%a␤    expecting any of:␤        colon pair␤»
14:04 ZzZombo m: my %a=%(kv=>1,delete=>1);my %h=%(abc=>123,bcd=>*);say %h<*>:|%a
14:04 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3=>1);my %h=%(abc=>123,bcd=>*);say %h<*>:7⏏5|%a␤    expecting any of:␤        colon pair␤»
14:04 ZzZombo wtf is colon pair
14:05 IOninja :a(42)
14:05 IOninja :meows
14:06 IOninja :42a, :a{ :42a }, :a[42], :a<42>, :!a, :$a, :$^a, :$!a, etc
14:07 ZzZombo m: my %a=%(:kv,:delete);my %h=%(abc=>123,bcd=>*);say %h<*>:%a
14:07 camelia rakudo-moar dd4dfb: OUTPUT: «Unexpected named argument 'a' passed␤  in block <unit> at <tmp> line 1␤␤»
14:07 ZzZombo m: my %a=%(kv=>1,delete=>1);my %h=%(abc=>123,bcd=>*);say %h<*>:(|%a)
14:07 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Obsolete use of | or \ with sigil on param %a␤at <tmp>:1␤------> 3;my %h=%(abc=>123,bcd=>*);say %h<*>:(|%a7⏏5)␤    expecting any of:␤        shape declaration␤»
14:07 ZzZombo m: my %a=%(kv=>1,delete=>1);my %h=%(abc=>123,bcd=>*);say %h<*>:(%a)
14:07 camelia rakudo-moar dd4dfb: OUTPUT: «===SORRY!===␤This type (QAST::WVal) does not support positional operations␤»
14:08 ZzZombo ughh
14:08 ZzZombo my %a=%(kv=>1,delete=>1);my %h=%(abc=>123,bcd=>*);say %h<*>:(|%a) <-- why no work :((
14:16 jnthn ZzZombo: Just call postcircumfix:<{ }> directly
14:16 jnthn postcircumfix:<{ }>(%h, *, |%a)
14:16 ZzZombo wow
14:16 jnthn There's no flattening adverb syntax
14:16 ZzZombo neat
14:16 IOninja m: multi foo(:$s, |c) { nextwith :s<OH>, |c }; multi foo(:$s, :$a, :$x) { say "$s $a $x" }; foo :s<foo>, :a<bar>, :x<meows>
14:16 camelia rakudo-moar dd4dfb: OUTPUT: «foo bar meows␤»
14:17 MasterDuke ZzZombo: also, i don't think you want <*>, but {*} instead
14:17 IOninja ZzZombo: in your earlier question... ^ you can use a capture to pass the args around
14:17 jnthn masak: Not easily. A subtype doesn't have a method table of its own, it just delegates dispatch to the refinee
14:17 IOninja m: multi foo(:$s, |c) { callwith :s<OH>, |c }; multi foo(:$s, :$a, :$x) { say "$s $a $x" }; foo :s<foo>, :a<bar>, :x<meows>
14:17 camelia rakudo-moar dd4dfb: OUTPUT: «foo bar meows␤»
14:17 IOninja ummm, dafuq
14:17 jnthn masak: I suspect you could arrange to mix in to the meta-object, however, and override find_method
14:17 IOninja Oh
14:18 IOninja m: multi foo(:$s, |c) { callwith 42, :s<OH>, |c }; multi foo($, :$s, :$a, :$x) { say "$s $a $x" }; foo :s<foo>, :a<bar>, :x<meows>
14:18 camelia rakudo-moar dd4dfb: ( no output )
14:18 IOninja ZzZombo: well, it works; don't know why doesn't here....
14:20 MasterDuke anybody have an idea why an EVAL inside a test gives different results than outside? i was testing out some changes to Int.div, and getting some failures in t/spec/S32-num/rounders.t
14:20 MasterDuke but when i run the individual test from the command line it succeeds
14:20 MasterDuke m: say EVAL("truncate(-0.5)")
14:20 camelia rakudo-moar dd4dfb: OUTPUT: «0␤»
14:21 MasterDuke that's what i get, but it's 1 if i make the test file (or just run it directly)
14:21 cibs joined #perl6
14:22 chansen_ joined #perl6
14:22 MasterDuke these tests for example https://github.com/perl6/roast/blob/master/S32-num/rounders.t#L65
14:23 ZzZombo DAMN!!!
14:24 ZzZombo I am stuck
14:26 perlawhirl joined #perl6
14:27 bbkr joined #perl6
14:29 IOninja moritz: don't like any of them. They're all generic-looking. #6 looks nice as a thumbnail, if in want of a bit of typography work, but the real-life butterfly gives me the creeps when I view the large version :}
14:29 araraloren joined #perl6
14:29 ZzZombo I have custom postcircumfix:<{ }> in my class, because the default refused to accept additional named argumens; but those custom subs couldn't be exported so outside uses didn't see them and called my AT-KEY directly, messing up the workaround I used and breaking horribly; then I tried to change them to our but that broke too because I have to do that via a new proto, but defining a new proto
14:29 ZzZombo breaks the operator for all other types as it's now enforced on them in the module...
14:29 araraloren How to convert a Int to enum ?
14:29 ZzZombo and of course I am NOT gonna define them for all other unrelated types.
14:31 IOninja araraloren: what are you trying to do?
14:31 mcmillhj joined #perl6
14:32 araraloren According a Int value , return a enum
14:33 IOninja m: say SeekFromCurrent === SeekType.enums.antipairs.hash{1}
14:33 camelia rakudo-moar dd4dfb: OUTPUT: «False␤»
14:33 IOninja m: say SeekFromCurrent == SeekType.enums.antipairs.hash{1}
14:33 camelia rakudo-moar dd4dfb: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5SeekFromCurrent' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:33 ZzZombo Why does the default postcircumfix:<{ }> has to complain on unknown named parameters anyway? Shouldn't it at least wait and see if a new one will handle them?
14:37 titsuki m: my enum A <sun mon>; A(0).say
14:37 camelia rakudo-moar dd4dfb: OUTPUT: «sun␤»
14:37 titsuki araraloren: Is this answer your question ?
14:37 IOninja Oh. titsuki++
14:38 araraloren titsuki, yeah
14:38 araraloren thanks
14:39 araraloren m: enum A (:D, :C); A(1).say
14:39 camelia rakudo-moar dd4dfb: OUTPUT: «(Bool)␤»
14:40 araraloren Why A(1) is Bool type?
14:40 perlawhirl hi perlers
14:40 IOninja araraloren: because :C is a Pair.new: 'C' => True
14:40 IOninja araraloren: because :C is a Pair.new: 'C', True
14:40 IOninja \o
14:41 perlawhirl moritz: i like #19, #7 is not bad
14:41 araraloren IOninja, oh, thanks
14:41 IOninja m: m: enum A (:D, :C); say A.enums
14:41 camelia rakudo-moar dd4dfb: OUTPUT: «Map.new((:C,:D))␤»
14:41 perlawhirl do we have something like add_method for subs? say i have a class i want to define a bunch of multi's for (eg, math ops)
14:42 IOninja m: my enum A (sun => 42, mon => 72); A(1000).say
14:42 camelia rakudo-moar dd4dfb: OUTPUT: «(A)␤»
14:42 perlawhirl the majorty will look like a version of this: -
14:42 perlawhirl multi infix:<+>( MyObj $a, Int $b ) { $a.values.map( * + $b ) }
14:42 perlawhirl can i code-gen the ops somehow, or just grin-and-bear-and-write it by hand
14:42 IOninja perlawhirl: CORE::<&infix:<eqv>>.add_dispatchee(multi sub infix:<eqv>(MyObj $l, MyObj $r --> Bool) { True; });
14:43 IOninja Ah, make them automatically
14:43 * IOninja shrugs
14:43 mcmillhj joined #perl6
14:45 lichtkind__ joined #perl6
14:45 musca joined #perl6
14:46 Geth ¦ doc: 07ebaebaf2 | (Zoffix Znet)++ | doc/Language/typesystem.pod6
14:46 Geth ¦ doc: document how to get enums from normal values
14:46 Geth ¦ doc: review: https://github.com/perl6/doc/commit/07ebaebaf2
14:46 BenGoldberg joined #perl6
14:54 mcmillhj joined #perl6
14:56 ZzZombo So, guys, what to do in my case?
14:59 moritz perlawhirl: thanks
15:00 IOninja ???????????????? Advance Notice of Significant Changes: http://rakudo.org/2017/02/26/advance-notice-of-significant-changes/
15:00 moritz IOninja: would you like to contribute a design you like?
15:02 IOninja moritz: nah, it'll suck :)
15:03 moritz IOninja: :( I'd like to see your take on it
15:05 RabidGravy joined #perl6
15:06 IOninja I'm not good at creating original content. 99% of my design job is stuffing as many products as I can into a page without it looking to crowded. And even typography for them is all just our standard stuff applied by a script I wrote...
15:11 zakharyas joined #perl6
15:13 Geth ¦ perl6.org: fc6aa947ed | (Zoffix Znet)++ | source/index.html
15:13 Geth ¦ perl6.org: List IOwesomeness advance notice in news section
15:13 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/fc6aa947ed
15:13 AlexDaniel ahahahahha
15:14 AlexDaniel I love how it lists “Possibly breaking changes” as if it was something great
15:14 AlexDaniel amazing artwork, IOninja++
15:15 IOninja heh
15:15 IOninja Well, none of them will be breaking changes as far as 6.c language is concerned
15:16 AlexDaniel March 18 looks a bit too soon though
15:17 AlexDaniel IOninja += 2 # I love stuff getting better
15:23 mcmillhj joined #perl6
15:24 travis-ci joined #perl6
15:24 travis-ci Doc build passed. Zoffix Znet 'document how to get enums from normal values'
15:24 travis-ci https://travis-ci.org/perl6/doc/builds/205522979 https://github.com/perl6/doc/compare/07b1eff619bc...07ebaebaf252
15:24 travis-ci left #perl6
15:26 MasterDuke ZzZombo: might need to post a gist. i wasn't quite sure how your question related to the code you were trying with camelia earlier
15:38 masak jnthn: mixing into the meta-object and overriding find_method sounds like what I was after -- thank you!
15:39 masak jnthn: sounds concrete enough that it could potentially be weaponi^Wturned into a module
15:43 moritz what are the rules for which kinds of characters I can use in a Str -> Int conversion?
15:44 khw joined #perl6
15:44 IOninja m: ':16<FFF>'.Int.say
15:44 camelia rakudo-moar dd4dfb: OUTPUT: «4095␤»
15:44 ufobat I would be happy if anyone would comment on this first draft: https://github.com/ufobat/p6-XML-Rabbit/blob/master/lib/XML/Rabbit.pm6 The idea is stolen from p5 xml::rabbit and some code was stolen from AttrX::Lazy. It's my first time going meta so.. uhm, yeah
15:44 IOninja moritz: same as val()
15:44 MasterDuke moritz: if it's a single character, any Nd, No, or Nl should work. if multiple, i.e., they're being treated as digits, only Nd
15:45 IOninja it makes a Numeric with val() and then coerces that to Int (there's a shortpath for stuff that's just numeric chars though)
15:45 moritz MasterDuke: thanks
15:49 mcmillhj joined #perl6
15:59 moritz m: say ༳
15:59 camelia rakudo-moar dd4dfb: OUTPUT: «-0.5␤»
15:59 moritz m: say +"༳"
15:59 camelia rakudo-moar dd4dfb: OUTPUT: «Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5༳' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
15:59 moritz is that intentional?
16:00 IOninja moritz: yes
16:00 IOninja m: say unival "༳"
16:00 camelia rakudo-moar dd4dfb: OUTPUT: «-0.5␤»
16:01 BenGoldberg m: use NativeCall; my CArray[long] $tt .= new; $tt[0] = -2; sub time(CArray[long] $tt = $tt --> long) is native {*}; dd time($tt); dd $tt[0];
16:01 camelia rakudo-moar dd4dfb: OUTPUT: «Calling time(NativeCall::Types::CArray[NativeCall::Types::long]) will never work with declared signature (NativeCall::Types::CArray[NativeCall::Types::long] $tt = { ... } --> NativeCall::Types::long)␤  in method CALL-ME at /home/camelia/rakudo-m-inst-2…»
16:01 mxco86 joined #perl6
16:01 BenGoldberg m: use NativeCall; my CArray[long] $tt .= new; $tt[0] = -2; sub time(CArray[long] $t = $tt --> long) is native {*}; dd time($tt); dd $tt[0];
16:01 camelia rakudo-moar dd4dfb: OUTPUT: «Calling time(NativeCall::Types::CArray[NativeCall::Types::long]) will never work with declared signature (NativeCall::Types::CArray[NativeCall::Types::long] $t = { ... } --> NativeCall::Types::long)␤  in method CALL-ME at /home/camelia/rakudo-m-inst-2/…»
16:02 IOninja moritz: https://github.com/rakudo/rakudo/commit/e28305cc99b969b9592b9d6606ec5b6d25995a90
16:04 araraloren How I represent a struct has a function ptr in Perl6 ? The CStruct can not have &callback attribute, must i have to use a CPointer ? Has anyone encounter this situation?
16:06 BenGoldberg Do you fill in the struct's contents in perl6, or is it filled in by the C library?
16:07 araraloren For now, I think will do that in Perl 6.
16:08 mcmillhj joined #perl6
16:08 araraloren Take a look at https://github.com/tensorflow/tensorflow/blob/master/tensorflow/c/c_api.h line 163 ~ 178.
16:08 BenGoldberg If it's filled in by the C library, then you can simply write 'has Pointer $thecallback', and then later: my $callable = nativecast( $struct.thecallback, :(blah blah blah) ); $callable.(arguments);
16:09 Grrrr joined #perl6
16:09 araraloren BenGoldberg, It's not clear yet, I don't know much about this tensorflow library ..
16:10 araraloren You know, I just try to make a wrap for it.
16:10 BenGoldberg It looks like the tensorflow library is asking you how you want to free up data that you've allocated and passed to it.
16:11 araraloren Hm, seem like you are right.
16:11 BenGoldberg I think you're going to have to write some C code in order to make it work.
16:12 araraloren You mean export some interface base on it ?
16:12 BenGoldberg I think you first need to ask yourself, how would you use the library if you weren't doing this in perl6.
16:13 araraloren Hm, I have got to think it over .
16:13 araraloren BenGoldberg, thanks
16:21 bwisti joined #perl6
16:22 Geth ¦ doc/WildYorkies-patch-3: a4fb28da9e | Cale++ | doc/Type/Signature.pod6
16:22 Geth ¦ doc/WildYorkies-patch-3: reorganize "constraining return types"
16:22 Geth ¦ doc/WildYorkies-patch-3: review: https://github.com/perl6/doc/commit/a4fb28da9e
16:22 Geth ¦ doc: WildYorkies++ created pull request #1220: reorganize "constraining return types"
16:22 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1220
16:25 BenGoldberg m: my $i = Int; my $s = Str; method ($i:D $self: |args --> $s) { ... };
16:25 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'D' in parameter declaration.␤at <tmp>:1␤------> 3my $i = Int; my $s = Str; method ($i:D7⏏5 $self: |args --> $s) { ... };␤»
16:28 BenGoldberg m: my $x = method (Any:D:) { self }; dd 42.&$x();
16:28 camelia rakudo-moar dd4dfb: OUTPUT: «42␤»
16:28 BenGoldberg m: my $x = method (:D:) { self }; dd 42.&$x();
16:28 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3my $x = method (:7⏏5D:) { self }; dd 42.&$x();␤»
16:33 gdonald_ joined #perl6
16:54 travis-ci joined #perl6
16:54 travis-ci Doc build passed. Cale 'reorganize "constraining return types"'
16:54 travis-ci https://travis-ci.org/perl6/doc/builds/205541540 https://github.com/perl6/doc/commit/a4fb28da9ecf
16:54 travis-ci left #perl6
16:57 mcmillhj joined #perl6
17:01 llfourn joined #perl6
17:01 Ben_Goldberg joined #perl6
17:25 itcharlie1 joined #perl6
17:28 chansen_ joined #perl6
17:51 AlexDaniel hehe, so according to Linus, git will *eventually* switch from SHA1. Makes me wonder why everyone started to move now, like if SHA1 problem was unknown before.
17:52 timotimo people tend to need a swift kick in the butt for those kinds of thing
17:52 timotimo just the other day i saw md5 be used in a program that was written last year
17:52 AlexDaniel and also, all of sudden, we see patches to help mitigate the issue, even though there was no issue!
17:55 timotimo it's totally legit to apply a patch that isn't technologically necessary, but that helps shut up people who would otherwise spam your mailing lists with dozens or hundreds of mails per day
17:56 AlexDaniel that's not the case, I think
17:56 AlexDaniel https://plus.google.com/+LinusTorvalds/posts/7tp2gYWQugL
17:58 AlexDaniel Especially this: “it's already sufficient if the hosting place runs the checks every once in a while”
17:58 AlexDaniel so either run the check yourself, or rely on github to run the checks for you… Awesome solution
17:59 timotimo mhm
18:01 llfourn joined #perl6
18:03 kurahaupo joined #perl6
18:06 tbrowder 'Lo #perl6
18:07 IOninja \o
18:09 AlexDaniel Zo
18:10 DrForr Nize ztation.
18:12 tbrowder I've been writing a sub to report on apache status using run to execute the system ps command. I may have an outdated rakudo, but neither run nor shell are capturing out with either the :err or :out arcs. (of course I may be doing something stupid.) I finally succeeded by using shell to redirect output to a file and then slurped and grepped the file. I'm on
18:12 tbrowder the road and can't test, but anyone have any ideas?
18:12 tbrowder IOninja:hi!
18:13 mcmillhj joined #perl6
18:15 IOninja tbrowder: run(:out, "cal").out.slurp-rest.say  captures output just fine on my box
18:34 Ben_Goldberg joined #perl6
18:40 tbrowder IOninja: thanks, at least that gives me a data point. Can you try it with "ps -C http o cmd="
18:40 IOninja that commands gives me no output when run in the shell
18:40 tbrowder On some box running http?
18:41 IOninja no idea what http is
18:41 tbrowder It won't unless you're running httpd
18:41 IOninja I'm not. I'm running apache
18:42 IOninja zoffix@leliana:~$ perl6 -e 'run(:out, <ps -C apache2 o cmd=>).out.slurp-rest.say'
18:42 mst I have a feeling that on RHELL the process is called httpd ?
18:42 IOninja /usr/sbin/apache2 -k start
18:42 tbrowder httpd is the default apache daemon, it will be apache on a Debian package install according to the apache user list
18:43 mst I think it's apache on fbsd too
18:43 IOninja tbrowder: I suspect you're passing it all as one string instead of proper 'command', @args format
18:44 IOninja kinda sucks it silently succeeds
18:44 * IOninja adds to the list
18:44 AlexDaniel this works for me: run(:out, ‘ps’, ‘-C’, ‘bash’, ‘o’, ‘cmd=’).out.slurp-rest.say
18:44 tbrowder The thing is I show results on the cli but not with shell or run. When I get home I'll update rakudo and check again.
18:46 lucasb joined #perl6
18:47 AlexDaniel IOninja: interesting… exitcode seems to be 0 if you use :out
18:47 AlexDaniel and -1 if you're not trying to catch stdout
18:48 AlexDaniel -1 is more or less OK because it at least blows up in sink context
18:48 BenGoldberg m: say CALLER.<$?FILE>;
18:48 camelia rakudo-moar dd4dfb: OUTPUT: «(Any)␤»
18:51 lucasb a line from Proc.pm: has $.exitcode = -1; # distinguish uninitialized from 0 status
18:51 * BenGoldberg is wondering if there's any way to get info about the stack, a la perl5's caller.
18:51 IOninja BenGoldberg: callframe
18:51 BenGoldberg Thanks
18:52 * lucasb doesn't know what's the practical difference between Proc.status and Proc.exitcode
18:52 IOninja m: sub foo { bar }; sub bar { say "You called me from {callframe(2).code.name}" }; foo
18:52 camelia rakudo-moar dd4dfb: OUTPUT: «You called me from foo␤»
19:01 pyrimidine joined #perl6
19:01 llfourn joined #perl6
19:08 Geth ¦ marketing: 6a9bedcd2a | (Zoffix Znet)++ | 2 files
19:08 Geth ¦ marketing: Rename file to better indicate color scheme
19:08 Geth ¦ marketing: review: https://github.com/perl6/marketing/commit/6a9bedcd2a
19:14 Zoffix \o
19:14 yoleaux 23 Feb 2017 13:07Z <Ven> Zoffix: https://twitter.com/zoffix/status/834074966274482177 why `(my \n = $++)` vs `(state $n)++`?
19:15 moritz m: say "ø".uniprop: $_ for <Numeric Alphabetic>;
19:15 camelia rakudo-moar dd4dfb: OUTPUT: «ALetter␤True␤»
19:15 timotimo zoffix? who the fuck is zoffix?
19:15 moritz is that by design?
19:15 Zoffix Some guy
19:16 moritz I find it a bit weird that one of those returns a boolean, and asking if it's Numeric returns "ALetter"
19:16 Zoffix joined #perl6
19:16 AlexDaniel m: say "ø".uniprop-bool: $_ for <Numeric Alphabetic>;
19:16 camelia rakudo-moar dd4dfb: OUTPUT: «True␤True␤»
19:17 AlexDaniel better? xD
19:17 moritz not really
19:17 AlexDaniel xD
19:17 * AlexDaniel casts samcv
19:17 moritz I don't consider ø to be numeric
19:17 samcv hey AlexDaniel
19:17 AlexDaniel samcv: hey. Unicode question ↑ :)
19:17 moritz wow, a successful summon with a short round-trip time! :-)
19:18 timotimo huh, i kind of missed the whole animation that usually plays for a summon
19:18 moritz samcv: starts here: https://irclog.perlgeek.de/perl6/2017-02-26#i_14169361
19:19 AlexDaniel this doesn't look right, by the way
19:19 samcv moritz, Numeric basically means Numeric_Type
19:19 samcv it's an alias name
19:19 AlexDaniel but shouldn't it be None?
19:19 samcv but uh. i guess i can see how that might be weird
19:19 AlexDaniel isn't it Word_Break that should be ALetter?
19:19 moritz is there a list of Unicode properties we support?
19:19 samcv oh you think the value is incorrect?
19:19 AlexDaniel bisect: old=HEAD~300 say "ø".uniprop: $_ for <Numeric Alphabetic>;
19:19 bisectable6 AlexDaniel, Bisecting by output (old=HEAD~300 new=dd4dfb1) because on both starting points the exit code is 0
19:19 AlexDaniel commit: HEAD~300 say "ø".uniprop: $_ for <Numeric Alphabetic>;
19:19 committable6 AlexDaniel, ¦«HEAD~300»: None␤True
19:19 bisectable6 AlexDaniel, bisect log: https://gist.github.com/3a28f10a707485220b86264c1b36e3e9
19:19 bisectable6 AlexDaniel, (2017-01-25) https://github.com/rakudo/rakudo/commit/3a774066d585062c52191e1034714cab2489ece2
19:20 AlexDaniel commit: 3a774066^,3a774066 say "ø".uniprop: $_ for <Numeric Alphabetic>;
19:20 committable6 AlexDaniel, ¦«3a774066^»: None␤True␤¦«3a77406»: Lower␤True
19:20 samcv "ø".uniprop('Numeric').say
19:20 samcv m "ø".uniprop('Numeric').say
19:20 AlexDaniel commit: 3a774066^,3a774066 say "ø".uniprop: $_ for <Numeric_Type Alphabetic>;
19:20 committable6 AlexDaniel, ¦«3a774066^,3a77406»: None␤True
19:20 samcv m: "ø".uniprop('Numeric').say
19:20 camelia rakudo-moar dd4dfb: OUTPUT: «ALetter␤»
19:20 samcv m: "ø".uniprop('Numeric_Type').say
19:20 camelia rakudo-moar dd4dfb: OUTPUT: «None␤»
19:20 samcv hm
19:20 AlexDaniel m: "ø".uniprop('Word_Break').say
19:20 camelia rakudo-moar dd4dfb: OUTPUT: «ALetter␤»
19:20 AlexDaniel hm
19:20 samcv m: "a".uniprop('Numeric').say
19:20 camelia rakudo-moar dd4dfb: OUTPUT: «ALetter␤»
19:21 samcv interesting
19:21 samcv let me see what 'Numeric' is resolving to
19:21 samcv sec
19:21 AlexDaniel but Numeric_Type is broken too
19:21 AlexDaniel m: "a".uniprop('Numeric_Type').say
19:21 camelia rakudo-moar dd4dfb: OUTPUT: «None␤»
19:21 AlexDaniel ah
19:21 AlexDaniel not
19:21 AlexDaniel so it's just the alias
19:22 moritz m: say 'ø'.uniprop('Numeric_Type')
19:22 camelia rakudo-moar dd4dfb: OUTPUT: «None␤»
19:22 samcv let me check some stuff
19:22 moritz samcv++
19:22 AlexDaniel moritz: so yes, while samcv is fixing it, you can use Numeric_Type
19:22 eroux joined #perl6
19:22 samcv would do uniprop-bool('Numeric_Type') btw
19:23 samcv you will get true or false if it's numeric or not
19:23 samcv instead of strings
19:24 samcv Numeric is not a property name or name alias
19:24 samcv so let me see what it actually resolves to
19:25 * AlexDaniel whispers “Word_Break”
19:25 samcv yeah it is word break. but i wanted to double check
19:25 AlexDaniel how does it happen, by the way?
19:25 samcv uhm
19:26 samcv because i hate the script that generates the unicode database
19:26 AlexDaniel some misalignment somewhere?
19:26 samcv and it does a lot of silly things like intermingling of the property values and property names at point
19:26 samcv i bet there's a Word_Break=Numeric
19:26 samcv 90% sure
19:27 samcv just like how doing <:space> actually checks the line feed property. which has the value of space
19:27 samcv instead of checking the space property
19:31 moritz m: say 'a'.uniprop-bool('ASCII_Hex_Digit')
19:31 camelia rakudo-moar dd4dfb: OUTPUT: «True␤»
19:35 moritz what's the difference between unicmp and coll?
19:36 samcv unicmp just does default UCA but coll uses $*COLLATION variable
19:36 samcv so unless you change $*COLLATION they act the same
19:36 moritz ok, thanks
19:36 moritz m: say $*COLLATION
19:36 camelia rakudo-moar dd4dfb: OUTPUT: «collation-level => 15, Country => International, Language => None, primary => True, secondary => True, tertiary => True, quaternary => True␤»
19:36 samcv did you see my part in https://docs.perl6.org/language/experimental
19:37 moritz samcv: no, did not. Thanks for the pointer!
19:37 samcv yeah read it, gives you a good rundown :)
19:37 moritz I can now stop asking obnoxious questions :-)
19:37 * AlexDaniel wonders why we still have this page
19:37 samcv experimental page?
19:37 AlexDaniel yea, I thought that idea was to move it to rakudo wiki
19:37 samcv oh
19:38 samcv dunno if i like that either
19:38 samcv dunno. i've never used rakudo wiki
19:38 samcv but i mean these are experimental perl 6 features yes?
19:38 * moritz likes the page
19:38 AlexDaniel or maybe not: https://github.com/perl6/doc/issues/893
19:45 moritz man, unicode.org doesn't offer https. Seems very old-style.
19:46 AlexDaniel yup
19:47 AlexDaniel but according to the latest stats I think only half of all websites are using https
19:51 bjz joined #perl6
19:54 moritz but rising steadily
19:56 moritz samcv: how much country-specific collation is implemented?
19:56 samcv 0 :)
19:56 moritz m: use experimental :collation; $*COLLATION.set(:Country<Norway>);  say <a å z>.collate
19:56 camelia rakudo-moar dd4dfb: OUTPUT: «(a å z)␤»
19:56 moritz samcv: ah, that explains it
19:56 samcv 0 language specific either
19:56 moritz I would have expected that to say (a z å) if it were implemented
19:57 moritz samcv: would you maybe want to write a guest chapter on Unicode for the "Perl 6 by Example" book?
19:58 samcv yeah i may be able to do that
19:58 moritz I feel I can't do the topic justice
19:58 moritz \o/ that would be great
19:58 samcv okay. i need a preview of your book first though
19:58 samcv so i can know how to match similar style :)
19:59 moritz samcv: if you /msg me a ssh pubkey, I can give you access to my repo (not on github)
19:59 moritz samcv: or should I use https://github.com/samcv.keys ?
20:01 AlexDaniel m: role Foo { has $one }; ‘blah’ does Foo(42)
20:01 camelia rakudo-moar dd4dfb: OUTPUT: «Can only supply an initialization value for a role if it has a single public attribute, but this is not the case for 'Foo'␤  in block <unit> at <tmp> line 1␤␤»
20:02 AlexDaniel what am I missing?
20:02 llfourn joined #perl6
20:02 moritz it needs to be public, I think
20:02 moritz m: role Foo { has $.one }; ‘blah’ does Foo(42
20:02 camelia rakudo-moar dd4dfb: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3le Foo { has $.one }; ‘blah’ does Foo(427⏏5<EOL>␤»
20:02 AlexDaniel $.one
20:02 AlexDaniel okay
20:02 moritz m: role Foo { has $.one }; ‘blah’ does Foo(42)
20:02 camelia rakudo-moar dd4dfb: ( no output )
20:03 TEttinger joined #perl6
20:03 AlexDaniel ok, next question
20:03 moritz 'cause private attributes can't be initialized from the outside
20:03 moritz (ah, even says "public attribute" in the error message)
20:03 samcv moritz, yeah use the key there
20:03 AlexDaniel m: role Foo { has $.one; has $.two }; ‘blah’ does Foo(:one(42), :two(69))
20:03 camelia rakudo-moar dd4dfb: OUTPUT: «Cannot invoke this object (REPR: Uninstantiable; Foo)␤  in block <unit> at <tmp> line 1␤␤»
20:03 AlexDaniel m: role Foo { has $.one; has $.two }; ‘blah’ does Foo(42, 69)
20:03 camelia rakudo-moar dd4dfb: OUTPUT: «Cannot invoke this object (REPR: Uninstantiable; Foo)␤  in block <unit> at <tmp> line 1␤␤»
20:04 moritz m: role Foo { has $.one; has $.two }; ‘blah’ does Foo(one => 42, two => 69)
20:04 camelia rakudo-moar dd4dfb: OUTPUT: «Cannot invoke this object (REPR: Uninstantiable; Foo)␤  in block <unit> at <tmp> line 1␤␤»
20:04 AlexDaniel so what if I want to have more than one?
20:04 moritz m: role Foo { has $.one; has $.two }; ‘blah’ does Foo.new(one => 42, two => 69)
20:04 camelia rakudo-moar dd4dfb: OUTPUT: «Cannot mix in non-composable type Foo into object of type Str␤  in block <unit> at <tmp> line 1␤␤»
20:04 moritz AlexDaniel: oh man, there's some longer-winded syntax that Foo(42) is a shortcut for, I think, but I can't remember what it is
20:06 moritz samcv: please try 'git clone git@tina.perlgeek.de:perl6book.git'
20:07 samcv hmm did not work
20:07 samcv have not tried this for git before but for ssh i connect to AlexDaniel's server using the same key though through ssh
20:08 zakharyas joined #perl6
20:09 samcv yeah same key. so it should work same with git right? since it uses ssh
20:10 dotness joined #perl6
20:10 AlexDaniel m: role Foo { method one { ‘hello’ } }; class Blah { also does Foo }; say Blah.new.one
20:10 camelia rakudo-moar dd4dfb: OUTPUT: «hello␤»
20:12 AlexDaniel https://github.com/perl6/doc/issues/1221
20:13 tbrowder IOninja: I get the same nil out with run AND shell. But if I direct shell to a file, the output is captured fine.
20:13 Zoffix AlexDaniel: https://docs.perl6.org/language/classtut#index-entry-also_declarator-also
20:14 Zoffix AlexDaniel: "also declarator" in search results
20:14 AlexDaniel dammit
20:14 AlexDaniel yes, now I see it
20:14 Zoffix tbrowder: what's the exact code you're running?
20:15 tbrowder The cmd is "ps -C httpd o cmd="
20:15 Zoffix tbrowder: no, the Perl 6 code you're running
20:17 tbrowder my $p = shell $cmd, :out; # where $cmd is the ps cmd I just showed.
20:18 tbrowder say $p.out.slurp-rest;
20:18 tbrowder Of course there will be no output if httpd is not running
20:18 Zoffix tbrowder: does $p.sink throw?
20:19 Zoffix and does `ps -C httpd o cmd=` actually produce output when you run it in the shell instead of Perl 6?
20:21 geekosaur exit 1 here
20:21 geekosaur (and no output)
20:21 tbrowder Hm, can't say...no computer avail now. Can check later. I will do some thorough checking when I get home. Anything else to check like sink pleas suggest. As I said, I'll also make sure I'm using latest rakudo on nom branch.
20:21 geekosaur and I think the exit 1 means it'll throw?
20:22 Zoffix yes
20:22 tbrowder Yes, at the spell cli I get good output.
20:22 Zoffix tbrowder: add `dd $cmd;` before the call and check if $p.sink throws
20:22 moritz samcv: please try again, I had a trailing newline in your key file that confused gitolite
20:22 samcv very good
20:23 samcv worked perfect
20:23 moritz \o/
20:23 tbrowder Zoffix: (welcome back) WILCO
20:23 samcv will take a look at it later today
20:23 moritz samcv: thanks
20:29 Zoffix tbrowder: also note that `run $cmd` is wrong in this case. You need to give it as a list. `run $cmd.words` should do the trick here
20:29 BenGoldberg m: Int.foo;
20:29 camelia rakudo-moar 796b6a: OUTPUT: «No such method 'foo' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
20:29 BenGoldberg m: say try Int.foo;
20:29 camelia rakudo-moar 796b6a: OUTPUT: «Nil␤»
20:29 AlexDaniel m: Int.?foo;
20:29 * BenGoldberg wonders where the failure/exception went.
20:29 camelia rakudo-moar 796b6a: ( no output )
20:30 Zoffix m: say try Int.foo; say $!.^name
20:30 camelia rakudo-moar 796b6a: OUTPUT: «Nil␤X::Method::NotFound␤»
20:30 AlexDaniel m: say try { Int.foo; CATCH { default { say ‘it's right here, no?’ } } };
20:30 camelia rakudo-moar 796b6a: OUTPUT: «it's right here, no?␤Nil␤»
20:30 AlexDaniel m: say try { Int.foo; CATCH { default { .say } } };
20:30 camelia rakudo-moar 796b6a: OUTPUT: «No such method 'foo' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤Nil␤»
20:31 BenGoldberg m: say X::Method::NotFound.new;
20:31 camelia rakudo-moar 796b6a: OUTPUT: «Use of uninitialized value of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤Use of uninitialized value of type Any in string context.␤Metho…»
20:32 BenGoldberg m: my $x = X::Method::NotFound.new;
20:32 camelia rakudo-moar 796b6a: ( no output )
20:32 BenGoldberg m: my $x = X::Method::NotFound.new; dd $x
20:32 camelia rakudo-moar 796b6a: OUTPUT: «X::Method::NotFound $x = X::Method::NotFound.new(invocant => Mu, method => Any, typename => Any, private => Bool::False)␤»
20:42 pyrimidine joined #perl6
20:44 pyrimidine joined #perl6
20:49 tbrowder question ref proc.run: in the docs it shows signature starting with: "*@args ($, *@)" but i can't finf
20:49 Zoffix m: &run».signature.say
20:49 camelia rakudo-moar 796b6a: OUTPUT: «((| is raw))␤»
20:49 Zoffix m: Proc.^lookup("spawn")».signature.say
20:49 camelia rakudo-moar 796b6a: OUTPUT: «Cannot resolve caller HYPER(Block, Mu); none of these signatures match:␤    (&op, \left, \right, :$dwim-left, :$dwim-right)␤    (&op, Associative:D \left, Associative:D \right, :$dwim-left, :$dwim-right)␤    (&op, Associative:D \left, \right, :$dwi…»
20:49 tbrowder ...find a good description in sig docs of what that exactly means. anyone?
20:49 Zoffix heh
20:51 Zoffix tbrowder: slurp all remaining positionals into @args; leave first element as is, stuff the rest into second element as an array
20:51 Zoffix m: sub (*@args ($, @*)) {dd @ags}(<a b c d e f g>)
20:51 camelia rakudo-moar 796b6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub (*@args ($, @7⏏5*)) {dd @ags}(<a b c d e f g>)␤    expecting any of:␤        constraint␤»
20:51 Zoffix m: sub (*@args ($, *@)) {dd @ags}(<a b c d e f g>)
20:51 camelia rakudo-moar 796b6a: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '@ags' is not declared. Did you mean '@args'?␤at <tmp>:1␤------> 3sub (*@args ($, *@)) {dd 7⏏5@ags}(<a b c d e f g>)␤»
20:51 Zoffix wat..
20:51 Zoffix oh
20:51 hobbs typo, ags vs args
20:51 Zoffix reading helps :)
20:52 Zoffix m: sub (*@args ($, *@)) {dd @args}(<a b c d e f g>)
20:52 camelia rakudo-moar 796b6a: OUTPUT: «["a", "b", "c", "d", "e", "f", "g"]␤»
20:52 Zoffix Oh, I'm a good liar :P
20:52 Zoffix tbrowder: never mind, what I said is wrong.
20:53 Zoffix m: sub (*@args ($x, *@y)) {dd [$x, @y] }(42, <a b c d e f g>)
20:53 camelia rakudo-moar 796b6a: OUTPUT: «[42, ["a", "b", "c", "d", "e", "f", "g"]]␤»
20:53 Zoffix thought what I described is what  I would've expected it to do :/
20:53 tbrowder but at least you showed some good test methodology!
20:57 tbrowder on the road again...bye for now
21:02 _28_ria joined #perl6
21:03 llfourn joined #perl6
21:04 pyrimidine joined #perl6
21:12 bjz joined #perl6
21:14 pyrimidine joined #perl6
21:23 BenGoldberg s: ((use NativeCall), &nativecast)[1], \()
21:23 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Could not find candidate that can do \()␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 37␤  in block <unit> at -e line 6␤␤
21:23 BenGoldberg s: ((use NativeCall), &nativecast)[1], \(Pointer, Signature)
21:23 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/8e250db/ces/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall)#L410
21:24 BenGoldberg Zoffix, Since SourceBaby is your baby, any chance of fixing that?
21:25 Zoffix Don't think so.
21:25 Zoffix buggable: eco hackery
21:25 buggable Zoffix, Nothing found
21:25 Zoffix buggable: eco sourcery
21:25 buggable Zoffix, CoreHackers::Sourcery 'Helper for showing actual source code locations of core subs and methods': https://github.com/zoffixznet/perl6-CoreHackers-Sourcery
21:26 Zoffix It uses ^ that module to do it's job if you want to give it a go.
21:27 Zoffix by "don't think so" I mean I have neither time nor desire to fix that, not that there's no way.
21:27 BenGoldberg s: ((use Test), &test::output)[1], \()
21:27 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Any, Capture); none of these signatures match:␤    ($thing, Str:D $method, Capture $c)␤    ($thing, Str:D $method)␤    (&code)␤    (&code, Capture $c)␤  in block <unit> at -e line 6␤␤
21:28 BenGoldberg m: say ((use Test), &test::output)[1]
21:28 camelia rakudo-moar 796b6a: OUTPUT: «(Any)␤»
21:28 BenGoldberg m: say ((use Test), &plan)[1]
21:28 camelia rakudo-moar 796b6a: OUTPUT: «sub plan (;; Mu | is raw) { #`(Sub|61729752) ... }␤»
21:28 BenGoldberg s: ((use Test), &plan)[1], \()
21:28 SourceBaby BenGoldberg, Something's wrong: ␤ERR: Could not find candidate that can do \()␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 37␤  in block <unit> at -e line 6␤␤
21:28 BenGoldberg s: ((use Test), &plan)[1], \(Any)
21:28 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/8e250db/ces/C712FE6969F786C9380D643DF17E85D06868219E (Test)#L62
21:29 BenGoldberg Looks like anything which ought to point to https://github.com/rakudo/rakudo/blob/nom/lib/ comes out like that.
21:35 bwisti joined #perl6
22:03 wamba joined #perl6
22:05 llfourn joined #perl6
22:33 TEttinger woah, Zoffix is back. it's almost as if they never left...
22:34 Zoffix :)
22:36 El_Che I liked brokenchicken
22:38 AlexDaniel babydrop was nice also
22:39 * Zoffix 's favourite was `viki`
22:40 AlexDaniel m: say ‘AlexDaniel’.comb.pick(*).join
22:40 camelia rakudo-moar 75e070: OUTPUT: «elaADnlxie␤»
22:40 elaADnlxie … how original
22:42 Voldenet joined #perl6
22:42 Voldenet joined #perl6
22:43 elaADnlxie m: my %h1 = :4foo :8bar; say %h1
22:43 camelia rakudo-moar 75e070: OUTPUT: «{foo => 4}␤»
22:43 elaADnlxie dammit, this again
22:43 elaADnlxie m: my %h1 = :4foo, :8bar; say %h1
22:43 camelia rakudo-moar 75e070: OUTPUT: «{bar => 8, foo => 4}␤»
22:44 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; my %h1 ,= %h2; say %h1
22:44 camelia rakudo-moar 75e070: OUTPUT: «Potential difficulties:␤    Redeclaration of symbol '%h1'␤    at <tmp>:1␤    ------> 4foo, :8bar; my %h2 = :15x, :16y; my %h17⏏5 ,= %h2; say %h1␤{x => 15, y => 16}␤»
22:44 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h1 ,= %h2; say %h1
22:44 camelia rakudo-moar 75e070: OUTPUT: «{x => 15, y => 16}␤»
22:45 elaADnlxie w… what
22:45 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h1 = %h1, %h2; say %h1
22:45 camelia rakudo-moar 75e070: OUTPUT: «{x => 15, y => 16}␤»
22:45 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; my %all = %h1, %h2; say %all
22:45 camelia rakudo-moar 75e070: OUTPUT: «{bar => 8, foo => 4, x => 15, y => 16}␤»
22:46 Zoffix m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h1 = |%h2, |%h1; say %h1
22:46 camelia rakudo-moar 75e070: OUTPUT: «{bar => 8, foo => 4, x => 15, y => 16}␤»
22:47 elaADnlxie Zoffix: that's ok, yes, but why does it work with 「my %all = %h1, %h2」 ?
22:47 Zoffix Dunno
22:49 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; my %all; %all = %h1, %h2; say %all
22:49 camelia rakudo-moar 75e070: OUTPUT: «{bar => 8, foo => 4, x => 15, y => 16}␤»
22:49 elaADnlxie in fact, this works
22:51 Zoffix Ahhh
22:51 Zoffix The container thing.
22:51 Zoffix Um, I guess
22:51 Zoffix Nevermidn
22:54 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h1 = %(%h1, %h2); say %h1
22:54 camelia rakudo-moar 75e070: OUTPUT: «{bar => 8, foo => 4, x => 15, y => 16}␤»
22:54 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h1 = (%h1, %h2); say %h1
22:54 camelia rakudo-moar 75e070: OUTPUT: «{x => 15, y => 16}␤»
22:54 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; %h2 = (%h1, %h2); say %h2
22:54 camelia rakudo-moar 75e070: OUTPUT: «{bar => 8, foo => 4}␤»
22:59 cibs joined #perl6
23:03 Zoffix Perl 6 IO TPF Grant: Monthly Report (February, 2017): http://blogs.perl.org/users/zoffix_znet/2017/02/perl-6-io-tpf-grant-monthly-report-february-2017.html
23:04 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; dd %h1; dd %h2;
23:04 camelia rakudo-moar 75e070: OUTPUT: «Hash %h1 = {:bar(8), :foo(4)}␤Hash %h2 = {:x(15), :y(16)}␤»
23:04 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; dd %h1; dd %h2; %h1 = (%h1, %h2); dd %h1;
23:04 camelia rakudo-moar 75e070: OUTPUT: «Hash %h1 = {:bar(8), :foo(4)}␤Hash %h2 = {:x(15), :y(16)}␤Hash %h1 = {:x(15), :y(16)}␤»
23:05 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; dd %h1; dd %h2; %h1.push: %h2; dd %h1;
23:05 camelia rakudo-moar 75e070: OUTPUT: «Hash %h1 = {:bar(8), :foo(4)}␤Hash %h2 = {:x(15), :y(16)}␤Hash %h1 = {:bar(8), :foo(4), :x(15), :y(16)}␤»
23:05 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; dd %h1; dd %h2; %h1 = :quux(42); dd %h1;
23:05 camelia rakudo-moar 75e070: OUTPUT: «Hash %h1 = {:bar(8), :foo(4)}␤Hash %h2 = {:x(15), :y(16)}␤Hash %h1 = {:quux(42)}␤»
23:05 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; dd %h1; dd %h2; %h1 = :quux(42), %h1; dd %h1;
23:05 camelia rakudo-moar 75e070: OUTPUT: «Hash %h1 = {:bar(8), :foo(4)}␤Hash %h2 = {:x(15), :y(16)}␤Hash %h1 = {:quux(42)}␤»
23:05 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; dd %h1; dd %h2; %h1 = :quux(42), |%h1; dd %h1;
23:05 camelia rakudo-moar 75e070: OUTPUT: «Hash %h1 = {:bar(8), :foo(4)}␤Hash %h2 = {:x(15), :y(16)}␤Hash %h1 = {:bar(8), :foo(4), :quux(42)}␤»
23:06 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; dd %h1; dd %h2; %h1 = |%h1, |%h2; dd %h1;
23:06 camelia rakudo-moar 75e070: OUTPUT: «Hash %h1 = {:bar(8), :foo(4)}␤Hash %h2 = {:x(15), :y(16)}␤Hash %h1 = {:bar(8), :foo(4), :x(15), :y(16)}␤»
23:06 llfourn joined #perl6
23:08 BenGoldberg elaADnlxie, In perl5, if you put an array or a hash in list context, it would always without exception flatten.
23:08 BenGoldberg In perl6, if you have a list containing one hash or one array, that hash or array will also flatten.
23:08 BenGoldberg When you've got two or more items in a list, their itemness is preserved.
23:08 elaADnlxie BenGoldberg: not really
23:08 elaADnlxie let me demonstrate
23:09 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; my %all = %h1, %h2; say %all
23:09 camelia rakudo-moar 75e070: OUTPUT: «{bar => 8, foo => 4, x => 15, y => 16}␤»
23:09 BenGoldberg Or rather, their itemness is preserved unless you explicitly ask for flatting, using |
23:09 elaADnlxie m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; my %all = %h1, %h2; dd %all
23:09 camelia rakudo-moar 75e070: OUTPUT: «Hash %all = {:bar(8), :foo(4), :x(15), :y(16)}␤»
23:09 elaADnlxie BenGoldberg: so why does this work then? ↑
23:09 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; my @all = %h1, %h2; dd @all
23:09 camelia rakudo-moar 75e070: OUTPUT: «Array @all = [{:bar(8), :foo(4)}, {:x(15), :y(16)}]␤»
23:10 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; my @all = %h1, %h2; dd @all.Hash
23:10 camelia rakudo-moar 75e070: OUTPUT: «Hash % = {"bar\t8\nfoo\t4" => ${:x(15), :y(16)}}␤»
23:10 BenGoldberg I think there's a bug.
23:10 BenGoldberg Notice what happened when I assigned %h1 and %h2 to an array; the hashes did not flatten.
23:10 elaADnlxie sure
23:11 BenGoldberg m: my %h1 = :4foo, :8bar; my %h2 = :15x, :16y; my @all = %h1, %h2; my %all = @all; dd %all;
23:11 camelia rakudo-moar 75e070: OUTPUT: «Hash %all = {"bar\t8\nfoo\t4" => ${:x(15), :y(16)}}␤»
23:11 elaADnlxie yea, if it worked like this ↑, then I'd accept it :)
23:11 BenGoldberg The array behavior is what is supposed to happen; that's what's documented.
23:11 elaADnlxie but current behavior is WAT, unless somebody knows a good reason why it should be this way…
23:12 elaADnlxie arrays are fine, my question is about hashes :)
23:12 elaADnlxie it feels liket here's some self-referential issue again
23:12 BenGoldberg The obvious fact that assigning two hashes to a third hash, without explicity |'s, is really really wierd.
23:13 elaADnlxie m: my %h1 = <1 a 2 b>; my %h2 = <3 c 4 d>; my %h3 = <5 e 6 f>; %h1 = %(%h1, %h2, %h3); say %h1
23:13 camelia rakudo-moar 75e070: OUTPUT: «{1 => a, 2 => b, 3 => c, 4 => d, 5 => e, 6 => f}␤»
23:13 elaADnlxie m: my %h1 = <1 a 2 b>; my %h2 = <3 c 4 d>; my %h3 = <5 e 6 f>; %h1 = (%h1, %h2, %h3); say %h1
23:13 camelia rakudo-moar 75e070: OUTPUT: «{3 => c, 4 => d, 5 => e, 6 => f}␤»
23:13 BenGoldberg huggable, rakudobug
23:13 huggable BenGoldberg, Report bugs by emailing to rakudobug@perl.org
23:13 elaADnlxie so it's all *except* self
23:14 elaADnlxie ok I'll rakudobug this
23:15 Zoffix m: my %h1 = <1 a 2 b>; my %h2 = <3 c 4 d>; my %h3 = <5 e 6 f>; %h1 = 42 => [(%h1, %h2, %h3)]; say %h1
23:15 camelia rakudo-moar 75e070: OUTPUT: «(\Hash_36625712 = {42 => [Hash_36625712 {3 => c, 4 => d} {5 => e, 6 => f}]})␤»
23:15 Zoffix m: my %h1 = <1 a 2 b>; my %h2 = <3 c 4 d>; my %h3 = <5 e 6 f>; %h1 = 42 => [(%h1, %h2, %h3),]; say %h1
23:15 camelia rakudo-moar 75e070: OUTPUT: «(\Hash_59075504 = {42 => [(Hash_59075504 {3 => c, 4 => d} {5 => e, 6 => f})]})␤»
23:17 Zoffix m: my %h1 = :42a; my %h2 = :72b; %h1 = %h1, %h2; say %h1
23:17 camelia rakudo-moar 75e070: OUTPUT: «{b => 72}␤»
23:17 Zoffix m: my %h1 = :42a; my %h2 = :72b; %h1 = foo => %h1, %h2; say %h1
23:17 camelia rakudo-moar 75e070: OUTPUT: «(\Hash_61016848 = {b => 72, foo => Hash_61016848})␤»
23:23 llfourn joined #perl6
23:45 lep-delete joined #perl6
23:50 _28_ria joined #perl6
23:56 cdg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo