Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-16

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:08 aborazmeh joined #perl6
00:08 lizmat advent post preview: http://perl6advent.wordpress.com/2014/12/16/quoting-on-steroids/?preview=true&preview_id=2695
00:09 BenGoldberg joined #perl6
00:12 daxim joined #perl6
00:17 erkan joined #perl6
00:17 erkan joined #perl6
00:23 atroxaper joined #perl6
00:27 brrt 404 file not found :-)
00:27 * brrt afk
00:27 brrt but will note in passing that freezing water is a ridiculously energy-intensive activity
00:28 brrt the energy it takes to freeze water (or melt it) is equal to the energy it takes to heat water from-160C to 0C
00:43 TimToady lizmat: you might mention in your conclusion that we'll soon have quote macros so you can define your own quotes in place of the alphabet soup
00:43 TimToady they are, after all, just slangs
00:43 lizmat will do
00:48 lizmat TimToady: if you reload the preview, there should be a mention of it
00:48 lizmat using a quote from the Synopsis
00:50 TimToady I think you lost a <...> after quote:
00:50 lizmat ah, yes  :-)
00:51 TimToady not that we'll necessarily end up with that macro syntax, but it's suggestive anyway
00:51 lizmat fixed
00:54 lizmat and published: https://perl6advent.wordpress.com/2014/12/16/quoting-on-steroids/
00:55 lizmat will look at any further comments tomorrow
00:55 lizmat first I need some sleep
00:55 lizmat so good night, #perl6!
00:56 TimToady schlop schön
01:24 konsolebox joined #perl6
01:28 kurahaupo1 joined #perl6
01:33 vendethiel nice :)!
01:33 vendethiel lizmat++
01:37 tinyblak joined #perl6
01:38 tinyblak_ joined #perl6
01:56 erkan joined #perl6
02:01 BenGoldberg joined #perl6
02:04 slimjimflim joined #perl6
02:06 doublelel joined #perl6
02:07 raiph joined #perl6
02:09 kurahaupo1 joined #perl6
02:10 BenGoldberg joined #perl6
02:15 rmgk_ joined #perl6
02:25 tinyblak joined #perl6
02:26 dalek roast: ac5776a | (Jimmy Zhuo)++ | S02-magicals/env.t:
02:26 dalek roast: Fixed a %*ENV test.
02:26 dalek roast:
02:26 dalek roast: This test fails sometimes because .gist does .sort action, and it ignores some infos when $*ENV has 100+ keys.
02:26 dalek roast: Change the key to upper-case to make sure which we want is not at the end.
02:26 dalek roast: review: https://github.com/perl6/roast/commit/ac5776ab27
02:26 tinyblak_ joined #perl6
02:31 aborazmeh joined #perl6
02:34 adu joined #perl6
02:39 erkan joined #perl6
02:40 kurahaupo1 joined #perl6
02:47 BenGoldberg joined #perl6
02:49 BenGoldberg joined #perl6
02:51 BenGoldberg joined #perl6
02:53 BenGoldberg joined #perl6
02:54 BenGoldberg joined #perl6
03:00 BenGoldberg joined #perl6
03:03 BenGoldberg joined #perl6
03:05 noganex joined #perl6
03:12 Mso150 joined #perl6
03:13 jack_rabbit joined #perl6
03:22 Khisanth joined #perl6
03:25 BenGoldberg joined #perl6
03:34 Mso150 joined #perl6
03:39 chenryn joined #perl6
03:40 atroxaper joined #perl6
03:46 BenGoldberg joined #perl6
04:05 BenGoldberg joined #perl6
04:18 anaeem1 joined #perl6
04:19 anaeem1 joined #perl6
04:21 anaeem1 joined #perl6
04:24 BenGoldberg joined #perl6
04:25 [Sno] joined #perl6
04:26 sorear joined #perl6
04:35 salv0 joined #perl6
04:36 flussence joined #perl6
04:37 vendethiel joined #perl6
04:37 isacloud joined #perl6
04:38 m_athias joined #perl6
04:38 brother joined #perl6
04:40 ggherdov joined #perl6
04:43 erkan joined #perl6
04:54 chenryn joined #perl6
04:59 ugexe m: use Test; plan 3; ok 1; module X { use Test; plan 1; ok 1; }; import X; ok 1; # should plan() fail/warn when getting called a second time?
04:59 camelia rakudo-moar d6d08d: OUTPUT«1..3␤ok 1 - ␤1..1␤ok 2 - ␤ok 3 - ␤# Looks like you planned 1 tests, but ran 3␤»
05:01 ugexe im trying to write a unit test for a role that does shell("prove t/passing_test.t"), which is how i ran into conflicting plan count
05:02 kaare_ joined #perl6
05:02 tinyblak joined #perl6
05:16 erkan joined #perl6
05:16 erkan joined #perl6
05:18 atroxaper joined #perl6
05:26 ssqq joined #perl6
05:26 esaym153 joined #perl6
05:36 erkan joined #perl6
05:36 erkan joined #perl6
05:39 ssqq joined #perl6
05:39 [Coke] I'm sure p5 has a perfectly good answer to that question we can steal.
05:40 doublelel joined #perl6
05:43 ugexe Test::More aborts with the message "You tried to plan twice"
05:47 erkan joined #perl6
05:50 chenryn joined #perl6
05:51 JimmyZ we have sub test
05:51 JimmyZ it's in Test.pm
05:52 ugexe i was pointing out how p5 currently handles it
05:52 sorear joined #perl6
05:58 telex joined #perl6
06:00 tinyblak joined #perl6
06:05 ugexe i didnt know if its that way for tap::harness to parse, or if i could augment plan and try to get around it
06:08 ugexe ohhh you mean s/sub test/subtest/
06:08 ugexe JimmyZ++
06:09 tinyblak joined #perl6
06:09 JimmyZ yeah
06:12 chenryn joined #perl6
06:19 [Coke] you could easily add a state variable to plan that barfs if it's already set.
06:19 [Coke] FWIW, I'm fine with that.
06:23 kaare_ joined #perl6
06:26 mr-foobar joined #perl6
06:28 bartolin my automatic builds of parrot and jvm failed this night: https://gist.github.com/usev6/7dd0d087f0b780b2e756
06:28 bartolin (with Null PM access and NullPointerException, respectively)
06:34 tinyblak joined #perl6
06:38 erkan joined #perl6
06:43 [Sno] joined #perl6
06:51 atroxaper joined #perl6
06:53 kaleem joined #perl6
06:59 tinyblak joined #perl6
07:27 TimToady yes, the FALLBACK patch seems to kill both the non-moar builds
07:27 konsolebox joined #perl6
07:31 kurahaupo joined #perl6
07:36 Isp-sec joined #perl6
07:37 rurban_ joined #perl6
07:37 [TuxCM] joined #perl6
07:46 ptc_p6 joined #perl6
07:51 chenryn joined #perl6
07:54 fhelmberger joined #perl6
08:01 brrt joined #perl6
08:01 brrt gjs must be the most crash-prone interpreter ever
08:02 chenryn joined #perl6
08:03 phate^ joined #perl6
08:05 ptc_p6 joined #perl6
08:05 moritz brrt: you don't know early-days rakudo or pugs :-)
08:06 brrt that is true :-)
08:06 brrt on the other hand, gjs is supposedly production ready
08:06 moritz Null PMC Access -- 'nough said
08:07 blackbolt joined #perl6
08:12 zakharyas joined #perl6
08:13 rurban joined #perl6
08:14 nwc10 clean perl6-m build passes on "my" machine
08:15 darutoko joined #perl6
08:25 gfldex joined #perl6
08:29 rurban_ parrot-6.11.0 released, 15-25% faster. http://www.parrot.org/
08:32 brrt darn, not having param_rp_i stings for the jit :-(
08:34 woolfy rurban++
08:37 moritz rurban_: what makes it so much faster?
08:38 atroxaper joined #perl6
08:38 brrt rurban++ :-)
08:46 blackbolt joined #perl6
08:51 brrt left #perl6
08:52 doublelel joined #perl6
08:54 bjz joined #perl6
08:57 rurban_ the nqp/qrpa idea for resizablepmcarray. move an offset on shift
08:58 rurban_ plus some additional rpa optimizations
08:58 rurban_ https://github.com/parrot/parrot/issues/1152
09:01 mathw morning
09:03 sqirrel joined #perl6
09:03 rindolf joined #perl6
09:04 tinyblak joined #perl6
09:05 konsolebox joined #perl6
09:06 moritz rurban_: rakudo setting compilation on parrot master fails with "Null PMC access in get_bool()" here
09:06 kaleem joined #perl6
09:07 kurahaupo joined #perl6
09:07 molaf_ joined #perl6
09:10 Mso150 joined #perl6
09:12 tinyblak joined #perl6
09:13 moritz and iiuc, rakudo won't benefit much from the performance improvement, because it already uses qrpa. Right?
09:14 rurban_ nope. it was much faster with rakudo also
09:15 moritz ok, cool
09:15 moritz now if it'd only compile...
09:15 rurban_ I still have to rewrite nqp to get rid of qrpa, I'm not good with nqp.
09:15 rurban_ Mostly to add threads support for nqp-p
09:16 rurban_ But currently I'm too busy with a type inferencer for p2
09:16 awwaiid joined #perl6
09:17 rurban joined #perl6
09:19 vendethiel joined #perl6
09:21 dakkar joined #perl6
09:22 ptc_p6 joined #perl6
09:27 dsm joined #perl6
09:30 tinyblak joined #perl6
09:37 arnsholt The .WHAT of a type object is just the type object itself, no?
09:41 moritz arnsholt: yes
09:42 moritz m: say Int.WHAT === Int
09:42 camelia rakudo-moar d6d08d: OUTPUT«True␤»
09:43 atroxaper joined #perl6
09:51 erkan joined #perl6
09:59 brrt joined #perl6
09:59 tinyblak joined #perl6
10:03 doublelel joined #perl6
10:05 brrt ok, there is clearly a large difference between for ^40 -> int $x { func($x) } and func($_) for ^40
10:06 brrt in simpler terms, the latter form can't strength-reduce $_ to a native int even if that is it's only use
10:10 brrt also, i find this somewhat confusing, could someone explain:
10:10 brrt m: sub foo(int $n) { my int $i = 1; while $n-- { $i *= 2 }; }; say foo(4);
10:10 camelia rakudo-moar d6d08d: OUTPUT«Cannot assign to an immutable value␤  in sub postfix:<--> at src/gen/m-CORE.setting:4951␤  in sub foo at /tmp/b6xTqbOFKH:1␤  in block <unit> at /tmp/b6xTqbOFKH:1␤␤»
10:11 mathw you're trying to change an immutable value, so...
10:11 brrt well, why is a native int immutable
10:12 mathw because all subroutine parameters are immutable by default
10:12 mathw IIRC
10:12 brrt hmmm
10:12 brrt m: sub foo(int $n is copy) { my int $i = 1; while $n-- { $i *= 2; }; }; say foo(4);
10:12 camelia rakudo-moar d6d08d: OUTPUT«Cannot assign to an immutable value␤  in sub postfix:<--> at src/gen/m-CORE.setting:4951␤  in sub foo at /tmp/r5VaxGNOgL:1␤  in block <unit> at /tmp/r5VaxGNOgL:1␤␤»
10:14 brrt m: sub foo (int $n is rw) { my int $i; while $n-- > 0 { $i = $i * 2; }; $i; }; say foo(4);
10:14 camelia rakudo-moar d6d08d: OUTPUT«Cannot assign to an immutable value␤  in sub postfix:<--> at src/gen/m-CORE.setting:4951␤  in sub foo at /tmp/esJiHc3IKO:1␤  in block <unit> at /tmp/esJiHc3IKO:1␤␤»
10:15 mathw okay that I don't understand
10:15 mathw Hopefully someone more knowledgeable can explain it
10:15 brrt neither do i :-)
10:15 mathw maybe it's a bug!
10:17 moritz brrt: -- and ++ on native types are NYI
10:17 brrt oh
10:17 brrt moarvm has support for them
10:19 mathw moritz++
10:21 brrt anyway, i'll work arround that then
10:23 masak good antenoon, #perl6
10:23 masak m: say 42.WHAT === Int
10:23 camelia rakudo-moar d6d08d: OUTPUT«True␤»
10:24 masak oh, arnsholt++'s question was about the .WHAT of a type object. my bad.
10:24 brrt say 42.WHAT.WHAT
10:24 brrt m: say 42.WHAT.WHAT;
10:24 camelia rakudo-moar d6d08d: OUTPUT«(Int)␤»
10:24 masak yes, that falls out of the type object trying to blend in among the instance objects.
10:28 vinoths joined #perl6
10:29 arnsholt Yeah, that was my intuition. Just wasn't quite ready to trust that intuition =)
10:37 mathw hi masak
10:40 prevost joined #perl6
10:42 FROGGS joined #perl6
10:44 masak mathw: happy flashlight season, mathw.
10:46 mathw :)
10:50 tinyblak_ joined #perl6
10:52 brrt left #perl6
10:53 tinyblak_ joined #perl6
11:09 vendethiel o/, #perl
11:09 vendethiel 6.
11:09 nwc10 \o vendethiel
11:09 masak hi vendethiel, 6.
11:10 vendethiel "6 Erroneous Nickname"
11:11 jnthn "5 Typo'd greetings"
11:11 jnthn ...
11:11 jnthn "And a Christmas on IRC"
11:11 * masak .oO( FIIIIIVE TYPO'D GREETINGS! )
11:11 * jnthn will look at the build bustage he induced after teaching
11:11 nwc10 4 frequent questions
11:11 jnthn &
11:12 masak 3 french puns
11:12 nwc10 3 embarssing mischans
11:12 nwc10 2 asks to ask
11:12 nwc10 aha, masak's is better
11:12 masak :)
11:12 dalek mu: ffdf2fc | lizmat++ | misc/perl6advent-2014/schedule:
11:12 dalek mu: Move 3rd advent post to 22nd
11:12 dalek mu:
11:12 dalek mu: I just realised that I will be doing the release on the 18th, which would
11:12 dalek mu: probably not coincide well with writing an advent post.
11:12 dalek mu: review: https://github.com/perl6/mu/commit/ffdf2fc33a
11:12 jnthn .oO( I'm glad oui agree )
11:12 * jnthn is tempted to stay for the pun fest, but really should go teach :)
11:13 masak go, you English... kniggit!
11:13 lizmat .oO( is it time to start a CPUN site ? )
11:13 masak CPUN6, surely.
11:14 vendethiel okay, that's a lot of message for misstyping an "enter" instead of a "shift" :)
11:14 atroxaper joined #perl6
11:14 lizmat PSA: there is no one for tomorrow's advent post yet
11:15 lizmat This is Your Chance™
11:15 Alina-malina joined #perl6
11:15 lizmat .oO( I wonder what a Miss Typing Contest would look like )
11:17 rurban joined #perl6
11:18 sqirrel joined #perl6
11:19 lizmat Another PSA: on Thursday I will be doing the 2014.12 release of Rakudo
11:19 lizmat Suggestions for release names are welcome
11:20 lizmat I'm playing with "Berlin" (next years QA hackathon) or "Dresden" (next years GPW)
11:20 lizmat but both seem a bit premature
11:20 masak CostaRica! \o/
11:21 masak Brisbane!
11:21 blackbolt hi, can some tell me how to do "default file path". i want to do : say "enter the path to the file"; [read] [if path == '' .........]
11:21 masak Kampala!
11:22 masak blackbolt: your question was not very specific. are you looking for `prompt`?
11:22 masak blackbolt: what is the condition on $path you want to test, exactly?
11:23 blackbolt i don;t know. i want to read path to file. when path to file will be empty, i want to rewrite to default path
11:24 masak ok. `my $path = prompt "Enter path: "; if $path eq "" { $path = $DEFAULT }; my $contents = slurp($path);`
11:24 lizmat $path // 'default_path' ??
11:24 masak lizmat: doesn't work if the input is an empty string.
11:25 lizmat $path || 'default_path' ??
11:25 masak yeah.
11:25 lizmat yeah, I know, '0'   :-)
11:25 masak m: say "0" || "default"
11:25 camelia rakudo-moar d6d08d: OUTPUT«default␤»
11:25 masak apparently.
11:25 masak that feels like a p5 holdover to me, tbh.
11:26 lizmat ah,.... a P5 trap that we don't have in P6 anymore
11:26 lizmat yup
11:26 lizmat thanks to typing
11:26 lizmat afk for a bit&
11:26 masak waitwait, don't have anymore? the above eval shows we have it.
11:27 blackbolt masak: your code help me, thanks
11:27 masak blackbolt: pleased to be of service.
11:35 lue masak: come to think of it, if someone wants to treat "0" as false-y, they're perfectly capable of typing +"0" to get it :) . (Also, if you want "0" to act False, you probably are already coercing to numeric somewhere)
11:35 vendethiel masak: and of course, the fun one is this one
11:35 vendethiel m: say "0" || "0.0" || "default"
11:35 camelia rakudo-moar d6d08d: OUTPUT«0.0␤»
11:36 masak m: say "0" | "0e1" | "default"
11:36 camelia rakudo-moar d6d08d: OUTPUT«any(0, 0e1, default)␤»
11:36 masak m: say "0" || "0e1" || "default"
11:36 camelia rakudo-moar d6d08d: OUTPUT«0e1␤»
11:36 masak m: say "0" || "0i" || "default"
11:36 camelia rakudo-moar d6d08d: OUTPUT«0i␤»
11:36 masak m: say "0" || "0/1" || "default"
11:36 camelia rakudo-moar d6d08d: OUTPUT«0/1␤»
11:38 moritz only the strings '' and '0' are False in boolean context
11:38 masak yes, clearly.
11:39 moritz m: say .perl, ' ', .so for '', '0', ' ', '0e0', '0.0'
11:39 camelia rakudo-moar d6d08d: OUTPUT«"" False␤"0" False␤" " True␤"0e0" True␤"0.0" True␤»
11:39 moritz m: say so 'False'
11:39 camelia rakudo-moar d6d08d: OUTPUT«True␤»
11:39 masak the question is why "0" gets a free entry there, when we've successfully managed the string/number dichotomy in all other places.
11:39 masak it feels to me like the last place of deliberate confusion.
11:41 * lue just went along with it when she first heard about "0" == False, though it's never seemed all that useful/helpful.
11:42 masak yeah, I'm wondering about the use case for it.
11:42 denis_boyun joined #perl6
11:42 moritz mostly places where people (or the system[tm]) forgot to coerce to Numeric
11:43 masak nowadays my mental model for these things is "all monoidal types have one zero element".
11:43 lue moritz: shouldn't it work the same for "0e1" and such too, then?
11:43 moritz lue: integers are much more common in most type of programs
11:43 masak m: say ?"000"
11:43 camelia rakudo-moar d6d08d: OUTPUT«True␤»
11:44 masak moritz: I would say, if you forgot to coerce to numeric and rely on "0" boolifying to False, then you have a deeper problem that "0" boolifying to False only postpones.
11:44 masak now, of course, you might be lucky and it's postponed *forever*.
11:45 moritz masak: unless all the other coercions save you
11:45 masak but what if your records have a "000", like above?
11:45 masak I'd rather it "fail fast" for you, flushing out the problem early.
11:45 moritz then it's a rather atypical number representation
11:45 masak I know Perl is all about helpfully guessing your intent, but this one feels like it's shooting both theory and practice in the foot.
11:46 moritz fwiw I don't particularly care about '0' boolification right now, just trying to argue both ways
11:46 lue "000" isn't really atypical, though; haven't you ever zero-padded zero-indexed numbers in your file names? :P
11:46 moritz lue: yes, but then the file is called foobar-000.txt, not 000
11:47 moritz lue: so you have an extra step where you extract something, which makes it easier to remember to coerce to Int, should you chose to do arithmetics with it
11:48 lue Which leaves the question of when you expect your strings to be pure numbers, but still need "0" == False in case you forget to coerce said strings to a numeric type.
11:49 erkan joined #perl6
11:49 erkan joined #perl6
11:51 * lue afk
12:17 JimmyZ_ joined #perl6
12:18 integral_ joined #perl6
12:19 rindolf joined #perl6
12:20 ruoso joined #perl6
12:20 isacloud_ joined #perl6
12:20 isacloud_ joined #perl6
12:23 Rounin joined #perl6
12:27 chenryn joined #perl6
12:29 BenGoldberg joined #perl6
12:31 abraxxa1 joined #perl6
12:33 Celelibi joined #perl6
12:33 doublelel joined #perl6
12:34 chenryn joined #perl6
12:37 [particle] joined #perl6
12:43 rurban_ joined #perl6
12:45 blackbolt Again need help, 'Commands out of sync; you can't run this command now 20:06in method execute at lib/DBDish/mysql.pm6:170'
12:46 moritz blackbolt: what did you do?
12:46 moritz http://dev.mysql.com/doc/refman/5.0/en/commands-out-of-sync.html
12:47 masak sounds like you should post a gist of your program, so we can help you better.
12:47 FROGGS I had that too and decided to switch to postgres
12:47 dakkar joined #perl6
12:47 moritz maybe you need to .finish before executing the next statements
12:47 moritz FROGGS++ # good man!
12:47 FROGGS :o)
12:47 masak sounds plausible.
12:47 blackbolt moritz: trying to write simple application "phone book". when i do secend time "add new person", i see that problem
12:48 moritz blackbolt: show the code please
12:49 blackbolt just pls.... don;t cry when you see that
12:49 blackbolt Commands out of sync; you can't run this command now 20:06in method execute at lib/DBDish/mysql.pm6:170
12:49 blackbolt ohhh my foult
12:50 moritz blackbolt: and paste your code into a nopaste service (like gist.github.com), not into the channel
12:51 blackbolt https://gist.github.com/anonymous/32bde3081e96e6a0fbac
12:52 blackbolt vm share clipboard didin;t worked
12:53 moritz blackbolt: this code calls .execute at most once
12:53 brrt joined #perl6
12:53 brrt \o
12:53 brrt lizmat++ for todays perl6advent
12:53 brrt by the way
12:53 lizmat yes?
12:53 moritz blackbolt: anyway, try $sth.finish() after $sth.fetchrow_arrayref
12:53 brrt is Q any relation to Q? http://www.startrek.com/legacy_media/images/200307/q01/320x240.jpg
12:54 brrt :-P
12:54 brrt after all, it is nearly omnipotent
12:54 moritz omnipotent quoting, right
12:54 atroxaper joined #perl6
12:54 FROGGS ohh, I've got a daja Q
12:54 FROGGS deja*
12:55 lizmat My first association was more: http://en.wikipedia.org/wiki/Q_(James_Bond)
12:55 blackbolt moritz: it helped, thank you
12:55 lizmat Q: "Always have an escape plan"
12:56 FROGGS *g*
12:56 rurban joined #perl6
12:59 AndroUser2 joined #perl6
13:04 konsolebox joined #perl6
13:05 erkan joined #perl6
13:05 erkan joined #perl6
13:10 AndroUser2 joined #perl6
13:17 andreoss joined #perl6
13:18 blackbolt joined #perl6
13:22 andreoss is there perl6ish way to rotate @x[N][N] in 90 degrees?
13:23 masak zip()
13:26 andreoss zip flattens
13:27 andreoss it could be done by for loop, by isn't there nicer way?
13:28 moritz m: my @a = [<a b c>], [<d e f>], [<g h i>]; say ([zip] @a).perl
13:28 camelia rakudo-moar d6d08d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/k0Zs4DKvJxâ�¤Two terms in a rowâ�¤at /tmp/k0Zs4DKvJx:1â�¤------> [32mb c>], [<d e f>], [<g h i>]; say ([zip] [33mâ��[31m@a).perl[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stop…»
13:29 moritz m: my @a = [<a b c>], [<d e f>], [<g h i>]; say ([Z] @a).perl
13:29 camelia rakudo-moar d6d08d: OUTPUT«((["a", "b", "c"],), (["d", "e", "f"],), (["g", "h", "i"],)).list␤»
13:29 moritz m: my @a = [<a b c>], [<d e f>], [<g h i>]; say zip(@a).perl
13:29 camelia rakudo-moar d6d08d: OUTPUT«((["a", "b", "c"],), (["d", "e", "f"],), (["g", "h", "i"],)).list␤»
13:29 moritz m: my @a = [<a b c>], [<d e f>], [<g h i>]; say zip(@a.map: *.list).perl
13:29 camelia rakudo-moar d6d08d: OUTPUT«(("a",), ("b",), ("c",), ("d",), ("e",), ("f",), ("g",), ("h",), ("i",)).list␤»
13:30 moritz huh.
13:30 moritz m: my @a = [<a b c>], [<d e f>], [<g h i>]; say (@a.map: *.list).perl
13:30 camelia rakudo-moar d6d08d: OUTPUT«("a", "b", "c", "d", "e", "f", "g", "h", "i").list␤»
13:30 moritz yes, that's already too flat
13:31 lizmat jnthn: looked at parrot breakage, seems to break in: self.find_method($obj, 'FALLBACK', :no_fallback)
13:32 spider-mario joined #perl6
13:33 masak m: say zip(1,2,3;4,5,6;7,8,9).perl
13:33 camelia rakudo-moar d6d08d: OUTPUT«((1, 4, 7), (2, 5, 8), (3, 6, 9)).list␤»
13:33 masak the structure is in there; surely it's also possible to iterate it?
13:33 masak m: say zip(1,2,3;4,5,6;7,8,9).tree.perl
13:33 camelia rakudo-moar d6d08d: OUTPUT«(1, 4, 7; 2, 5, 8; 3, 6, 9).item␤»
13:33 dayangkun joined #perl6
13:33 masak m: say .perl for zip(1,2,3;4,5,6;7,8,9).tree.list
13:33 camelia rakudo-moar d6d08d: OUTPUT«(1; 4; 7).item␤(2; 5; 8).item␤(3; 6; 9).item␤»
13:33 masak \o/
13:34 masak but I must confess that these primitives don't feel natural to me at all.
13:34 moritz but why are they semicolon-separated now?
13:34 moritz and how do I get from an array of arrays to the semicolon-separate form?
13:34 masak whether that's due to the primitives themselves, or to my inexperience with them, I don't know.
13:34 moritz both, I'd guess :-)
13:35 masak anyway, zip() definitely *should* be up to this task. that's what zip() *is*, a matrix transpose.
13:35 * masak writes an advent blog post draft
13:36 kaleem joined #perl6
13:37 anaeem1 joined #perl6
13:38 lizmat ++masak
13:50 moritz masak: maybe claim a day (preferrably tomorrow :-) in the schedule?
13:50 masak sure, as soon as I have a goodenuf draft.
13:50 masak in the meanwhile, please continue as if we don't have a poster for tomorrow :)
13:52 moritz sadly for me that means continuing with $dayjob
13:54 dalek rakudo/newio: 5a06ace | TimToady++ | src/ (7 files):
13:54 dalek rakudo/newio: allow $x ~~ s/// to return Match or list of Match
13:54 dalek rakudo/newio:
13:54 dalek rakudo/newio: s/// is now implemented in terms of .subst-mutate, which returns
13:54 dalek rakudo/newio: the matches instead of the result, just as normal matching does.
13:55 dalek joined #perl6
13:56 guru joined #perl6
13:59 andreoss how do i stop .grep or .map from flattening?
14:01 lizmat isn't that one of the areas that the GLR would fix?
14:01 lizmat grep() would flatten, .grep would not ?
14:02 erkan joined #perl6
14:04 lizmat .tell jnthn looks like https://github.com/rakudo/rakudo/commit/1785eaf676fca9159a79f33467ede801ec881446 unbreaks parrot and jvm
14:04 yoleaux lizmat: I'll pass your message to jnthn.
14:13 raiph joined #perl6
14:15 rindolf joined #perl6
14:17 masak anyone have a link to Pugs' planned version milestones?
14:20 [Sno]_ joined #perl6
14:21 * lizmat is now trying parrot 6.11
14:22 telex joined #perl6
14:23 jnthn_ joined #perl6
14:24 esaym joined #perl6
14:24 ugexe_ joined #perl6
14:30 atroxaper joined #perl6
14:32 Alina-malina joined #perl6
14:34 konsolebox joined #perl6
14:47 lizmat I'm seeing several hangs in the spectest on parrot with 6.11.0, so definitely not an upgrade we can do out of the box  :-(
14:51 atroxaper joined #perl6
14:53 anaeem1_ joined #perl6
14:57 rurban_ lizmat: regressions from 6.10.0?
14:57 rurban_ I rather think it's the new nqp code which causes breakage
14:58 tinyblak joined #perl6
14:58 M_o_C joined #perl6
15:06 masak ok, I have my blog post draft. https://gist.github.com/masak/07e6d5ce3848d36161c4
15:06 masak not quite sure what to make of it.
15:06 masak comments welcome.
15:08 rurban joined #perl6
15:09 salv0 joined #perl6
15:10 lizmat rurban_: before upgrading to 6.11.0, I ran a clean spectest with HEAD on parrot
15:11 PerlJam masak: "program elements" reads like "DOM for Perl" to me.
15:13 masak yep.
15:13 * masak inserts that quote
15:15 lizmat https://gist.github.com/lizmat/dd0f88e6042e7c4ce011
15:15 PerlJam masak: btw, you say "Perl 6 has three strange loops", but one of them was "just discovered" ... maybe there are more strange loops yet to be discovered :)
15:15 lizmat ^^ test failures with parrot 6.11.0: https://gist.github.com/lizmat/dd0f88e6042e7c4ce011
15:15 masak PerlJam: in some sense, it's a matter of perspective.
15:16 masak PerlJam: the C compilers we use to compile the C code in Moar and Parrot have been bootstrapped.
15:16 masak (for example)
15:17 ugexe reminds me of the ken thompson hack
15:17 masak aye. that's strange loop + folding things in to hide them.
15:18 lizmat rurban: all the test failures checked so far end in: Can not get attribute '$!storage' declared in class 'Parcel' with this object
15:19 lizmat which is somewhere inside reification
15:19 Alina-malina joined #perl6
15:20 lizmat commute to NR.pm meeting
15:28 dalek mu: b828ed3 | masak++ | misc/perl6advent-2014/schedule:
15:28 dalek mu: [advent-2014/schedule] claim tomorrow
15:28 dalek mu: review: https://github.com/perl6/mu/commit/b828ed3054
15:29 masak my post is a little bit abstract. I'm not sure how to fix that.
15:29 masak when possible, I give examples of actual extensions.
15:30 woolfy left #perl6
15:33 atroxaper joined #perl6
15:37 PerlJam masak: IMHO, don't fiddle with it too much.  Leave it abstract.
15:37 masak ok :)
15:37 masak then I will. hopefully it will appeal to lovers of the abstract like me :>
15:39 blackbolt joined #perl6
15:43 masak walk &
15:44 pyrimidine jnthn_++ # OS X work
15:45 pyrimidine masak: I recall seeing those on some of audreyt's slides at some point.  Maybe SlideShare?
15:45 pyrimidine masak: that would be re: pugs
15:51 Alula joined #perl6
15:53 atroxaper joined #perl6
15:57 guru joined #perl6
15:59 treehug88 joined #perl6
16:26 mr-foobar joined #perl6
16:30 Alina-malina joined #perl6
16:30 Alina-malina joined #perl6
16:34 gfldex joined #perl6
16:41 [Sno] joined #perl6
16:46 anaeem1_ joined #perl6
16:48 phate^ joined #perl6
16:58 raiph joined #perl6
16:58 kaare_ joined #perl6
16:58 kaleem joined #perl6
17:03 atroxaper joined #perl6
17:08 timotimo cool, parrot's ResizablePMCArray is now faster than nqp's QRPA?
17:08 timotimo can we steal something from there to put into moarvm as well?
17:12 dalek perl6-roast-data: 9aee273 | coke++ | / (5 files):
17:12 dalek perl6-roast-data: today (automated commit)
17:12 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/9aee273cde
17:13 [Coke] this may be of interest: http://news.sciencemag.org/social-sciences/2014/12/want-influence-world-map-reveals-best-languages-speak
17:14 blackbolt joined #perl6
17:14 masak pyrimidine: I tried hunting it down by looking at the Pugs.hs repository on github. didn't find it.
17:15 masak oh! found it: http://www.athenalab.com/Perl_6_Users_FAQ.original.htm#_===_General_Perl_6_status_===
17:15 masak just need to know what to search for ;)
17:15 masak ok, so v6.283185 seems to be what I was looking for.
17:15 masak I might add that to the post.
17:17 blackbolt timotimo ?
17:17 timotimo hey there
17:18 timotimo i'm very short on time these days, sorry
17:18 timotimo but gtk-simple is inside the perl6 namespace for a good reason: almost anyone in here can contribute
17:18 blackbolt can you look on problem with close "secend level" window?
17:18 lizmat joined #perl6
17:18 timotimo i may have lost a bit of backscroll in our query
17:19 timotimo the deprecation warning should be gone in the current version
17:20 timotimo would you like to learn how to implement it yourself? :P
17:20 blackbolt no :D
17:20 timotimo i think all you need to do is implement a binding for gtk_widget_hide, which is almost exactly the same as gtk_widget_show, but the name is different
17:20 timotimo then copy the method "show" in GTK::Window to create a "hide" method
17:20 timotimo and use that gtk_widget_hide function
17:20 timotimo i gotta go now
17:20 blackbolt ok
17:21 blackbolt thanks
17:21 timotimo https://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-hide - this is the documentation i always use to find new stuff to bind and expose
17:23 jnthn gimme my messages, slave!
17:23 yoleaux 14:04Z <lizmat> jnthn: looks like https://github.com/rakudo/rakudo/commit/1785eaf676fca9159a79f33467ede801ec881446 unbreaks parrot and jvm
17:23 jnthn lizmat++
17:23 jnthn Looks good to me.
17:24 jnthn timotimo: MoarVM already has the QRPA goodness and then some, afaik.
17:25 else joined #perl6
17:26 else hey, anyone know what ":D" means in perl6?
17:26 tadzik defined argument
17:26 tadzik :U is undefined
17:27 else does that mean it's required, or...?
17:27 lizmat required for matching
17:27 tadzik it's still required
17:28 lizmat m: multi sub a(Int:U $a) { say "int" };  multi sub a(Int:D $a) { say $a }; a(Int); a(42)
17:28 camelia rakudo-moar 1785ea: OUTPUT«int␤42␤»
17:29 else Int is a value?
17:30 jnthn Int is a type, but types are values in Perl 6 also
17:31 jnthn :D means "only instance of the type", :U means "only the type"
17:31 else is that code the p6-idiomatic way of sub { say (defined($_[0]) and $_[0] or "int") }?
17:31 else i see
17:32 jnthn It's used quite heavily in the internals. A bit less so in typical user code.
17:32 jnthn Or much less so, is perhaps fair.
17:33 else yeah, i'm looking at internals
17:33 else is there a place in the synopses where it's documented?
17:33 jnthn It'll be in S12 somewhere
17:33 PerlJam else: S12:1630 or so
17:33 synopsebot Link: http://perlcabal.org/syn/S12.html#line_1630
17:34 else thanks guys
17:37 xinming_ joined #perl6
17:41 andreoss left #perl6
17:42 blackbolt joined #perl6
17:43 xinming joined #perl6
17:44 [Coke] .seen ingy
17:44 yoleaux I saw ingy 12 Nov 2014 18:28Z in #perl6: <ingy> there was a bit of dissent but I think I've worked through it with everyone.
17:47 andreoss joined #perl6
17:48 andreoss say ([<a b>; <c d>]).map(*.reverse).reduce: * ~ *; # works
17:48 andreoss say ([<a b>; <c d>]).map(*.reverse).reduce: * Z *; # doesnt work
17:48 andreoss why?
17:48 andreoss m: say ([<a b>; <c d>]).map(*.reverse).reduce: * Z *;
17:48 camelia rakudo-moar 1785ea: OUTPUT«Type check failed in binding &with; expected 'Callable' but got 'List'␤  in method reduce at src/gen/m-CORE.setting:9262␤  in block <unit> at /tmp/hpnExaI3Fp:1␤␤»
17:50 kaleem joined #perl6
18:04 andreoss left #perl6
18:36 FROGGS joined #perl6
18:36 grettis joined #perl6
18:41 rurban joined #perl6
18:44 Mso150 joined #perl6
19:03 raiph joined #perl6
19:06 jnthn .tell andreoss well, the immediate reason is that Z appears not to be one of the operators that whatever-curries.
19:06 yoleaux jnthn: I'll pass your message to andreoss.
19:07 jnthn dinner &
19:10 denis_boyun joined #perl6
19:10 FROGGS_ joined #perl6
19:13 nige joined #perl6
19:14 nige hi
19:15 nige masak++ enjoyed your strange loop draft
19:15 nige some interesting ideas there
19:16 Isp-sec joined #perl6
19:18 nige it's been a while since I read Hofstadter's I'm a strange loop - but there is an interesting example of a strange loop - when you stand between two mirrors
19:18 nige then suddenly they go recursive and infinite
19:19 nige as the mirrors reflect each other
19:20 nige just wanted to throw that little meme on the fire ;-)
19:30 japhb joined #perl6
19:41 ptc_p6 joined #perl6
19:50 moritz \o
19:51 moritz does anybody know a Chris Collins (in the context of Perl 6)?
20:00 guru joined #perl6
20:00 masak nige: thanks.
20:01 nige np
20:02 nige was wondering it 'time' could be another category of strange loop that Perl6 is closing in on :-)
20:02 nige s/it/if/g
20:07 masak how do you mean?
20:07 masak unfortunately, Rakudo does not implement a time machine.
20:08 telex joined #perl6
20:09 nige :-)
20:10 nige the PHASERS are a way of declaring what happens in time
20:10 masak oh, that is true.
20:10 nige and then there's promises as far as the FUTURE is concerned
20:11 masak but it's hard to make an argument that Perl 6 is built from phasers.
20:11 masak whereas it *is* built from grammars, OO, and program elements.
20:11 vendethiel .oO( or is it )
20:11 vendethiel they're just in a phase you can't see
20:11 itz_ grrr I broke pl6anet.org (freebsd-update went wrong) trying to fix
20:12 moritz itz_: want to run it on www.p6c.org?
20:14 ninjazach joined #perl6
20:15 nige is there a time-based aspect to macros?
20:16 masak well, I guess you can put phasers in a macro.
20:16 masak haven't really thought about it enough...
20:16 masak I can see CHECK or INIT phasers being quite attractive to have there.
20:16 itz_ moritz: I've just got a console password so I may be able to repair
20:17 masak and perhaps injecting PRE and POST phasers as well.
20:17 itz_ moritz: I probably should put a backup of the setup on p6c anyway
20:17 nige so a macro could manipulate time ...
20:19 moritz itz_: what do you need for that?
20:23 ninjazach This is the appropriate place for rakudo discussion correct?
20:23 masak correct.
20:23 * masak .oO( or, channeling pm, "NO!" ) :P
20:24 ninjazach thank you :)
20:24 masak anything in particular on your mind?
20:24 itz_ ah a console reboot fixed it
20:25 itz_ moritz: it's just a cron job using perlanet (CPAN etc) writing flat files
20:26 itz_ I need to put the config on github really
20:26 raiph joined #perl6
20:26 moritz itz_: if you do that (and a small README telling me which modules to use), I'll set up a mirror
20:27 ninjazach I figure that I use perl quite often. It will be a good idea to track perl6 development. I just plan on idling and participate once in a while.
20:27 PerlJam ninjazach: oh, it's best to play quite a bit too  :)
20:27 itz_ moritz: sure I'll do that in the next few mins and send details
20:28 moritz ++itz_
20:28 moritz and itz_++ for running it in the first place :-)
20:28 ingy [Coke]: what's up?
20:28 atroxaper joined #perl6
20:28 [Coke] ingy: needed IRC ops someplace, but we're covered now. Thanks.
20:28 masak ninjazach: writing small scripts for yourself is a great way to get involved.
20:28 masak ninjazach: and using the camelia bot is a great way to ask specific questions.
20:28 ingy [Coke]: ah yeah. saw in #parrot just now
20:29 PerlJam ingy: were you idling on #perl earlier?
20:31 PerlJam ingy: There was a guy having trouble with some XS problem and he ended up using Inline::C to solve it.  ...  <hesperos> now just need to get myself a t-shirt: "Love Inline::C"
20:32 masak aww :)
20:33 ingy :)
20:33 ingy Now he can use Inline::Module to put it on CPAN
20:33 ingy TPF++
20:45 [Coke] ingy++
20:45 [Coke] keep up the good work!
20:54 pecastro joined #perl6
21:02 itz_ moritz: https://github.com/stmuk/pl6anet.org
21:05 Mso150_y joined #perl6
21:09 masak nige: here. :)
21:09 nige ok
21:10 masak m: macro foo { say "2"; quasi { say "4" } }; BEGIN { say "1" }; foo; BEGIN { say "3" }
21:10 camelia rakudo-moar 1785ea: OUTPUT«1␤2␤3␤4␤»
21:10 masak nige: look at the above; it should tell you a bit about the timing of macros :)
21:10 masak nige: feel free to ask follow-up questions.
21:11 nige ok sec
21:11 Mso150_y_a joined #perl6
21:11 nige need another after dinner mint ;-)
21:13 nige not sure what the quasi does? - I assume it install say "4" wherever foo is called?
21:13 masak yes, exactly.
21:14 lizmat m: my $a = "aa"; say --$a   # should say "z" I think, instead of fail
21:14 camelia rakudo-moar 1785ea: OUTPUT«Decrement out of range␤  in method gist at src/gen/m-CORE.setting:13843␤  in sub say at src/gen/m-CORE.setting:16601␤  in block <unit> at /tmp/l6bTpFDAJN:1␤␤»
21:14 masak each call to `foo;` eventually gets physically replaced by the quasi block.
21:14 nige ok - cool
21:14 masak so if you could pause and look at the program before it starts running, you'd see the inserted quasi block.
21:14 lizmat m: my $a = "z"; say ++$a   # the other way works
21:14 camelia rakudo-moar 1785ea: OUTPUT«aa␤»
21:14 masak m: macro foo { say "2"; quasi { say "5" } }; BEGIN { say "1" }; say "4"; foo; BEGIN { say "3" }
21:14 camelia rakudo-moar 1785ea: OUTPUT«1␤2␤3␤4␤5␤»
21:14 masak actually, that's more illustrative still.
21:15 masak so, BEGIN (1, 3) runs at compile time. macros (2) too. the rest of the code (4, 5) runs at runtime.
21:15 * vendethiel ponders
21:15 vendethiel masak: hehehe. BEGIN time being part of the language is really cool. I impress lots of people by telling them this works:
21:16 nige needs 2 after dinner mints
21:16 vendethiel m: role Foo[Str $s] { method x { $s } }; sub do-uc($s) { $s.uc }; say Foo[do-uc("Hey")].x;
21:16 camelia rakudo-moar 1785ea: OUTPUT«HEY␤»
21:17 masak yeah, BEGIN time is pretty cool.
21:17 vendethiel masak: "lol, dependently-typed stuff is so 1990"
21:18 bartolin lizmat: I seem to remember some discussion about this behaviour. the conclusion was (IIRC) that decrements which reduce the number of characters would be ambiguous. I'll try to find a link ...
21:21 bartolin lizmat: probably this discussion: http://irclog.perlgeek.de/perl6/2013-05-30#i_7133188
21:21 nige thanks masak - interesting - I didn't expect BEGIN to fire before the macro
21:21 nige are there any other phasers that fire before macro?
21:22 vendethiel nige: no - macros *ARE* begin blocks.
21:22 masak both BEGIN and macro calls fire ASAP.
21:22 masak vendethiel: they're not actually BEGIN blocks, but they fire just as soon.
21:22 vendethiel nige: if BEGIN blocks were called *BEFORE* macros, the "3" in masak's example would get echo'd before 2
21:22 nige ah ok - so execution order is the point here
21:22 vendethiel masak: yeah, i'm oversimplifying
21:22 masak think of the execution time of BEGIN blocks and macro invocation as "when the parser passes over them".
21:23 masak because that is indeed when it happens.
21:23 brrt joined #perl6
21:23 masak for BEGIN blocks, the parser needs to see the '}', then it lets the runtime run the block.
21:23 masak for macro calls, the parser needs to read up until the last macro argument.
21:23 masak both BEGIN blocks and macro calls are a way to interleave user code in the middle of parsing.
21:24 masak but macro calls also (optionally) leave a quasi block in the actual code, replacing the macro call itself.
21:26 denis_boyun joined #perl6
21:27 nige hmm - thanks for the example I just put the macro at the end and got: 1 3 4 2
21:27 nige which I take to mean the quasi didn't get installed
21:27 nige as the lexical scope passed in time
21:27 masak yeah; that's supposed to be illegal.
21:28 masak it can't call the macro at parse time if it hasn't seen it.
21:28 masak I filed an RT ticket about that the other week.
21:28 masak Post scheduled for: Dec 17, 2014 @ 0:01 -- loopy post scheduled for tomorrow
21:29 masak ah, here: https://rt.perl.org/Ticket/Display.html?id=123419
21:29 masak nige: right now, what happens is the parser goes "oh, `foo;`, that's probably an post-declared subroutine. well, that's fine."
21:29 nige thinks about  the temporal aspects of macros  ... and strange loops
21:30 nige ok
21:30 masak except it isn't fine. compiler's supposed to go bananas when it realized that was a *macro* and it missed calling it 'cus it was post-declared!
21:30 masak so we have to install a CHECK-time error for that.
21:30 nige ok
21:31 masak (so pretend you got an error when putting the macro last) :P
21:31 nige ok ;-)
21:31 nige although I wonder if the temporal aspects of macros should be PHASERED?
21:32 masak in a sense, they already are.
21:32 nige MACRO {     }
21:32 masak as vendethiel pointed out, macros fire at BEGIN time.
21:33 nige missed that ... sec ... wonders why not before?
21:33 masak there is no before :)
21:33 masak BEGIN time is the earliest there is.
21:33 masak before that, the parser hasn't *seen* your code.
21:33 timotimo it'd be weird to have MACRO { ... } because it gets invoked when the parser sees the invocation of the macro, not its definition
21:34 masak yeah, I didn't get the idea of a MACRO phaser.
21:35 masak still sounds to me like it emanates from a misunderstanding of something.
21:35 nige yes probably
21:35 masak but that's fine :)
21:35 masak let me see if I can dig up a blog post where I explain all this.
21:35 timotimo misunderstandings lead to unexpected questions which lead to exploring stuff that you may have taken for granted so far
21:36 nige just trying to learn why BEGIN and macro are interleaved
21:37 timotimo macros and BEGIN blocks fire at the same time, but BEGIN blocks "turn into" the value you've calculated inside whereas macros "turn into" the code you've created as result of running the macro
21:38 masak nige: because both fire as soon as they're parsed.
21:38 masak nige: think of two "cursors" running across your code. first the parser, and then the runtime.
21:38 timotimo masak: a BEGIN block could be implemented using a macro, right?
21:39 masak nige: BEGIN blocks and macro invocations fire as soon as the first, parser, cursor finds them.
21:39 masak timotimo: yes, provided there was a mechanism to eval AST arguments.
21:39 timotimo like macro BEGIN($a_block) { my $result = $a_block(); quasi { {{{ $result }}} } } OSLT
21:40 timotimo i hope that example/idea helps rather than hinders
21:40 masak yes, modulo that call, because $a_block contains an AST, not a callable.
21:40 masak but yeah, that's a good approximation, except for that.
21:40 timotimo right, fair enough
21:40 japhb Just looked at the Rakudo git logs ... does anyone around know why 1785eaf676fca9159a79f33467ede801ec881446 was necessary?  (What are r-p and r-j handling incorrectly?)
21:40 timotimo in that case it'd be more like my $result = qast_eval($a_block)()
21:41 japhb It looks like some kind of incorrect booleanization ...?
21:42 masak timotimo: yes.
21:42 * timotimo is off
21:42 masak nige: dunno if it helps, but http://strangelyconsistent.org/blog/macros-what-are-they-really was the closest I found.
21:42 nige cool thanks
21:42 hoelzro is there a difference between if my $foo = expr() { ... } and if expr() -> $foo { ... }?
21:42 * hoelzro looked at the commit japhb mentioned
21:42 masak hoelzro: scoping.
21:43 bartolin japhb: I saw broken builds for r-p and r-j: http://irclog.perlgeek.de/perl6/2014-12-16#i_9812687 (there's a gist as well)
21:43 masak hoelzro: '-> $foo' lives in the if block. 'my $foo' lives in the containing block.
21:43 lizmat japhb: moar is more forgiving than parrot / jvm
21:43 hoelzro oh, so this is legal? if my $foo = expr() { ... } ; say($foo)
21:43 masak right.
21:43 timotimo wasn't moar often "more strict" with regards to 6model stuff?
21:44 timotimo as compared to parrot at least
21:44 lizmat well, this isn't strictly 6module stuff
21:44 hoelzro interesting
21:44 hoelzro masak++ # explanation
21:44 lizmat this is a method returning nqp's Mu upon not finding anything
21:44 lizmat and nqp-p and nqp-j not being able to handle that
21:44 hoelzro that's an interesting difference between P5 and P6 I'd never noticed
21:45 hoelzro oh, I guess that's *not* different
21:45 ninjazach joined #perl6
21:45 lizmat I basically looked for similar patterns in the nqp code, and found that find_method calls where guarded that way
21:45 hoelzro oh, no, it is
21:45 lizmat and the new one of jnthn wasn't
21:46 lizmat japhb: does that make sense to you ?
21:46 aborazmeh joined #perl6
21:48 lizmat m: class A {}; role A {}
21:48 camelia rakudo-moar 1785ea: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/FTBOiotNUPâ�¤Redeclaration of symbol Aâ�¤at /tmp/FTBOiotNUP:1â�¤------> [32mclass A {}; role A [33mâ��[31m{}[0mâ�¤    expecting any of:â�¤        statement listâ�¤        horizontal whitespace…»
21:48 lizmat seems legit, right?
21:49 lizmat m: role A {}; class A {}  # huh?
21:49 camelia rakudo-moar 1785ea: OUTPUT«===SORRY!===␤Cannot find method 'is_composed'␤»
21:49 masak yeah, LTA error.
21:49 timotimo ah, roles are never composed
21:49 nige hypothetically speaking ... could macros fire before BEGIN blocks in some kind of pre-BEGIN phaser?
21:49 timotimo something is checking for is_composed to see if we're in a class A { class A { } } situation perhaps
21:49 lizmat m: role A {}; say A.new.WHAT
21:49 camelia rakudo-moar 1785ea: OUTPUT«(A)␤»
21:49 masak nige: macros can not fire any earlier than they do.
21:49 lizmat looks like roles are composed sometimes  :-)
21:50 masak nige: because they already fire at the earliest possible time, just as the parser finds them.
21:50 masak nige: there is no sooner than that.
21:50 masak nige: so, no. not even hypothetically speaking :)
21:50 nige ok - but some other BEGIN may have fired before
21:51 masak yes, because they also fire as soon as they can.
21:51 nige so the macro does not first in that case
21:51 timotimo we only do a single pass over the code when compiling
21:51 timotimo er. a single parsing pass
21:51 masak nige: if you put a BEGIN block before a macro invocation, the BEGIN block will fire first because the parser sees it first.
21:51 timotimo a macro that appears later in the code file can not fire earlier than a begin block that ends earlier in the file
21:52 masak m: macro foo { say "macro"; Nil }; BEGIN { "BEGIN block" }; foo
21:52 camelia rakudo-moar 1785ea: OUTPUT«macro␤»
21:52 masak m: macro foo { say "macro"; Nil }; BEGIN { say "BEGIN block" }; foo
21:52 camelia rakudo-moar 1785ea: OUTPUT«BEGIN block␤macro␤»
21:52 masak m: macro foo { say "macro"; Nil }; foo; BEGIN { say "BEGIN block" }
21:52 camelia rakudo-moar 1785ea: OUTPUT«macro␤BEGIN block␤»
21:53 masak the only thing that's confusing about this is that the execution phase we're talking about here is while the parser is running. most people are not used to thinking about a runtime doing anything at all during that phase.
21:53 nige hmm - yes I was thinking just about this parsing phase
21:54 nige before execution happens
21:55 nige I imagined that in any given module there would be a parsing phase - followed by an execution phase
21:55 timotimo that's what phasers are about
21:55 timotimo BEGIN is during the parsing phase
21:55 timotimo because you can do things in there that change the way the future parsing behaves
21:56 timotimo INIT is ASAP during the execution phase
21:56 timotimo and with that, i'm off to bed
21:56 lizmat gnight timotimo
21:56 masak 'night, timo
21:56 nige night timotimo++ thanks for your help
21:57 timotimo i hope i could be of any help :)
21:58 lizmat NR.pm shutting down, decommute&
22:01 masak since `::` is not implemented in rules, what do people use instead?
22:02 masak oh, `{}`, it seems.
22:03 atroxaper joined #perl6
22:03 virtualsue joined #perl6
22:04 mvuets joined #perl6
22:06 masak gah, another case where introducing Grammar::Tracer changes the outcome. :(
22:06 masak in this case it actually made the grammar pass instead of (unexpectedly) fail.
22:06 masak I'm starting to think I'll have to golf this one -- it's just not viable not to have a way to debug my grammar.
22:12 LLamaRider joined #perl6
22:15 LLamaRider o/ #perl6
22:16 lt joined #perl6
22:16 masak LLamaRider! \o/
22:16 vendethiel o/
22:17 LLamaRider My one and only working P6 module regressed, so I came to ask for sage advice
22:17 labster joined #perl6
22:17 LLamaRider it's a rather mysterious (to me) regex error
22:17 LLamaRider https://github.com/dginev/perl6-Lingua-EN-Sentence/blob/master/lib/Lingua/EN/Sentence.pm6#L161
22:17 LLamaRider No such method 'PAP' for invocant of type 'Cursor'
22:17 LLamaRider ---
22:17 LLamaRider if that makes sense to anyone, advice is very welcome :)
22:18 colomon what is PAP?
22:18 LLamaRider it's a token
22:18 LLamaRider link holds the source
22:19 colomon oh, you defined it.
22:20 LLamaRider this module used to pass its tests happily until 4-5 months ago. Didn't look at it for a while, so I don't know when it regressed exactly
22:20 colomon LLamaRider: Lingua::EN::Sentence, yes?
22:21 LLamaRider yep
22:23 colomon LLamaRider: give me a minute here....
22:23 LLamaRider no rush, it waited for a few months already >:D
22:26 colomon okay, worked in 05/06
22:27 colomon failed today
22:27 LLamaRider a biannual bisect? :-)
22:27 colomon worked in 08/03
22:27 erkan joined #perl6
22:28 colomon 10/03
22:28 colomon 11/03
22:28 colomon failed 12/03
22:28 pyrimidine bisect is awesome
22:28 colomon worked 11/15
22:28 masak wow, non-ISO dates are so confusing.
22:28 colomon failed 11/25
22:28 masak it took me a while to realize those even were dates.
22:29 colomon failed 11/20
22:29 pyrimidine the suspense is killing me
22:29 colomon worked 11/17
22:29 colomon failed 11/18
22:29 colomon there you have it.
22:30 masak waitwait, you haven't narrowed it down to a commit yet.
22:30 colomon don't smoke every commit, just every day
22:30 masak oh, ok.
22:30 colomon LLamaRider is now in good position to figure out which commit it was
22:30 masak yeah.
22:31 * masak has a look and tries to guess
22:31 LLamaRider rakudo source, here i come
22:31 * colomon just got an e-mail saying "Relive the year on Twitter!" and his first repsonse was "Noooooooo!"
22:31 masak heh, I bet you'll find it was f2ffb9a384b01a276e4187908e4f81f9878681f3 :)
22:33 colomon I dunno, 7bb36563ad10cb268b4715617b3a7f82085c907f seems like it might be relavant.
22:34 masak oh, yes.
22:34 masak I seem to recall some IRC log about that one.
22:34 * masak looks
22:35 LLamaRider I like 7bb as well, seems most directly related to the error
22:36 masak yeah.
22:36 jnthn joined #perl6
22:36 * colomon wonders if we should start a betting pool....
22:36 jnthn bah, irssi or screen wedged for some reason :/
22:37 masak no, I can't find any IRC discussion about the method/sub change.
22:37 masak time for me to hit the hay.
22:37 masak 'night, #perl6
22:37 colomon o/
22:37 colomon and \o jnthn
22:38 LLamaRider r: my token termpunct { <[.?!]> }; say "Hello!" ~~ s:g/(<.termpunct>)//;
22:38 camelia rakudo-moar 1785ea: OUTPUT«No such method 'termpunct' for invocant of type 'Cursor'␤  in method match at src/gen/m-CORE.setting:6703␤  in method subst-mutate at src/gen/m-CORE.setting:6784␤  in method subst-mutate at src/gen/m-CORE.setting:4083␤  in block <unit> at /tmp/tmpf…»
22:38 camelia ..rakudo-parrot 1785ea: OUTPUT«No such method 'termpunct' for invocant of type 'Cursor'␤  in regex  at /tmp/tmpfile:1␤  in regex  at /tmp/tmpfile:1␤  in method match at gen/parrot/CORE.setting:6710␤  in method subst-mutate at gen/parrot/CORE.setting:6790␤  in method subst-mu…»
22:40 colomon m:  my token termpunct { <[.?!]> }; say "Hello!" ~~ s:g/(<termpunct>)//;
22:40 camelia rakudo-moar 1785ea: OUTPUT«Cannot assign to an immutable value␤  in method subst-mutate at /home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:1␤  in method subst-mutate at src/gen/m-CORE.setting:4083␤  in block <unit> at /tmp/QFWoAYjbNY:1␤␤»
22:40 LLamaRider even shorter:
22:40 colomon m:  my token termpunct { <[.?!]> }; say "Hello!" ~~ /(<termpunct>)/;
22:40 camelia rakudo-moar 1785ea: OUTPUT«「!」␤ 0 => 「!」␤  termpunct => 「!」␤␤»
22:40 LLamaRider r: my token a {a}; say "Hello!" ~~ /<.a>/;
22:40 camelia rakudo-parrot 1785ea: OUTPUT«No such method 'a' for invocant of type 'Cursor'␤  in regex  at /tmp/tmpfile:1␤  in method ACCEPTS at gen/parrot/CORE.setting:14236␤  in method ACCEPTS at gen/parrot/CORE.setting:867␤  in block <unit> at /tmp/tmpfile:1␤␤»
22:40 camelia ..rakudo-moar 1785ea: OUTPUT«No such method 'a' for invocant of type 'Cursor'␤  in method ACCEPTS at src/gen/m-CORE.setting:14297␤  in block <unit> at /tmp/tmpfile:1␤␤»
22:40 colomon m:  my token termpunct { <[.?!]> }; say "Hello!" ~~ /(<.termpunct>)/;
22:40 camelia rakudo-moar 1785ea: OUTPUT«No such method 'termpunct' for invocant of type 'Cursor'␤  in method ACCEPTS at src/gen/m-CORE.setting:14297␤  in block <unit> at /tmp/8FtrfW2ghl:1␤␤»
22:41 jnthn . should only find methods
22:41 ninjazach joined #perl6
22:41 jnthn Use & to find subs
22:41 LLamaRider <.space> and <.ws> are methods?
22:41 jnthn Yes.
22:41 jnthn m: say ?Cursor.can('ws')
22:42 camelia rakudo-moar 1785ea: OUTPUT«True␤»
22:42 jnthn m: say ?Cursor.can('space')
22:42 camelia rakudo-moar 1785ea: OUTPUT«True␤»
22:42 LLamaRider now I know what to refactor, thanks :)
22:43 ninjazach Rakudo :) sounds like a move Ryu from Street Fighter would do :) love it
22:43 dwarring joined #perl6
22:44 LLamaRider btw, +1 for a more suggestive error message in this case
22:45 LLamaRider colomon: I pushed a fully operational Lingua::EN::Sentence, how do I tell panda to have it in mind?
22:46 LLamaRider or I just wait for a scheduled recheck?
22:46 LLamaRider jnthn++ thanks again for that pro tip :)
22:49 jnthn np :)
22:51 LLamaRider panda already uses the newest commit, sweet :)
22:51 aborazmeh joined #perl6
22:53 colomon LLamaRider: you don't need to do anything, panda gets the latest version from your github repo.
22:53 colomon just checked, and it worked for me.
22:54 LLamaRider \o/
22:55 LLamaRider then I shall take my leave for now, if only all regressions were resolved so smoothly :-)
22:55 LLamaRider \o have fun
23:00 dj_goku joined #perl6
23:00 dj_goku joined #perl6
23:09 aborazmeh joined #perl6
23:12 dalek roast: d692769 | jnthn++ | S12-methods/fallback.t:
23:12 dalek roast: Test invoke/postcircmfix:<( )> interaction.
23:12 dalek roast: review: https://github.com/perl6/roast/commit/d69276985a
23:14 pecastro joined #perl6
23:16 erkan joined #perl6
23:16 erkan joined #perl6
23:33 [Sno] joined #perl6
23:35 aborazmeh joined #perl6
23:35 aborazmeh joined #perl6
23:39 ninjazach2 joined #perl6
23:45 BenGoldberg joined #perl6
23:46 erkan joined #perl6
23:54 ninjazach joined #perl6
23:59 dalek specs: e15acbc | jnthn++ | S12-objects.pod:
23:59 dalek specs: Re-purpose the method ^foo(...) { ... } syntax.
23:59 dalek specs:
23:59 dalek specs: The existing design of it was out of line with the way Perl 6 evolved
23:59 dalek specs: since then, and also not especially useful. This takes the syntax and
23:59 dalek specs: enables its use for per-type meta-behavior specialization. This, as a
23:59 dalek specs: special case, allows attaching extra metadata to the meta-object,
23:59 dalek specs: which captures some aspect of what the syntax was originally specified
23:59 dalek specs: to do. However, it maintains the distinction between objects and their
23:59 dalek specs: meta-objects more strongly, which also fits better with the overall
23:59 dalek specs: Perl 6 design.
23:59 dalek specs: review: https://github.com/perl6/specs/commit/e15acbc12e

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

Perl 6 | Reference Documentation | Rakudo