»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:08 aborazmeh joined
lizmat advent post preview: perl6advent.wordpress.com/2014/12/1...ew_id=2695 00:08
00:09 BenGoldberg joined 00:12 daxim joined 00:14 erkan left 00:17 erkan joined, erkan left, erkan joined 00:23 atroxaper joined
brrt 404 file not found :-) 00:27
brrt afk
but will note in passing that freezing water is a ridiculously energy-intensive activity
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:28
00:28 atroxaper left, brrt left 00:34 gfldex left
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
they are, after all, just slangs
lizmat will do
TimToady: if you reload the preview, there should be a mention of it 00:48
using a quote from the Synopsis
TimToady I think you lost a <...> after quote: 00:50
lizmat ah, yes :-)
TimToady not that we'll necessarily end up with that macro syntax, but it's suggestive anyway 00:51
lizmat fixed
and published: perl6advent.wordpress.com/2014/12/...-steroids/ 00:54
will look at any further comments tomorrow 00:55
first I need some sleep
so good night, #perl6!
TimToady schlop schön 00:56
01:02 konsolebox left 01:24 konsolebox joined 01:28 kurahaupo1 joined
vendethiel nice :)! 01:33
lizmat++ 01:34
01:37 tinyblak joined 01:38 tinyblak_ joined 01:42 tinyblak left 01:52 kurahaupo1 left 01:53 erkan left 01:56 erkan joined 02:01 BenGoldberg left, BenGoldberg joined 02:02 aborazmeh left 02:04 slimjimflim joined 02:05 slimjimflim left 02:06 doublelel joined 02:08 raiph joined 02:09 kurahaupo1 joined 02:10 BenGoldberg left, BenGoldberg joined, grettis left 02:15 rmgk_ joined, rmgk is now known as Guest17728, Guest17728 left, rmgk_ is now known as rmgk 02:17 Khisanth left 02:23 kurahaupo1 left 02:25 tinyblak_ left, tinyblak joined
dalek ast: ac5776a | (Jimmy Zhuo)++ | S02-magicals/env.t:
Fixed a %*ENV test.

This test fails sometimes because .gist does .sort action, and it ignores some infos when $*ENV has 100+ keys. Change the key to upper-case to make sure which we want is not at the end.
02:26
02:26 tinyblak_ joined 02:27 tinyblak left 02:31 aborazmeh joined 02:34 adu joined 02:38 erkan left 02:39 erkan joined 02:40 BenGoldberg left, [Sno] left, kurahaupo1 joined 02:47 BenGoldberg joined 02:48 BenGoldberg left 02:49 BenGoldberg joined 02:51 BenGoldberg left, BenGoldberg joined 02:52 BenGoldberg left 02:53 BenGoldberg joined, BenGoldberg left 02:54 BenGoldberg joined 02:58 BenGoldberg left 03:00 BenGoldberg joined 03:01 BenGoldberg left 03:03 BenGoldberg joined 03:05 noganex joined 03:07 noganex_ left 03:10 adu left 03:12 Mso150 joined 03:13 jack_rabbit joined 03:22 Khisanth joined 03:25 BenGoldberg left, BenGoldberg joined 03:30 kurahaupo1 left, Mso150 left 03:34 Mso150 joined 03:39 chenryn joined 03:40 atroxaper joined 03:45 BenGoldberg left 03:46 BenGoldberg joined, atroxaper left 03:56 Mso150 left 04:04 BenGoldberg left 04:05 BenGoldberg joined 04:18 anaeem1 joined, anaeem1 left 04:19 anaeem1 joined 04:20 anaeem1 left 04:21 anaeem1 joined 04:24 BenGoldberg left, BenGoldberg joined 04:25 [Sno] joined 04:26 sorear joined 04:29 chenryn left 04:32 aborazmeh left 04:34 salv0 left 04:35 salv0 joined, vendethiel left 04:36 flussence joined 04:37 vendethiel joined, isacloud joined 04:38 m_athias joined, brother joined 04:40 ggherdov joined 04:41 erkan left 04:43 erkan joined 04:54 chenryn joined 04:56 BenGoldberg left
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:00 tinyblak_ left
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:01
05:02 kaare_ joined, tinyblak joined 05:13 erkan left 05:16 erkan joined 05:18 atroxaper joined 05:25 atroxaper left 05:26 ssqq joined, esaym153 joined 05:27 doublelel left 05:28 mr-foobar left 05:33 erkan left 05:36 erkan joined, erkan left, erkan joined 05:37 ssqq left 05:39 ssqq joined
[Coke] I'm sure p5 has a perfectly good answer to that question we can steal. 05:39
05:40 doublelel joined
ugexe Test::More aborts with the message "You tried to plan twice" 05:43
05:44 erkan left 05:47 erkan joined 05:50 chenryn left, sorear left, chenryn joined
JimmyZ we have sub test 05:51
it's in Test.pm
ugexe i was pointing out how p5 currently handles it 05:52
05:52 sorear joined 05:54 ssqq left 05:55 [Sno] left 05:56 telex left 05:58 telex joined 05:59 raiph left, tinyblak left 06:00 tinyblak joined 06:02 kaare_ left 06:04 erkan left
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:05
06:07 chenryn left 06:08 tinyblak left
ugexe ohhh you mean s/sub test/subtest/ 06:08
JimmyZ++
06:09 tinyblak joined
JimmyZ yeah 06:09
06:12 chenryn joined
[Coke] you could easily add a state variable to plan that barfs if it's already set. 06:19
FWIW, I'm fine with that.
06:23 kaare_ joined 06:26 mr-foobar joined
bartolin my automatic builds of parrot and jvm failed this night: gist.github.com/usev6/7dd0d087f0b780b2e756 06:28
(with Null PM access and NullPointerException, respectively)
06:33 tinyblak left 06:34 tinyblak joined 06:38 erkan joined 06:43 [Sno] joined 06:51 atroxaper joined 06:53 kaleem joined, mr-foobar left 06:55 atroxaper left 06:58 tinyblak left 06:59 tinyblak joined 07:00 konsolebox left
TimToady yes, the FALLBACK patch seems to kill both the non-moar builds 07:27
07:27 konsolebox joined 07:28 doublelel left 07:31 kurahaupo joined 07:36 Isp-sec joined 07:37 rurban_ joined, [TuxCM] joined 07:39 chenryn left 07:46 ptc_p6 joined 07:51 chenryn joined 07:52 konsolebox left, chenryn left 07:54 fhelmberger joined 08:01 brrt joined
brrt gjs must be the most crash-prone interpreter ever 08:01
08:02 chenryn joined 08:03 phate^ joined 08:04 ptc_p6 left 08:05 ptc_p6 joined
moritz brrt: you don't know early-days rakudo or pugs :-) 08:05
brrt that is true :-) 08:06
on the other hand, gjs is supposedly production ready
moritz Null PMC Access -- 'nough said
08:07 blackbolt joined 08:08 phate^ left 08:11 baest_ is now known as baest 08:12 zakharyas joined 08:13 kurahaupo left, rurban joined
nwc10 clean perl6-m build passes on "my" machine 08:14
08:15 darutoko joined 08:19 rurban left 08:25 gfldex joined
rurban_ parrot-6.11.0 released, 15-25% faster. www.parrot.org/ 08:29
brrt darn, not having param_rp_i stings for the jit :-( 08:32
08:33 blackbolt left
woolfy rurban++ 08:34
moritz rurban_: what makes it so much faster? 08:37
08:38 atroxaper joined
brrt rurban++ :-) 08:38
08:43 atroxaper left 08:45 kaleem left 08:47 blackbolt joined 08:51 brrt left 08:52 doublelel joined 08:54 bjz left, bjz joined
rurban_ the nqp/qrpa idea for resizablepmcarray. move an offset on shift 08:57
plus some additional rpa optimizations 08:58
github.com/parrot/parrot/issues/1152
mathw morning 09:01
09:03 sqirrel joined, rindolf joined, tinyblak left 09:04 tinyblak joined 09:05 konsolebox joined
moritz rurban_: rakudo setting compilation on parrot master fails with "Null PMC access in get_bool()" here 09:06
09:06 kaleem joined 09:07 ptc_p6 left, kurahaupo joined, molaf_ joined 09:10 Mso150 joined, molaf left 09:11 tinyblak left 09:12 tinyblak joined
moritz and iiuc, rakudo won't benefit much from the performance improvement, because it already uses qrpa. Right? 09:13
rurban_ nope. it was much faster with rakudo also 09:14
moritz ok, cool 09:15
now if it'd only compile...
rurban_ I still have to rewrite nqp to get rid of qrpa, I'm not good with nqp.
Mostly to add threads support for nqp-p
But currently I'm too busy with a type inferencer for p2 09:16
09:16 awwaiid joined 09:17 rurban joined, rurban left 09:18 vendethiel left 09:19 vendethiel joined 09:20 rindolf left 09:21 dakkar joined 09:22 ptc_p6 joined 09:27 dsm joined 09:29 tinyblak left 09:30 tinyblak joined
arnsholt The .WHAT of a type object is just the type object itself, no? 09:37
moritz arnsholt: yes 09:41
m: say Int.WHAT === Int 09:42
camelia rakudo-moar d6d08d: OUTPUT«True␤»
09:43 atroxaper joined 09:47 atroxaper left 09:49 erkan left 09:50 doublelel left 09:51 erkan joined 09:53 kurahaupo left 09:58 tinyblak left 09:59 brrt joined, tinyblak joined 10:03 doublelel joined
brrt ok, there is clearly a large difference between for ^40 -> int $x { func($x) } and func($_) for ^40 10:05
in simpler terms, the latter form can't strength-reduce $_ to a native int even if that is it's only use 10:06
also, i find this somewhat confusing, could someone explain: 10:10
m: sub foo(int $n) { my int $i = 1; while $n-- { $i *= 2 }; }; say foo(4);
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␤␤»
mathw you're trying to change an immutable value, so... 10:11
brrt well, why is a native int immutable
mathw because all subroutine parameters are immutable by default 10:12
IIRC
brrt hmmm
m: sub foo(int $n is copy) { my int $i = 1; while $n-- { $i *= 2; }; }; say foo(4);
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␤␤»
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␤␤»
mathw okay that I don't understand 10:15
Hopefully someone more knowledgeable can explain it
brrt neither do i :-)
mathw maybe it's a bug!
moritz brrt: -- and ++ on native types are NYI 10:17
brrt oh
moarvm has support for them
mathw moritz++ 10:19
brrt anyway, i'll work arround that then 10:21
masak good antenoon, #perl6 10:23
m: say 42.WHAT === Int
camelia rakudo-moar d6d08d: OUTPUT«True␤»
masak oh, arnsholt++'s question was about the .WHAT of a type object. my bad. 10:24
brrt say 42.WHAT.WHAT
m: say 42.WHAT.WHAT;
camelia rakudo-moar d6d08d: OUTPUT«(Int)␤»
masak yes, that falls out of the type object trying to blend in among the instance objects.
10:28 vinoths joined, vinoths left
arnsholt Yeah, that was my intuition. Just wasn't quite ready to trust that intuition =) 10:29
mathw hi masak 10:37
10:37 Isp-sec left 10:40 prevost joined 10:42 FROGGS joined
masak mathw: happy flashlight season, mathw. 10:44
mathw :) 10:46
10:50 tinyblak_ joined 10:52 brrt left 10:53 tinyblak_ left, tinyblak_ joined 10:54 tinyblak left 11:00 prevost left 11:05 Alina-malina left
vendethiel o/, #perl 11:09
6.
nwc10 \o vendethiel
masak hi vendethiel, 6.
vendethiel "6 Erroneous Nickname" 11:10
jnthn "5 Typo'd greetings" 11:11
...
"And a Christmas on IRC"
masak .oO( FIIIIIVE TYPO'D GREETINGS! )
jnthn will look at the build bustage he induced after teaching
nwc10 4 frequent questions
jnthn & 11:12
masak 3 french puns
nwc10 3 embarssing mischans
2 asks to ask
aha, masak's is better
masak :)
dalek : ffdf2fc | lizmat++ | misc/perl6advent-2014/schedule:
Move 3rd advent post to 22nd

I just realised that I will be doing the release on the 18th, which would probably not coincide well with writing an advent post.
jnthn
.oO( I'm glad oui agree )
jnthn is tempted to stay for the pun fest, but really should go teach :)
masak go, you English... kniggit! 11:13
lizmat
.oO( is it time to start a CPUN site ? )
11:13 sqirrel left
masak CPUN6, surely. 11:13
vendethiel okay, that's a lot of message for misstyping an "enter" instead of a "shift" :) 11:14
11:14 atroxaper joined
lizmat PSA: there is no one for tomorrow's advent post yet 11:14
This is Your Chance™ 11:15
11:15 Alina-malina joined
lizmat
.oO( I wonder what a Miss Typing Contest would look like )
11:15
11:17 rurban joined 11:19 sqirrel joined
lizmat Another PSA: on Thursday I will be doing the 2014.12 release of Rakudo 11:19
Suggestions for release names are welcome
I'm playing with "Berlin" (next years QA hackathon) or "Dresden" (next years GPW) 11:20
but both seem a bit premature
masak CostaRica! \o/
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 == '' .........]
masak Kampala!
blackbolt: your question was not very specific. are you looking for `prompt`? 11:22
blackbolt: what is the condition on $path you want to test, exactly?
11:23 atroxaper left
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:23
masak ok. `my $path = prompt "Enter path: "; if $path eq "" { $path = $DEFAULT }; my $contents = slurp($path);` 11:24
lizmat $path // 'default_path' ??
masak lizmat: doesn't work if the input is an empty string.
lizmat $path || 'default_path' ?? 11:25
masak yeah.
lizmat yeah, I know, '0' :-)
masak m: say "0" || "default"
camelia rakudo-moar d6d08d: OUTPUT«default␤»
masak apparently.
that feels like a p5 holdover to me, tbh.
lizmat ah,.... a P5 trap that we don't have in P6 anymore 11:26
yup
thanks to typing
afk for a bit&
masak waitwait, don't have anymore? the above eval shows we have it.
blackbolt masak: your code help me, thanks 11:27
masak blackbolt: pleased to be of service.
11:30 konsolebox left 11:32 Mso150 left
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
m: say "0" || "0.0" || "default"
camelia rakudo-moar d6d08d: OUTPUT«0.0␤»
masak m: say "0" | "0e1" | "default" 11:36
camelia rakudo-moar d6d08d: OUTPUT«any(0, 0e1, default)␤»
masak m: say "0" || "0e1" || "default"
camelia rakudo-moar d6d08d: OUTPUT«0e1␤»
masak m: say "0" || "0i" || "default"
camelia rakudo-moar d6d08d: OUTPUT«0i␤»
masak m: say "0" || "0/1" || "default"
camelia rakudo-moar d6d08d: OUTPUT«0/1␤»
moritz only the strings '' and '0' are False in boolean context 11:38
masak yes, clearly.
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␤»
moritz m: say so 'False'
camelia rakudo-moar d6d08d: OUTPUT«True␤»
masak the question is why "0" gets a free entry there, when we've successfully managed the string/number dichotomy in all other places.
it feels to me like the last place of deliberate confusion.
lue just went along with it when she first heard about "0" == False, though it's never seemed all that useful/helpful. 11:41
masak yeah, I'm wondering about the use case for it. 11:42
11:42 denis_boyun joined
moritz mostly places where people (or the system[tm]) forgot to coerce to Numeric 11:42
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?
moritz lue: integers are much more common in most type of programs
masak m: say ?"000"
camelia rakudo-moar d6d08d: OUTPUT«True␤»
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
now, of course, you might be lucky and it's postponed *forever*.
moritz masak: unless all the other coercions save you 11:45
masak but what if your records have a "000", like above?
I'd rather it "fail fast" for you, flushing out the problem early.
moritz then it's a rather atypical number representation
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 erkan left
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
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:47
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:48
11:49 erkan joined, erkan left, erkan joined, kaleem left
lue afk 11:51
11:59 Alina-malina left 12:17 doublelel left, JimmyZ_ joined 12:18 JimmyZ left, integral_ joined 12:19 rindolf joined 12:20 ruoso joined, isacloud left, isacloud_ joined, isacloud_ left, isacloud_ joined 12:21 chenryn left 12:23 Rounin joined 12:27 chenryn joined 12:29 chenryn left, BenGoldberg joined 12:31 dakkar left, [particle]1 left, abraxxa left, abraxxa1 joined 12:33 Celelibi joined, doublelel joined 12:34 chenryn joined, rurban_ left 12:35 chenryn left 12:37 [particle] joined 12:40 rurban left 12:43 rurban_ joined
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:45
moritz blackbolt: what did you do? 12:46
dev.mysql.com/doc/refman/5.0/en/com...-sync.html 12:47
masak sounds like you should post a gist of your program, so we can help you better.
FROGGS I had that too and decided to switch to postgres
12:47 dakkar joined
moritz maybe you need to .finish before executing the next statements 12:47
FROGGS++ # good man!
FROGGS :o)
masak sounds plausible.
blackbolt moritz: trying to write simple application "phone book". when i do secend time "add new person", i see that problem
moritz blackbolt: show the code please 12:48
blackbolt just pls.... don;t cry when you see that 12:49
Commands out of sync; you can't run this command now 20:06in method execute at lib/DBDish/mysql.pm6:170
ohhh my foult
moritz blackbolt: and paste your code into a nopaste service (like gist.github.com), not into the channel 12:50
blackbolt gist.github.com/anonymous/32bde3081e96e6a0fbac 12:51
vm share clipboard didin;t worked 12:52
moritz blackbolt: this code calls .execute at most once 12:53
12:53 brrt joined
brrt \o 12:53
lizmat++ for todays perl6advent
by the way
lizmat yes?
moritz blackbolt: anyway, try $sth.finish() after $sth.fetchrow_arrayref
12:53 anaeem1 left
brrt is Q any relation to Q? www.startrek.com/legacy_media/image...20x240.jpg 12:53
:-P 12:54
after all, it is nearly omnipotent
moritz omnipotent quoting, right
12:54 atroxaper joined
FROGGS ohh, I've got a daja Q 12:54
deja*
lizmat My first association was more: en.wikipedia.org/wiki/Q_(James_Bond) 12:55
blackbolt moritz: it helped, thank you
lizmat Q: "Always have an escape plan"
FROGGS *g* 12:56
12:56 rurban joined 12:57 BenGoldberg left 12:59 AndroUser2 joined 13:02 erkan left 13:03 atroxaper left 13:04 konsolebox joined 13:05 erkan joined, erkan left, erkan joined 13:06 jack_rabbit left 13:08 rindolf left 13:10 AndroUser2 left, AndroUser2 joined 13:13 AndroUser2 left 13:17 andreoss joined 13:18 blackbolt left, blackbolt joined 13:22 blackbolt left
andreoss is there perl6ish way to rotate @x[N][N] in 90 degrees? 13:22
masak zip() 13:23
13:24 rurban left
andreoss zip flattens 13:26
it could be done by for loop, by isn't there nicer way? 13:27
moritz m: my @a = [<a b c>], [<d e f>], [<g h i>]; say ([zip] @a).perl 13:28
camelia rakudo-moar d6d08d: OUTPUT«===SORRY!=== Error while compiling /tmp/k0Zs4DKvJx␤Two terms in a row␤at /tmp/k0Zs4DKvJx:1␤------> b c>], [<d e f>], [<g h i>]; say ([zip] ⏏@a).perl␤ expecting any of:␤ postfix␤ infix stop…»
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␤»
moritz m: my @a = [<a b c>], [<d e f>], [<g h i>]; say zip(@a).perl
camelia rakudo-moar d6d08d: OUTPUT«((["a", "b", "c"],), (["d", "e", "f"],), (["g", "h", "i"],)).list␤»
moritz m: my @a = [<a b c>], [<d e f>], [<g h i>]; say zip(@a.map: *.list).perl
camelia rakudo-moar d6d08d: OUTPUT«(("a",), ("b",), ("c",), ("d",), ("e",), ("f",), ("g",), ("h",), ("i",)).list␤»
moritz huh. 13:30
m: my @a = [<a b c>], [<d e f>], [<g h i>]; say (@a.map: *.list).perl
camelia rakudo-moar d6d08d: OUTPUT«("a", "b", "c", "d", "e", "f", "g", "h", "i").list␤»
moritz yes, that's already too flat
lizmat jnthn: looked at parrot breakage, seems to break in: self.find_method($obj, 'FALLBACK', :no_fallback) 13:31
13:32 spider-mario joined
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␤»
masak the structure is in there; surely it's also possible to iterate it?
m: say zip(1,2,3;4,5,6;7,8,9).tree.perl
camelia rakudo-moar d6d08d: OUTPUT«(1, 4, 7; 2, 5, 8; 3, 6, 9).item␤»
13:33 dayangkun joined
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␤»
masak \o/
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?
and how do I get from an array of arrays to the semicolon-separate form?
masak whether that's due to the primitives themselves, or to my inexperience with them, I don't know.
moritz both, I'd guess :-)
masak anyway, zip() definitely *should* be up to this task. that's what zip() *is*, a matrix transpose. 13:35
13:35 dayangkun left
masak writes an advent blog post draft 13:35
13:36 kaleem joined 13:37 anaeem1 joined
lizmat ++masak 13:38
13:44 konsolebox left
moritz masak: maybe claim a day (preferrably tomorrow :-) in the schedule? 13:50
masak sure, as soon as I have a goodenuf draft.
in the meanwhile, please continue as if we don't have a poster for tomorrow :)
13:52 FROGGS left
moritz sadly for me that means continuing with $dayjob 13:52
dalek rakudo/newio: 5a06ace | TimToady++ | src/ (7 files): 13:54
rakudo/newio: allow $x ~~ s/// to return Match or list of Match
rakudo/newio:
rakudo/newio: s/// is now implemented in terms of .subst-mutate, which returns
rakudo/newio: the matches instead of the result, just as normal matching does.
13:54 erkan left 13:55 dalek joined, ChanServ sets mode: +v dalek 13:56 guru joined
andreoss how do i stop .grep or .map from flattening? 13:59
lizmat isn't that one of the areas that the GLR would fix? 14:01
grep() would flatten, .grep would not ?
14:03 erkan joined
lizmat .tell jnthn looks like github.com/rakudo/rakudo/commit/17...01ec881446 unbreaks parrot and jvm 14:04
yoleaux lizmat: I'll pass your message to jnthn.
14:13 raiph joined 14:14 sqirrel left 14:15 rindolf joined
masak anyone have a link to Pugs' planned version milestones? 14:17
14:20 [Sno]_ joined
lizmat is now trying parrot 6.11 14:21
14:21 telex left 14:22 telex joined 14:23 jnthn_ joined 14:24 esaym joined, ugexe_ joined 14:30 [Sno] left, esaym153 left, [Sno]_ is now known as [Sno], atroxaper joined 14:32 Alina-malina joined 14:34 konsolebox joined 14:38 atroxaper left 14:43 anaeem1 left 14:45 kaare_ left
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:47
14:51 atroxaper joined 14:53 anaeem1_ joined, anaeem1_ left 14:57 tinyblak_ left
rurban_ lizmat: regressions from 6.10.0? 14:57
I rather think it's the new nqp code which causes breakage 14:58
14:58 tinyblak joined, M_o_C joined 15:02 tinyblak left
masak ok, I have my blog post draft. gist.github.com/masak/07e6d5ce3848d36161c4 15:06
not quite sure what to make of it.
comments welcome.
15:08 gfldex left, rurban joined, salv0 left 15:09 salv0 joined
lizmat rurban_: before upgrading to 6.11.0, I ran a clean spectest with HEAD on parrot 15:10
15:10 ugexe_ is now known as ugexe
PerlJam masak: "program elements" reads like "DOM for Perl" to me. 15:11
masak yep. 15:13
masak inserts that quote
lizmat 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 :)
lizmat ^^ test failures with parrot 6.11.0: gist.github.com/lizmat/dd0f88e6042e7c4ce011
masak PerlJam: in some sense, it's a matter of perspective.
PerlJam: the C compilers we use to compile the C code in Moar and Parrot have been bootstrapped. 15:16
(for example)
ugexe reminds me of the ken thompson hack 15:17
masak aye. that's strange loop + folding things in to hide them.
15:17 Alina-malina left
lizmat rurban: all the test failures checked so far end in: Can not get attribute '$!storage' declared in class 'Parcel' with this object 15:18
which is somewhere inside reification 15:19
15:19 Alina-malina joined
lizmat commute to NR.pm meeting 15:20
15:20 lizmat left 15:23 abraxxa1 left
dalek : b828ed3 | masak++ | misc/perl6advent-2014/schedule:
[advent-2014/schedule] claim tomorrow
15:28
masak my post is a little bit abstract. I'm not sure how to fix that. 15:29
when possible, I give examples of actual extensions.
15:30 woolfy left 15:33 atroxaper left, atroxaper joined
PerlJam masak: IMHO, don't fiddle with it too much. Leave it abstract. 15:37
masak ok :)
then I will. hopefully it will appeal to lovers of the abstract like me :>
15:37 atroxaper left 15:39 blackbolt joined
masak walk & 15:43
pyrimidine jnthn_++ # OS X work 15:44
masak: I recall seeing those on some of audreyt's slides at some point. Maybe SlideShare? 15:45
masak: that would be re: pugs
15:51 Alula joined 15:53 atroxaper joined 15:54 kaleem left 15:55 [Sno] left 15:56 guru left 15:57 guru joined 15:59 treehug88 joined 16:03 atroxaper left 16:12 denis_boyun left 16:13 rurban_ left 16:20 Alina-malina left 16:26 mr-foobar joined 16:27 brrt left 16:30 Alina-malina joined, rindolf left, Alina-malina left, Alina-malina joined 16:34 gfldex joined 16:38 zakharyas left 16:39 raiph left 16:41 [Sno] joined 16:46 anaeem1_ joined 16:48 anaeem1_ left, phate^ joined 16:54 phate^ is now known as hekmek 16:55 erkan left 16:58 raiph joined, kaare_ joined, kaleem joined, konsolebox left 16:59 ptc_p6 left 17:03 atroxaper joined 17:04 doublelel left
timotimo cool, parrot's ResizablePMCArray is now faster than nqp's QRPA? 17:08
can we steal something from there to put into moarvm as well?
17:10 atroxaper left
dalek rl6-roast-data: 9aee273 | coke++ | / (5 files):
today (automated commit)
17:12
[Coke] this may be of interest: news.sciencemag.org/social-sciences...ages-speak 17:13
17:14 blackbolt left, blackbolt joined
masak pyrimidine: I tried hunting it down by looking at the Pugs.hs repository on github. didn't find it. 17:14
oh! found it: www.athenalab.com/Perl_6_Users_FAQ....status_=== 17:15
just need to know what to search for ;)
ok, so v6.283185 seems to be what I was looking for.
I might add that to the post.
blackbolt timotimo ? 17:17
timotimo hey there
i'm very short on time these days, sorry 17:18
but gtk-simple is inside the perl6 namespace for a good reason: almost anyone in here can contribute
blackbolt can you look on problem with close "secend level" window?
17:18 lizmat joined
timotimo i may have lost a bit of backscroll in our query 17:19
the deprecation warning should be gone in the current version
would you like to learn how to implement it yourself? :P 17:20
blackbolt no :D
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
then copy the method "show" in GTK::Window to create a "hide" method
and use that gtk_widget_hide function
i gotta go now
blackbolt ok
thanks 17:21
timotimo developer.gnome.org/gtk3/stable/Gt...idget-hide - this is the documentation i always use to find new stuff to bind and expose
17:21 jnthn_ is now known as jnthn
jnthn gimme my messages, slave! 17:23
yoleaux 14:04Z <lizmat> jnthn: looks like github.com/rakudo/rakudo/commit/17...01ec881446 unbreaks parrot and jvm
jnthn lizmat++
Looks good to me.
timotimo: MoarVM already has the QRPA goodness and then some, afaik. 17:24
17:25 M_o_C left 17:26 else joined
else hey, anyone know what ":D" means in perl6? 17:26
tadzik defined argument
:U is undefined
else does that mean it's required, or...? 17:27
lizmat required for matching
tadzik it's still required
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␤»
else Int is a value? 17:29
jnthn Int is a type, but types are values in Perl 6 also 17:30
: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") }?
i see
17:31 blackbolt left
jnthn It's used quite heavily in the internals. A bit less so in typical user code. 17:32
Or much less so, is perhaps fair.
else yeah, i'm looking at internals 17:33
is there a place in the synopses where it's documented?
jnthn It'll be in S12 somewhere
PerlJam else: S12:1630 or so 17:34
synopsebot Link: perlcabal.org/syn/S12.html#line_1630
else thanks guys
17:37 xinming_ joined 17:39 kaleem left, xinming left 17:41 andreoss left 17:42 blackbolt joined, xinming_ left 17:43 xinming joined
[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:45 else left 17:47 andreoss joined
andreoss say ([<a b>; <c d>]).map(*.reverse).reduce: * ~ *; # works 17:48
say ([<a b>; <c d>]).map(*.reverse).reduce: * Z *; # doesnt work
why?
m: say ([<a b>; <c d>]).map(*.reverse).reduce: * Z *;
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 17:51 blackbolt left 17:52 kaleem left 18:02 dakkar left 18:04 andreoss left 18:19 guru left 18:28 raiph left 18:36 FROGGS joined, grettis joined 18:41 rurban left, rurban joined 18:44 Mso150 joined 19:03 raiph joined
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.
jnthn dinner & 19:07
19:08 hekmek left 19:10 denis_boyun joined, FROGGS_ joined 19:13 nige joined, FROGGS left
nige hi 19:14
masak++ enjoyed your strange loop draft 19:15
some interesting ideas there
19:16 Isp-sec joined
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
then suddenly they go recursive and infinite
as the mirrors reflect each other 19:19
just wanted to throw that little meme on the fire ;-) 19:20
19:25 jnthn left 19:30 japhb joined 19:41 ptc_p6 joined
moritz \o 19:50
does anybody know a Chris Collins (in the context of Perl 6)? 19:51
19:52 denis_boyun left 20:00 guru joined
masak nige: thanks. 20:00
nige np 20:01
was wondering it 'time' could be another category of strange loop that Perl6 is closing in on :-) 20:02
s/it/if/g
20:06 telex left
masak how do you mean? 20:07
unfortunately, Rakudo does not implement a time machine.
20:08 telex joined
nige :-) 20:09
the PHASERS are a way of declaring what happens in time 20:10
masak oh, that is true.
nige and then there's promises as far as the FUTURE is concerned
masak but it's hard to make an argument that Perl 6 is built from phasers. 20:11
whereas it *is* built from grammars, OO, and program elements.
vendethiel
.oO( or is it )
they're just in a phase you can't see
itz_ grrr I broke pl6anet.org (freebsd-update went wrong) trying to fix
moritz itz_: want to run it on www.p6c.org? 20:12
20:14 ninjazach joined
nige is there a time-based aspect to macros? 20:15
masak well, I guess you can put phasers in a macro. 20:16
haven't really thought about it enough...
I can see CHECK or INIT phasers being quite attractive to have there.
itz_ moritz: I've just got a console password so I may be able to repair
masak and perhaps injecting PRE and POST phasers as well. 20:17
20:17 darutoko left
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 molaf_ left
moritz itz_: what do you need for that? 20:19
20:20 raiph left
ninjazach This is the appropriate place for rakudo discussion correct? 20:23
masak correct.
masak .oO( or, channeling pm, "NO!" ) :P
ninjazach thank you :) 20:24
masak anything in particular on your mind?
itz_ ah a console reboot fixed it
moritz: it's just a cron job using perlanet (CPAN etc) writing flat files 20:25
I need to put the config on github really 20:26
20:26 raiph joined
moritz itz_: if you do that (and a small README telling me which modules to use), I'll set up a mirror 20:26
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 :)
itz_ moritz: sure I'll do that in the next few mins and send details
moritz ++itz_ 20:28
and itz_++ for running it in the first place :-)
ingy [Coke]: what's up?
20:28 atroxaper joined
[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.
ninjazach: and using the camelia bot is a great way to ask specific questions.
ingy [Coke]: ah yeah. saw in #parrot just now
PerlJam ingy: were you idling on #perl earlier? 20:29
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:31
masak aww :) 20:32
ingy :) 20:33
Now he can use Inline::Module to put it on CPAN
TPF++
20:35 atroxaper left
[Coke] ingy++ 20:45
keep up the good work!
20:54 pecastro joined
itz_ moritz: github.com/stmuk/pl6anet.org 21:02
21:03 ptc_p6 left 21:05 Mso150_y joined 21:06 Mso150 left
masak nige: here. :) 21:09
nige ok
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␤»
masak nige: look at the above; it should tell you a bit about the timing of macros :)
nige: feel free to ask follow-up questions.
nige ok sec 21:11
21:11 Mso150_y_a joined
nige need another after dinner mint ;-) 21:11
21:12 Mso150_y left
nige not sure what the quasi does? - I assume it install say "4" wherever foo is called? 21:13
masak yes, exactly.
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␤␤»
masak each call to `foo;` eventually gets physically replaced by the quasi block.
nige ok - cool
masak so if you could pause and look at the program before it starts running, you'd see the inserted quasi block.
lizmat m: my $a = "z"; say ++$a # the other way works
camelia rakudo-moar 1785ea: OUTPUT«aa␤»
masak m: macro foo { say "2"; quasi { say "5" } }; BEGIN { say "1" }; say "4"; foo; BEGIN { say "3" }
camelia rakudo-moar 1785ea: OUTPUT«1␤2␤3␤4␤5␤»
masak actually, that's more illustrative still.
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
masak: hehehe. BEGIN time being part of the language is really cool. I impress lots of people by telling them this works:
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;
camelia rakudo-moar 1785ea: OUTPUT«HEY␤»
masak yeah, BEGIN time is pretty cool. 21:17
vendethiel masak: "lol, dependently-typed stuff is so 1990"
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:18
21:18 fhelmberger left
bartolin lizmat: probably this discussion: 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
are there any other phasers that fire before macro?
vendethiel nige: no - macros *ARE* begin blocks. 21:22
masak both BEGIN and macro calls fire ASAP.
vendethiel: they're not actually BEGIN blocks, but they fire just as soon.
vendethiel nige: if BEGIN blocks were called *BEFORE* macros, the "3" in masak's example would get echo'd before 2
nige ah ok - so execution order is the point here
vendethiel masak: yeah, i'm oversimplifying
masak think of the execution time of BEGIN blocks and macro invocation as "when the parser passes over them".
because that is indeed when it happens. 21:23
21:23 ninjazach left, brrt joined
masak for BEGIN blocks, the parser needs to see the '}', then it lets the runtime run the block. 21:23
for macro calls, the parser needs to read up until the last macro argument.
both BEGIN blocks and macro calls are a way to interleave user code in the middle of parsing.
but macro calls also (optionally) leave a quasi block in the actual code, replacing the macro call itself. 21:24
21:26 denis_boyun joined
nige hmm - thanks for the example I just put the macro at the end and got: 1 3 4 2 21:27
which I take to mean the quasi didn't get installed
as the lexical scope passed in time
masak yeah; that's supposed to be illegal.
it can't call the macro at parse time if it hasn't seen it. 21:28
I filed an RT ticket about that the other week.
Post scheduled for: Dec 17, 2014 @ 0:01 -- loopy post scheduled for tomorrow
21:28 rurban left
masak ah, here: rt.perl.org/Ticket/Display.html?id=123419 21:29
nige: right now, what happens is the parser goes "oh, `foo;`, that's probably an post-declared subroutine. well, that's fine."
nige thinks about the temporal aspects of macros ... and strange loops
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!
so we have to install a CHECK-time error for that.
nige ok
masak (so pretend you got an error when putting the macro last) :P 21:31
nige ok ;-)
although I wonder if the temporal aspects of macros should be PHASERED?
masak in a sense, they already are. 21:32
nige MACRO { }
masak as vendethiel pointed out, macros fire at BEGIN time.
nige missed that ... sec ... wonders why not before? 21:33
masak there is no before :)
BEGIN time is the earliest there is.
before that, the parser hasn't *seen* your code.
timotimo it'd be weird to have MACRO { ... } because it gets invoked when the parser sees the invocation of the macro, not its definition
masak yeah, I didn't get the idea of a MACRO phaser. 21:34
still sounds to me like it emanates from a misunderstanding of something. 21:35
nige yes probably
masak but that's fine :)
let me see if I can dig up a blog post where I explain all this.
timotimo misunderstandings lead to unexpected questions which lead to exploring stuff that you may have taken for granted so far
nige just trying to learn why BEGIN and macro are interleaved 21:36
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:37
masak nige: because both fire as soon as they're parsed. 21:38
nige: think of two "cursors" running across your code. first the parser, and then the runtime.
timotimo masak: a BEGIN block could be implemented using a macro, right?
masak nige: BEGIN blocks and macro invocations fire as soon as the first, parser, cursor finds them. 21:39
timotimo: yes, provided there was a mechanism to eval AST arguments.
timotimo like macro BEGIN($a_block) { my $result = $a_block(); quasi { {{{ $result }}} } } OSLT
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.
but yeah, that's a good approximation, except for that.
timotimo right, fair enough
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?)
timotimo in that case it'd be more like my $result = qast_eval($a_block)()
japhb It looks like some kind of incorrect booleanization ...? 21:41
masak timotimo: yes. 21:42
timotimo is off
masak nige: dunno if it helps, but strangelyconsistent.org/blog/macros...hey-really was the closest I found.
nige cool thanks
hoelzro is there a difference between if my $foo = expr() { ... } and if expr() -> $foo { ... }?
hoelzro looked at the commit japhb mentioned
masak hoelzro: scoping.
bartolin japhb: I saw broken builds for r-p and r-j: 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.
lizmat japhb: moar is more forgiving than parrot / jvm
hoelzro oh, so this is legal? if my $foo = expr() { ... } ; say($foo)
masak right.
timotimo wasn't moar often "more strict" with regards to 6model stuff?
as compared to parrot at least 21:44
lizmat well, this isn't strictly 6module stuff
hoelzro interesting
masak++ # explanation
lizmat this is a method returning nqp's Mu upon not finding anything
and nqp-p and nqp-j not being able to handle that
hoelzro that's an interesting difference between P5 and P6 I'd never noticed
oh, I guess that's *not* different 21:45
21:45 ninjazach joined, ninjazach left
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
lizmat and the new one of jnthn wasn't
japhb: does that make sense to you ? 21:46
21:46 spider-mario left, aborazmeh joined
lizmat m: class A {}; role A {} 21:48
camelia rakudo-moar 1785ea: OUTPUT«===SORRY!=== Error while compiling /tmp/FTBOiotNUP␤Redeclaration of symbol A␤at /tmp/FTBOiotNUP:1␤------> class A {}; role A ⏏{}␤ expecting any of:␤ statement list␤ horizontal whitespace…»
lizmat seems legit, right?
m: role A {}; class A {} # huh? 21:49
camelia rakudo-moar 1785ea: OUTPUT«===SORRY!===␤Cannot find method 'is_composed'␤»
masak yeah, LTA error.
21:49 kaare_ left
timotimo ah, roles are never composed 21:49
nige hypothetically speaking ... could macros fire before BEGIN blocks in some kind of pre-BEGIN phaser?
timotimo something is checking for is_composed to see if we're in a class A { class A { } } situation perhaps
lizmat m: role A {}; say A.new.WHAT
camelia rakudo-moar 1785ea: OUTPUT«(A)␤»
masak nige: macros can not fire any earlier than they do.
lizmat looks like roles are composed sometimes :-)
masak nige: because they already fire at the earliest possible time, just as the parser finds them. 21:50
nige: there is no sooner than that.
nige: so, no. not even hypothetically speaking :)
nige ok - but some other BEGIN may have fired before
masak yes, because they also fire as soon as they can. 21:51
nige so the macro does not first in that case
timotimo we only do a single pass over the code when compiling
er. a single parsing pass
masak nige: if you put a BEGIN block before a macro invocation, the BEGIN block will fire first because the parser sees it first.
timotimo a macro that appears later in the code file can not fire earlier than a begin block that ends earlier in the file
masak m: macro foo { say "macro"; Nil }; BEGIN { "BEGIN block" }; foo 21:52
camelia rakudo-moar 1785ea: OUTPUT«macro␤»
masak m: macro foo { say "macro"; Nil }; BEGIN { say "BEGIN block" }; foo
camelia rakudo-moar 1785ea: OUTPUT«BEGIN block␤macro␤»
masak m: macro foo { say "macro"; Nil }; foo; BEGIN { say "BEGIN block" }
camelia rakudo-moar 1785ea: OUTPUT«macro␤BEGIN block␤»
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 pecastro left
nige before execution happens 21:54
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
BEGIN is during the parsing phase
because you can do things in there that change the way the future parsing behaves 21:56
INIT is ASAP during the execution phase
and with that, i'm off to bed
lizmat gnight timotimo
masak 'night, timo
nige night timotimo++ thanks for your help
timotimo i hope i could be of any help :) 21:57
lizmat NR.pm shutting down, decommute& 21:58
21:58 lizmat left
masak since `::` is not implemented in rules, what do people use instead? 22:01
22:01 aborazmeh left
masak oh, `{}`, it seems. 22:02
22:03 atroxaper joined, virtualsue joined 22:04 mvuets joined
masak gah, another case where introducing Grammar::Tracer changes the outcome. :( 22:06
in this case it actually made the grammar pass instead of (unexpectedly) fail.
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:09 atroxaper left 22:12 LLamaRider joined
LLamaRider o/ #perl6 22:15
22:16 lt joined
masak LLamaRider! \o/ 22:16
22:16 lt is now known as Guest22014
vendethiel o/ 22:16
22:16 Guest22014 left
LLamaRider My one and only working P6 module regressed, so I came to ask for sage advice 22:17
22:17 labster joined
LLamaRider it's a rather mysterious (to me) regex error 22:17
github.com/dginev/perl6-Lingua-EN-...e.pm6#L161
No such method 'PAP' for invocant of type 'Cursor'
---
if that makes sense to anyone, advice is very welcome :)
colomon what is PAP? 22:18
LLamaRider it's a token
link holds the source
colomon oh, you defined it. 22:19
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?
LLamaRider yep 22:21
colomon LLamaRider: give me a minute here.... 22:23
LLamaRider no rush, it waited for a few months already >:D
22:24 Mso150_y_a left 22:26 brrt left, treehug88 left
colomon okay, worked in 05/06 22:26
failed today 22:27
LLamaRider a biannual bisect? :-)
colomon worked in 08/03
22:27 erkan joined
colomon 10/03 22:28
11/03
failed 12/03
pyrimidine bisect is awesome
colomon worked 11/15
masak wow, non-ISO dates are so confusing.
colomon failed 11/25
masak it took me a while to realize those even were dates.
colomon failed 11/20 22:29
pyrimidine the suspense is killing me
colomon worked 11/17
failed 11/18
there you have it.
masak waitwait, you haven't narrowed it down to a commit yet. 22:30
22:30 mvuets left
colomon don't smoke every commit, just every day 22:30
masak oh, ok.
colomon LLamaRider is now in good position to figure out which commit it was
masak yeah.
masak has a look and tries to guess 22:31
LLamaRider rakudo source, here i come
22:31 denis_boyun left
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 :)
colomon I dunno, 7bb36563ad10cb268b4715617b3a7f82085c907f seems like it might be relavant. 22:33
masak oh, yes. 22:34
I seem to recall some IRC log about that one.
masak looks
22:34 Isp-sec left
LLamaRider I like 7bb as well, seems most directly related to the error 22:35
masak yeah. 22:36
22:36 jnthn joined
colomon wonders if we should start a betting pool.... 22:36
jnthn bah, irssi or screen wedged for some reason :/
masak no, I can't find any IRC discussion about the method/sub change. 22:37
time for me to hit the hay.
'night, #perl6
colomon o/
and \o jnthn
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…»
..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:39 [Sno] left
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␤␤»
LLamaRider even shorter:
colomon m: my token termpunct { <[.?!]> }; say "Hello!" ~~ /(<termpunct>)/;
camelia rakudo-moar 1785ea: OUTPUT«「!」␤ 0 => 「!」␤ termpunct => 「!」␤␤»
LLamaRider r: my token a {a}; say "Hello!" ~~ /<.a>/;
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␤␤»
..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␤␤»
colomon m: my token termpunct { <[.?!]> }; say "Hello!" ~~ /(<.termpunct>)/;
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␤␤»
jnthn . should only find methods 22:41
22:41 ninjazach joined
jnthn Use & to find subs 22:41
LLamaRider <.space> and <.ws> are methods?
jnthn Yes.
m: say ?Cursor.can('ws') 22:42
camelia rakudo-moar 1785ea: OUTPUT«True␤»
jnthn m: say ?Cursor.can('space')
camelia rakudo-moar 1785ea: OUTPUT«True␤»
LLamaRider now I know what to refactor, thanks :)
ninjazach Rakudo :) sounds like a move Ryu from Street Fighter would do :) love it 22:43
22:43 dwarring joined
LLamaRider btw, +1 for a more suggestive error message in this case 22:44
colomon: I pushed a fully operational Lingua::EN::Sentence, how do I tell panda to have it in mind? 22:45
or I just wait for a scheduled recheck? 22:46
jnthn++ thanks again for that pro tip :)
jnthn np :) 22:49
LLamaRider panda already uses the newest commit, sweet :) 22:51
22:51 aborazmeh joined 22:52 raiph left
colomon LLamaRider: you don't need to do anything, panda gets the latest version from your github repo. 22:53
just checked, and it worked for me.
LLamaRider \o/ 22:54
then I shall take my leave for now, if only all regressions were resolved so smoothly :-) 22:55
\o have fun
22:55 LLamaRider left 22:59 aborazmeh left 23:00 dj_goku joined, dj_goku left, dj_goku joined 23:09 aborazmeh joined 23:12 ninjazach left
dalek ast: d692769 | jnthn++ | S12-methods/fallback.t:
Test invoke/postcircmfix:<( )> interaction.
23:12
23:13 erkan left 23:14 pecastro joined 23:16 erkan joined, erkan left, erkan joined 23:19 aborazmeh left 23:33 [Sno] joined 23:35 aborazmeh joined, aborazmeh left, aborazmeh joined 23:39 ninjazach2 joined 23:41 ninjazach2 is now known as ninjazach 23:44 erkan left 23:45 BenGoldberg joined, nige left, pecastro left 23:46 erkan joined 23:54 ninjazach left, ninjazach joined
dalek ecs: e15acbc | jnthn++ | S12-objects.pod:
Re-purpose the method ^foo(...) { ... } syntax.

The existing design of it was out of line with the way Perl 6 evolved since then, and also not especially useful. This takes the syntax and enables its use for per-type meta-behavior specialization. This, as a special case, allows attaching extra metadata to the meta-object, which captures some aspect of what the syntax was originally specified to do. However, it maintains the distinction between objects and their meta-objects more strongly, which also fits better with the overall Perl 6 design.
23:59