Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-12-07

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 BenGoldberg joined #perl6
00:05 rmgk joined #perl6
00:06 eternaleye joined #perl6
00:26 KCL joined #perl6
00:36 Ben_Goldberg joined #perl6
00:40 retupmoca Could I get a couple of people to test the latest Compress::Zlib::Raw and Compress::Zlib?
00:40 retupmoca I made some changes that should make it work with windows (and maybe 32bit machines), but I want to make sure I didn't break it for anyone else
00:47 konsolebox joined #perl6
01:13 rurban joined #perl6
01:13 raydiak retupmoca: compress::zlib::raw seems to have an undeclared dependancy on Inline
01:14 raydiak other than that, both install fine on x64 linux here, pass all tests
01:22 konsolebox joined #perl6
01:30 retupmoca \o/
01:30 retupmoca (Inline is in the META.info, I'd guess panda just hasn't updated yet)
01:30 retupmoca raydiak: Thanks :)
01:34 raydiak retupmoca: you're welcome :)
01:36 BenGoldberg_ joined #perl6
01:36 raydiak .tell FROGGS sent you a PR for Inline::C, s:g/path/IO/
01:36 yoleaux raydiak: I'll pass your message to FROGGS.
01:37 raydiak .tell tadzik sent you a PR for panda, s:g/path/IO/
01:37 yoleaux raydiak: I'll pass your message to tadzik.
02:08 Akagi201 joined #perl6
02:20 raydiak class Foo { has Bar $.bar }; class Bar { has ($.a, $.b) } I wish there was a special syntax for Foo.new(bar => Bar.new: :a(1), :b(2)) without the explicit Bar.new part
02:21 raydiak class Foo { has Bar $.bar = !build_bar(...) }; class Bar { has ($.a, $.b) } or a way to pass that "..." into !build_bar from Foo.new?
02:23 raydiak (or, well, I guess method !build_bar would have to be my sub build_bar, but that's beside the point)
02:26 raydiak also, a way to do these things which also works with properties which are arrays or hashes of such "child objects"
02:27 * raydiak keeps hoping someone will say "you've been able to do that for years, here's how you say it..." even though we're in the #perl6 dead time :)
02:29 BenGoldberg joined #perl6
02:30 Akagi201 joined #perl6
02:36 Ben_Goldberg joined #perl6
02:36 aborazmeh joined #perl6
02:45 BenGoldberg joined #perl6
02:49 raydiak hm...wonder if you could accomplish something like that by writing an 'is init' trait which calls .new when it sees a Capture
02:49 raydiak (attribute trait, not class trait)
02:50 raydiak well, or either I guess...but enough of the talking to myself in public for now
02:58 aborazmeh joined #perl6
03:01 ugexe im trying to assign roles at runtime and am having trouble getting the stringified role names to behave as their role object. Is my syntax off, or can I not assign roles/attributes inside loops?
03:01 ugexe m: role R1 { sub a {1} }; role R0 { submethod BUILD( ) { for <R1> -> $role { require ::($role); also does ::($role) } } }; R0.does('a');
03:01 camelia rakudo-moar 4a9eba: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2WLzXJYK4T�Cannot type check against type variable ($role)�at /tmp/2WLzXJYK4T:1�------> �»
03:04 eternaleye joined #perl6
03:16 noganex_ joined #perl6
03:22 aborazmeh joined #perl6
03:30 raydiak m: role R1 { method a {1} }; role R0 { submethod BUILD( ) { for <R1> -> $role { self does ::($role) } } }; say R0.new.a; # this would work
03:30 camelia rakudo-moar 4a9eba: OUTPUT«1␤»
03:32 raydiak I don't think you can use also at runtime, nor use does to modify an entire role...but you can use does on each object you construct at runtime
03:33 raydiak I suspect modifying the role itself like that at runtime would have to be done via metastuff that I don't know much about tbh
03:36 Ben_Goldberg joined #perl6
03:49 ugexe raydiak++
04:07 hoelzro m: my $m = 'trim'; say 'foo '.$m()
04:07 camelia rakudo-moar 4a9eba: OUTPUT«Cannot find method 'postcircumfix:<( )>'␤  in block <unit> at /tmp/FUqupQIqBy:1␤␤»
04:07 hoelzro is that correct? or did something break?
04:08 raydiak m: my $m = 'trim'; say 'foo '."$m"()
04:08 camelia rakudo-moar 4a9eba: OUTPUT«foo␤»
04:08 raydiak iirc, the "" are supposed to be required
04:08 raydiak (?)
04:12 raydiak ah, https://github.com/perl6/roast/blob/master/S12-methods/indirect_notation.t#L70-71
04:13 raydiak so .$m is for methodrefs, not symbolic method names
04:18 raydiak my $attr = 'afk'; self."$attr" = True;
04:26 aborazmeh joined #perl6
04:41 eternaleye joined #perl6
04:41 perturbation joined #perl6
04:46 telex joined #perl6
04:48 hoelzro ah, quotes
04:48 hoelzro thanks raydiak
05:54 kurahaupo joined #perl6
06:03 bjz joined #perl6
06:12 eternaleye joined #perl6
06:25 Alina-malina joined #perl6
06:25 TimToady the parens are also required for the quote form of method call
06:26 TimToady m: my $attr = 'afk'; self."$attr" = True;
06:26 camelia rakudo-moar 4a9eba: OUTPUT«[31m===[0mSORRY![31m===[0m�'self' used where no object is available�at /tmp/VLnYbpfAvW:1�------> [32mmy $attr = 'afk'; [33m�[31mself."$attr" = True;[0m�Quoted method name requires parenthesized arguments. If you meant to concatenate two s…»
06:27 TimToady otherwise it's too ambiguous with a P5 concat call
06:32 kaare_ joined #perl6
06:40 raydiak ah, forgot all about that; thanks
06:42 raydiak self.afk = True & False;
06:51 anaeem1_ joined #perl6
07:10 tinyblak joined #perl6
07:13 anaeem1_ joined #perl6
07:19 isacloud joined #perl6
07:22 eternaleye joined #perl6
07:28 anaeem1_ joined #perl6
07:34 darutoko joined #perl6
08:00 bjz joined #perl6
08:05 anaeem1 joined #perl6
08:19 vti joined #perl6
08:21 raydiak g'night #perl6
08:21 bjz_ joined #perl6
08:33 petercommand joined #perl6
08:34 petercommand joined #perl6
08:35 Isp-sec joined #perl6
08:36 FROGGS[mobile] joined #perl6
08:38 FROGGS[mobile] hoelzro: not only a argless return is allowed me thinks
08:40 FROGGS[mobile] sub foo (---> 42) { 123 } # returns 42
08:41 petercommand joined #perl6
08:41 FROGGS[mobile] sub bar (---> 42) { return 123 } # returns 123
08:44 petercom1and joined #perl6
08:48 FROGGS[mobile] that was about https://github.com/perl6/specs/commit/caacd0609f7af8c5f4b5b49c4efca742e9a2be19
08:56 Mso150 joined #perl6
08:57 spider-mario joined #perl6
09:00 robinsmidsrod joined #perl6
09:00 FROGGS[mobile] m: sub foo (---> 42) { 123 }; say foo
09:00 camelia rakudo-moar 4a9eba: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/eAXja4NufQâ�¤Malformed parameterâ�¤at /tmp/eAXja4NufQ:1â�¤------> [32msub foo ([33mâ��[31m---> 42) { 123 }; say foo[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or term…»
09:01 FROGGS[mobile] did I typo it or is it really NYI?
09:01 FROGGS[mobile] that does not feel hard to do actually
09:03 FROGGS[mobile] m: sub foo returns 42 { 123 }; say foo
09:03 camelia rakudo-moar 4a9eba: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/sTxQ84OqZkâ�¤Missing blockâ�¤at /tmp/sTxQ84OqZk:1â�¤------> [32msub foo returns [33mâ��[31m42 { 123 }; say foo[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤    â€¦Â»
09:04 FROGGS[mobile] m: sub foo () returns 42 { 123 }; say foo
09:04 camelia rakudo-moar 4a9eba: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lJGgKfltRNâ�¤Missing blockâ�¤at /tmp/lJGgKfltRN:1â�¤------> [32msub foo () returns [33mâ��[31m42 { 123 }; say foo[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤ …»
09:05 FROGGS[mobile] I dont get it
09:09 Roonin joined #perl6
09:14 atroxaper joined #perl6
09:17 Ugator joined #perl6
09:17 anaeem1_ joined #perl6
09:29 anaeem1 joined #perl6
09:30 anaeem1 joined #perl6
09:33 FROGGS[mobile] joined #perl6
09:33 anaeem1_ joined #perl6
09:35 rurban joined #perl6
09:37 gfldex joined #perl6
09:38 mvuets joined #perl6
09:39 salv0 joined #perl6
09:42 Ugator joined #perl6
09:46 lue joined #perl6
09:51 kurahaupo joined #perl6
09:51 Ugator joined #perl6
09:56 atroxaper joined #perl6
09:57 mr-foobar joined #perl6
10:02 anaeem1_ joined #perl6
10:13 masak morning, #perl6
10:14 masak well. antenoon, really.
10:15 * masak discovers japhb_++'s https://gist.github.com/japhb/92442a22962c5156e102 in the backlog
10:16 masak japhb_: I like that you're thinking out loud in code. that's exactly what we need.
10:18 masak japhb_: why `¤=` ?
10:21 mvuets joined #perl6
10:25 sqirrel joined #perl6
10:26 masak japhb_: using parameter typing to decide the grammatical category of incoming ASTs seems, hm, both right and wrong somehow.
10:27 * masak realizes that he should probably think some on the connection between grammatical category and Qtree types
10:28 masak walk &
10:35 sunnavy joined #perl6
10:42 mvuets joined #perl6
10:52 Ugator joined #perl6
11:01 carlin joined #perl6
11:16 clkao joined #perl6
11:18 anaeem1_ joined #perl6
11:27 carlin if you qqx a binary in the current directory, qqx doesn't return it's output, is this expected?
11:27 carlin example: https://gist.github.com/carbin/b39890c910d9bd0fc1ad
11:30 FROGGS[mobile] carlin: what about ./test?
11:30 carlin FROGGS[mobile]: ./test works
11:31 sunnavy joined #perl6
11:31 FROGGS[mobile] can you run test in your shell?
11:32 carlin oh duh
11:32 carlin it's because there's a /usr/bin/test
11:32 FROGGS[mobile] :o)
11:32 FROGGS[mobile] that's what I was thinking
11:45 Spot__ joined #perl6
11:45 denis_boyun_ joined #perl6
11:46 robinsmidsrod joined #perl6
12:19 ptc_p6 joined #perl6
12:26 KCL_ joined #perl6
12:30 rindolf joined #perl6
12:48 zakharyas joined #perl6
12:48 brrt joined #perl6
12:48 brrt \o
12:49 brrt i see a failing spectest: S02-magicals/DISTRO.rakudo.moar
12:50 brrt on fedora 21 because ! $*DISTRO.name eq any($*PERL.DISTROnames)
12:51 brrt because $*PERL.DISTROnames = "macosx", "linux", "freesbd", "mswin32", "openbsd", "netbsd"
12:52 brrt and $*DISTRO.name = 'fedora'
12:52 xiaomiao that is quite amazing :D
12:56 brrt and the same thing seems to happen with $*KERNEL.name, which is unknown
12:56 brrt so it seems somehow that our runtime source of information has changed its API
12:56 * brrt lunch &
12:56 brrt (nb): fedora 21 beta
12:56 brrt maybe a fedora bug :-)
12:58 Ugator joined #perl6
13:00 hugme joined #perl6
13:03 dalek joined #perl6
13:03 psch joined #perl6
13:03 psch hi #perl6
13:05 anaeem1 joined #perl6
13:05 masak joined #perl6
13:06 PerlJam joined #perl6
13:09 Util joined #perl6
13:13 prime joined #perl6
13:13 prime joined #perl6
13:23 sergot hi o/
13:24 psch sergot o/
13:25 robinsmidsrod joined #perl6
13:33 masak_grr cześć, sergot
13:34 vendethiel why the grr?
13:35 masak_grr -NickServ(NickServ@services.)- You have 30 seconds to identify to your nickname before it is changed.
13:36 masak_grr -NickServ(NickServ@services.)- You failed to identify in time for the nickname masak
13:36 masak_grr this happens every time there's storm on the IRC.
13:37 psch masak_grr: you can "set enforce off" to not have that
13:37 psch but you probably know that, seeing as enforce off is default
13:38 psch you can also "release <nick> [password]" to release the enforcer, which is probably more useful
13:39 psch all of those are nickserv commands
13:39 psch although the help on "release" is ambiguous, the example has the order of parameters differently than the text :/
13:40 psch oh, no, it doesn't, i'm just bad at reading right now
13:40 vendethiel yeah, just /ns release (and /ns ghost) are very useful
13:52 clkao_ joined #perl6
13:58 dalek joined #perl6
13:59 moritz I've now started dalek in a  while true; do dalek; sleep 30; done  loop
13:59 dalek rakudo/nom: 8a9791d | moritz++ | Configure.pl:
13:59 dalek rakudo/nom: Configure: warning on missing --prefix option
13:59 dalek rakudo/nom:
13:59 dalek rakudo/nom: requested for star in rakudo/star#40, and added here for consistency
13:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8a9791da10
13:59 moritz that should make it a bit more resilient
14:00 dalek mu: c49643f | moritz++ | misc/dalek-start.txt:
14:00 dalek mu: document loop in dalek start guide
14:00 dalek mu: review: https://github.com/perl6/mu/commit/c49643f1d4
14:01 isacloud joined #perl6
14:02 nine m: @foo; warn @foo.elems;
14:02 camelia rakudo-moar 4a9eba: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/K3npUwfo2vâ�¤Variable '@foo' is not declaredâ�¤at /tmp/K3npUwfo2v:1â�¤------> [32m@foo[33mâ��[31m; warn @foo.elems;[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
14:02 nine m: my @foo; warn @foo.elems;
14:02 camelia rakudo-moar 4a9eba: OUTPUT«Warning  in block <unit> at /tmp/VKbfnGMLVY:1␤␤»
14:03 M_o_C joined #perl6
14:03 nine Why does this ^^ say "Warning in block" and not "0 in block"?
14:03 nine m: my @foo = 1; warn @fool.elems;
14:03 camelia rakudo-moar 4a9eba: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/rc7NA7jXEZâ�¤Variable '@fool' is not declared. Did you mean '@foo'?â�¤at /tmp/rc7NA7jXEZ:1â�¤------> [32mmy @foo = 1; warn @fool.elems[33mâ��[31m;[0mâ�¤    expecting any of:â�¤        method arg…»
14:03 nine m: my @foo = 1; warn @foo.elems;
14:03 camelia rakudo-moar 4a9eba: OUTPUT«1  in block <unit> at /tmp/rpDh_Q6hZ5:1␤␤»
14:04 moritz m: say (my @foo).elems.perl
14:04 camelia rakudo-moar 4a9eba: OUTPUT«0␤»
14:04 moritz nine: probably a semi-predicate issue
14:05 moritz nine: that is, a forgotten "defined"
14:05 moritz huh, at least not in the setting
14:05 psch m: warn Mu
14:05 camelia rakudo-moar 4a9eba: OUTPUT«use of uninitialized value <element> of type Mu in string context  in block <unit> at /tmp/OdmJoJfP4m:1␤␤Warning  in block <unit> at /tmp/OdmJoJfP4m:1␤␤»
14:05 psch m: warn Nil
14:05 moritz my $ex := nqp::newexception();
14:05 moritz nqp::setmessage($ex, nqp::unbox_s(@msg.join));
14:05 camelia rakudo-moar 4a9eba: OUTPUT«Warning  in block <unit> at /tmp/ueSHUTinan:1␤␤»
14:06 moritz src/core/Exception.pm:            nqp::printfh($err, $msg ?? "$msg" !! "Warning");
14:06 nine m: warn 0
14:06 camelia rakudo-moar 4a9eba: OUTPUT«Warning  in block <unit> at /tmp/rFzLEVHhv1:1␤␤»
14:07 lumimies joined #perl6
14:08 * moritz spectests a partial fix
14:09 nine Using $msg.defined instead of $msg in that line fixes the problem for me
14:10 moritz but that will given an empty warning for warn()
14:11 M_o_C joined #perl6
14:12 Spot__ joined #perl6
14:13 nine So ($msg.defined and $msg ne '')?
14:13 M_o_C joined #perl6
14:16 moritz I'm trying $msg.chars
14:16 moritz ... assuming I manage to work around this segfault
14:17 nine m: Str.chars
14:17 camelia rakudo-moar 4a9eba: OUTPUT«use of uninitialized value of type Str in string context  in block <unit> at /tmp/zNuDbFg6nG:1␤␤»
14:17 nine I'm not sure if you can get by without a defined check
14:17 moritz m: say nqp::p6box_s(Str).perl
14:17 camelia rakudo-moar 4a9eba: OUTPUT«Cannot unbox a type object␤  in block <unit> at /tmp/v3DMeBK5AY:1␤␤»
14:17 moritz nine: my $msg = nqp::p6box_s(nqp::getmessage($ex)) -- how can that ever be not defined?
14:18 nine moritz: I was just thinking about warn(Any) for example. Haven't seen much about how warn is actually implemented
14:18 moritz nine: the warning comes from the warn() function, which uses .join on its argument list
14:23 atroxaper joined #perl6
14:26 telex joined #perl6
14:27 moritz I've got two failing tests, S02-magicals/{DISTRO,KERNEL}.rakudo.moar
14:27 moritz now cross-checking without my patches if they are related
14:28 moritz fails without them too
14:29 psch moritz: http://irclog.perlgeek.de/perl6/2014-12-04#i_9756165
14:29 psch tests probably haven't been updated to reflect that
14:30 Mouq joined #perl6
14:30 dalek rakudo/nom: dfcf9fc | moritz++ | src/core/Exception.pm:
14:30 dalek rakudo/nom: Preserve warning message "0"
14:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dfcf9fccf0
14:33 moritz ok, those tests don't seem to make much sense anymore
14:34 moritz m: ($*PERL.DISTROnames
14:34 camelia rakudo-moar 8a9791: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/AiFGQ4lGt0â�¤Unable to parse expression in parenthesized expression; couldn't find final ')' â�¤at /tmp/AiFGQ4lGt0:1â�¤------> [32m($*PERL.DISTROnames[33mâ��[31m<EOL>[0mâ�¤    expecting any of:…»
14:34 moritz m: say $*PERL.DISTROnames
14:34 camelia rakudo-moar 8a9791: OUTPUT«macosx linux freebsd mswin32 openbsd netbsd␤»
14:34 moritz m: say $*DISTRO.name
14:34 camelia rakudo-moar 8a9791: OUTPUT«opensuse␤»
14:34 psch http://irclog.perlgeek.de/perl6/2014-12-02#i_9749256 also related i'd say
14:35 moritz m: say $*KERNEL
14:35 camelia rakudo-moar 8a9791: OUTPUT«unknown␤»
14:35 moritz eeks
14:36 dalek roast: d6372ca | moritz++ | S02-magicals/DISTRO.t:
14:36 dalek roast: $*DISTRO.name now can have a many more values than before
14:36 dalek roast:
14:36 dalek roast: so do not test if it is in a pre-defined list anymore
14:36 dalek roast: review: https://github.com/perl6/roast/commit/d6372ca8b4
14:38 hoelzro FROGGS[mobile]: from the way the specs read, I think argless return is the only form of return allowed when using a determinate value as the return
14:38 hoelzro "An explicit return statement is allowed, but only in argumentless form"
14:39 ssqq joined #perl6
14:41 ssqq perl6/nqp.git /docs/ops.markdown line: 1828, ## the op of start a timer is blank?
14:44 nine moritz: thanks for fixing this :)
14:51 ssqq all op is *op-name(args ...), beside this op, only have argument, If it has some special use?
14:53 psch ssqq: no, it's an error in the docs i think, considering calls to "nqp::timer" exist in the code base
14:53 psch i think ops.markdown is at least partially generated?  maybe something went wrong there
14:54 atroxaper joined #perl6
14:56 ssqq psch: thanks your kind reply, I think so. this op name should is *timer*
15:06 dalek rakudo/rt-123116: 8c242c0 | (Rob Hoelz)++ | src/Perl6/Grammar.nqp:
15:06 dalek rakudo/rt-123116: Parse subsignatures
15:06 dalek rakudo/rt-123116:
15:06 dalek rakudo/rt-123116: See SO6/Closure parameters.  For example:
15:06 dalek rakudo/rt-123116:
15:06 dalek rakudo/rt-123116:     sub limited_grep(Int $count, &block:(Dog)), *@list) { ... }
15:06 dalek rakudo/rt-123116:
15:06 dalek rakudo/rt-123116: These currently sort-of parse, but :(Dog) is considered a *trait*, and
15:06 dalek rakudo/rt-123116: that doesn't sit right with something in the compiler, so it results in
15:06 dalek rakudo/rt-123116: this error:
15:06 dalek rakudo/rt-123116:
15:06 dalek rakudo/rt-123116:     Cannot invoke this object (REPR: P6opaque, cs = 0)
15:06 dalek rakudo/rt-123116: review: https://github.com/rakudo/rakudo/commit/8c242c06c4
15:06 dalek rakudo/rt-123116: 1926e14 | (Rob Hoelz)++ | src/Perl6/Actions.nqp:
15:06 dalek rakudo/rt-123116: Don't include subsignature in lexical name
15:06 dalek rakudo/rt-123116:
15:06 dalek rakudo/rt-123116: See previous commit for a little more detail.  `&block:(Dog)` was
15:06 dalek rakudo/rt-123116: getting inserted into the pad as `&block:(Dog)` rather than just
15:06 dalek rakudo/rt-123116: `&block`
15:06 dalek rakudo/rt-123116: review: https://github.com/rakudo/rakudo/commit/1926e14c72
15:07 virtualsue joined #perl6
15:11 masak ooh, that's one of my tickets! :D
15:12 hoelzro masak: yessir
15:12 hoelzro I've felt its potent sting
15:12 hoelzro and am doing what I can to squash it =)
15:13 hoelzro my current problem is that &block is being registered in the pad, but now I'm getting complaints about not being able to bind to non-existing object lexical `&block:(Dog)`
15:14 hoelzro and I'm not sure how the bytecode to check for that full name, rather than the name sans subsignature, is being searched for =/
15:15 hoelzro also, it seems a fair amount of code uses sub mysub(&block(Int, Str)) { ... }; is that technically correct?
15:15 hoelzro at second glance, that looks like it should evaulate block(Int, Str) and use that result to establish a constraint on mysub's first param
15:25 pyrimidine joined #perl6
15:26 TimToady at one point we required a : because of the ambiguity with sublists of parameters, but we already have a whitespace dep with @foo[3,3] vs @foo [$x,$y,$z], so having one for () is probably not terrible
15:28 hoelzro TimToady: but it requires a whitespace, right?
15:28 hoelzro or no?
15:32 masak I think TimToady was arguing for it making sense to require a whitespace.
15:33 hoelzro ah ha
15:33 hoelzro I'll have to add that to my patch, then
15:34 * hoelzro is trying to figure out how the heck bindlex_no   '&testcode:(Int)', loc_6_obj is getting generated
15:39 * masak adds TimToady's comment to the ticket
15:43 moritz hoelzro: grep the --target=ast output for it?
15:43 hoelzro haha
15:43 hoelzro I've been pouring over the MBC dump and QASTCompilerMAST, and that did not occur to me
15:43 hoelzro moritz++
15:47 moritz hoelzro: I hope it helps :-)
15:48 hoelzro it does!
15:55 hoelzro I think I found it
16:00 jnthn evening, #perl6
16:00 dalek rakudo/rt-123116: cfa8c67 | (Rob Hoelz)++ | src/Perl6/Actions.nqp:
16:00 dalek rakudo/rt-123116: Fix %*PARAM_INFO<variable_name> with subsignature
16:00 dalek rakudo/rt-123116:
16:00 dalek rakudo/rt-123116: See previous commit's description, and the one before that.
16:00 dalek rakudo/rt-123116:
16:00 dalek rakudo/rt-123116: Otherwise, `&block:(Dog)` is installed as `&block`, but binding code
16:00 dalek rakudo/rt-123116: is still issued as `&block:(Dog)`
16:00 dalek rakudo/rt-123116: review: https://github.com/rakudo/rakudo/commit/cfa8c67e8a
16:00 masak jnthn! \o/
16:00 hoelzro o/ jnthn
16:02 Mouq timotimo: Are you sure this does what you want? https://github.com/perl6/gtk-simple/commit/457871d1
16:03 rurban joined #perl6
16:05 hoelzro am I correct in thinking that &block:(Dog) and &block (Dog) are equivalent, but &block(Dog) evaluates block(Dog) and uses the result for a parameter constraint?
16:06 jnthn hoelzro: I think &block (Dog) is probably senseless (though we steal the syntax for nativecall)
16:06 hoelzro jnthn: shouldn't the nativecall usage be &block:(Dog), then?
16:06 jnthn hoelzro: In that it would really mean &block.Capture, then try to bind it against (Dog)
16:06 jnthn hoelzro: Yes, it should.
16:07 hoelzro ah, ok
16:07 jnthn But that horse has kinda bolted into module land so...we should perhaps implement and support the proper way, but it'll be a long time until we can rip out the other one...
16:08 hoelzro =(
16:08 masak :/
16:08 hoelzro well, according to TimToady &block (Dog) is ok
16:08 hoelzro I'm just wondering if &block(Dog) should be
16:08 hoelzro I was thinking of creating a warning for it
16:09 masak m: sub foo(@a[1, 2, 3]) {}; say "alive"
16:09 camelia rakudo-moar dfcf9f: OUTPUT«alive␤»
16:09 hoelzro something like "did you mean &block:(Dog)?"
16:09 hoelzro masak: I fixed RT#123116 in that branch, btw
16:09 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123116
16:09 hoelzro only thing left is candidates with multis
16:09 hoelzro (the first 9 tests in t/spec/S06-signature/closure-parameters.t pass)
16:10 jnthn Well, &block (Dog) can live in a sense
16:10 jnthn It works as long as we never binding native call signatures using the usual signature binder :)
16:11 zakharyas joined #perl6
16:12 hoelzro ah, ok
16:15 jnthn It's just a bit...inconsistent
16:15 jnthn A lot of the hold up is that I never figured out exactly that &block:(Dog) should compile into.
16:15 jnthn *exactly what
16:16 Ugator joined #perl6
16:17 moritz why would it be different from any other parameter with a subsignature?
16:17 jnthn moritz: Because :(...) is not a sub-signature.
16:17 hoelzro my branch to fix it passes; would anyone mind reviewing? https://github.com/rakudo/rakudo/compare/rt-123116
16:18 jnthn &block:(Dog) is more like Associative &block where .signature ~~ :(Dog)
16:18 jnthn Except that doesn't make the thing easily obtainable for introspection
16:18 masak "Associative"?
16:18 jnthn hoelzro: Fix *what* exactly?
16:18 jnthn Uh, shit, Callable!
16:19 hoelzro jnthn: RT #123116
16:19 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123116
16:19 masak jnthn: *grin*
16:19 jnthn No, please do NOT put in a commit that makes them behave like subsignatures!
16:19 hoelzro ok
16:19 jnthn They aren't subsigs. If they were I'd have done a commit like this a copule of years ago. :)
16:19 hoelzro I'm very confused as to what :(...) means, I think
16:19 masak I'm glad we had this talk.
16:20 hoelzro indeed
16:20 jnthn hoelzro: Well, me too. I can think of several ways it could be.
16:20 jnthn I'd be happy enough if we initially compile it into a where clause
16:20 hoelzro I was going based on what I understood from the spec/roast/that RT ticket
16:20 jnthn Because that gets us the right semantics afaik
16:21 jnthn yeah, I'm just trying to find an exact spec ref on this
16:21 hoelzro I was looking at S06-signature/closure-parameters.t
16:21 jnthn I've long had it in my head as it meaning "the callable's signature should smartmatch against this one"
16:21 hoelzro and S06/Closure Parameters
16:22 jnthn yes, it's in there
16:23 jnthn And it says what I remembered. :)
16:23 jnthn "When an argument is passed to a closure parameter that has this kind of signature, the argument must be a Code object with a compatible parameter list and return type." is the money shot.
16:23 hoelzro ok, herein lies my confusion: how is this different from subsignatures?
16:23 jnthn It doesn't precisely say how that is to be achieved, however.
16:23 hoelzro ahhhh
16:23 jnthn hoelzro: Because a subsignature is about unpacking
16:24 jnthn It means "take the passed argument and destructure it"
16:24 hoelzro I was hard pressed to find anything about subsignatures in the specs
16:24 hoelzro oh, so it's a destructuring bind?
16:24 jnthn Subsignatures are, yes.
16:24 * hoelzro is enlightened
16:24 hoelzro ok, so I don't think my patch does that
16:25 hoelzro it doesn't reference the subsignature code in Actions::param_var
16:25 jnthn m: sub foo(@a ($head, *@tail)) { say ::MY.pairs }; foo([1, 2]);
16:25 camelia rakudo-moar dfcf9f: OUTPUT«␤»
16:25 jnthn aww
16:25 jnthn m: sub foo(@a ($head, *@tail)) { say :@a, :$head, :@tail }; foo([1, 2]);
16:25 camelia rakudo-moar dfcf9f: OUTPUT«Unexpected named parameter 'a' passed␤  in sub say at src/gen/m-CORE.setting:16519␤  in sub foo at /tmp/_qHdkuj03o:1␤  in block <unit> at /tmp/_qHdkuj03o:1␤␤»
16:25 jnthn grr
16:25 jnthn m: sub foo(@a ($head, *@tail)) { say (:@a, :$head, :@tail) }; foo([1, 2]);
16:25 camelia rakudo-moar dfcf9f: OUTPUT«"a" => [1, 2] "head" => 1 "tail" => [2]␤»
16:26 jnthn hoelzro: No, but
16:26 jnthn ':(' ~ ')' <subsignature=.signature>
16:26 jnthn iiuc means that the actions code will treat it as one?
16:26 hoelzro I don't *think* it does
16:26 hoelzro but I not not certain
16:26 jnthn OK, so...what does it do with it?
16:26 hoelzro Actions?
16:27 jnthn Yes
16:27 hoelzro Actions, iirc, checks for $<signature>, which isn't present in my case
16:27 hoelzro I also made it check for $<subsignature>, which it uses to generate lexicals with proper names
16:27 jnthn Then it drops the :(...) thing on the floor?
16:28 hoelzro yes
16:28 jnthn I think you're right by the way; the action method in question isn't the one I first though
16:28 jnthn OK, hmmm...
16:28 hoelzro crazily enough, though, the type checking in S06-signature/closure-parameters.t *passes* right now
16:28 jnthn I'm not sure parsing it and then silently ignoring it is entirely wise.
16:28 hoelzro oh, I agree; this patch is not complete
16:29 jnthn OK.
16:29 hoelzro for the time being, passing -> Str $ { ... } to testcode(&block:(Int)) fails
16:29 hoelzro and I have no idea why
16:29 jnthn Is it failing to bind?
16:29 jnthn Or failing because it calls the closure it gets and *that* blows up?
16:30 hoelzro oh, it's *not* failing
16:30 hoelzro wtf
16:30 hoelzro the test that checks for that failure passes
16:30 jnthn Right, but
16:30 jnthn my sub testit (&testcode:(Int)) {testcode(12)}
16:30 jnthn It's the testcode(12) that blows up, I think
16:30 hoelzro oooooooh
16:30 jnthn Not the signature.
16:30 hoelzro that's it
16:31 hoelzro derp
16:31 jnthn :)
16:31 hoelzro ok, well, then my next task is to add binding stuff, I guess
16:31 jnthn Yeah. I'm happy enough for it to be compiled as if a where cluase for now.
16:31 hoelzro jnthn: so, other than the fact that my impl isn't complete wrt type checking, is my patch ok?
16:31 jnthn We will want a way to introspect it later...
16:31 jnthn Well, it's not OK in that it calls it a subsignature, which is misleading.
16:32 hoelzro ok, I'll change that
16:32 jnthn and I'm really nervous about the substr usage.
16:32 hoelzro yes, I'm not too keen on that eitehr
16:32 hoelzro *either
16:32 hoelzro my grammar fu isn't good enough yet, I'm afraid
16:32 jnthn Does STD structure the prasing of these the way you are here, ooc?
16:32 hoelzro hmm, I hadn't checked
16:32 hoelzro *haven't
16:32 jnthn Because it also needs the variable name
16:32 jnthn OK, let's try and follow that if we can
16:32 hoelzro ok
16:32 jnthn looking now...
16:33 jnthn ...no google, not STD *symptons*...
16:33 hoelzro jnthn: do you have a recommendation of a better way to handle the stripping of :(...), other than the substr?
16:33 hoelzro o_O
16:33 hoelzro I was thinking of doing $<closure_param>=[':(' ~ ')' <.signature>]
16:33 hoelzro then it should work, I think, sans substr
16:34 jnthn In param_var in STD
16:34 jnthn # Is it a longname declaration?
16:34 jnthn || <?{ $<sigil>.Str eq '&' }> <?ident> {}
16:34 jnthn <name=.sublongname>
16:34 jnthn I *think* that's it
16:35 hoelzro ah ha
16:35 hoelzro should I emulate that, then?
16:35 jnthn Yes, it is
16:35 jnthn Yes, please.
16:35 hoelzro ok, will do
16:36 hoelzro alright, my wife is trying to get me out of the house, so I'll look at that when I come back
16:36 hoelzro thanks for the feedback/clarification jnthn
16:38 jnthn hoelzro: Welcome; thanks for working on it.
16:38 jnthn Have a nice out-of-house time.
16:48 Mouq joined #perl6
16:53 anaeem1_ joined #perl6
16:58 dalek perl6-bench: 3c4b72a | (Geoffrey Broadwell)++ | / (3 files):
16:58 dalek perl6-bench: Change .path to .IO, .directory to .dirname, and cwd to CWD to catch up with accumulated IO deprecations
16:58 dalek perl6-bench: review: https://github.com/japhb/perl6-bench/commit/3c4b72ac73
17:00 masak smls: how's it going with tomorrow's advent post?
17:01 masak also, who wants to do Tuesday?
17:02 brrt joined #perl6
17:06 japhb_ Apropos of nothing, I just want to state that implementing pen-and-paper RPG rules in code that doesn't make you immediately nauseous is a seriously brain-stretching exercise.
17:07 * japhb drops his tail
17:07 moritz japhb: it's probably a perfect topic for DDD
17:08 japhb What's the first D stand for there?
17:08 moritz "domain"
17:08 moritz japhb: http://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215 like this
17:10 moritz masak: huh, isn't it sergot++'s turn tomorrow?
17:10 masak oh, indeed.
17:10 masak and we have Tuesday covered.
17:11 masak ...who wants to do Wednesday? :)
17:11 masak japhb: I second moritz++' recommendation.
17:12 jnthn I can take a turn at some time soon
17:12 jnthn Did anybody do a MoarVM related one yet?
17:12 moritz japhb: no
17:12 masak ++jnthn
17:12 moritz erm, I meant jnthn
17:12 rurban_ joined #perl6
17:14 jnthn OK, I'll take 10th or 11th
17:14 masak learning from tinkering around with Qtrees: there are things out there that are neither terms, nor expressions, but kind of head off in another direction. yet they are very "structural" and expression-like.
17:15 moritz masak: example?
17:15 masak examples: parameter lists, traits.
17:15 masak they sort of occur in "restricted" parts of the language. that's also currently where unquotes have trouble going.
17:16 masak I don't want to call these restricted parts "slangs", because that's not what they are about.
17:16 moritz masak: yes, the term/operator distinction only makes sense where the OPP does its work
17:16 masak but they have slangoid characteristics.
17:17 masak it's like... "knowing what language you're parsing" is not just about Perl 6 vs grammars vs third-party-slang -- it's also about statement vs expression vs parameter list vs trait, etc.
17:17 moritz vs. regex vs. quote
17:17 moritz which is what TimToady++ has been saying all along :-)
17:18 masak well, regex and quote I'm fine with considering actual slangs, just slangs with centralized backing :)
17:18 masak the same argument is harder to make for traits and param lists.
17:19 moritz there are a lot more of such mini slangs
17:20 * moritz suddenly wonders if explicit declarations can go into signatures
17:20 moritz m: sub f(sub g() { }) { }
17:20 camelia rakudo-moar dfcf9f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/iKqx4YlpnI�Invalid typename 'sub' in parameter declaration. Did you mean 'Sub'?�at /tmp/iKqx4YlpnI:1�------> [32msub f(sub[33m�[31m g() { }) { }[0m�»
17:21 moritz good :-)
17:22 masak m: sub f($ where { f }) {}; f(42)
17:22 camelia rakudo-moar dfcf9f: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in sub f at /tmp/LX1hgjsfou:1␤  in sub f at /tmp/LX1hgjsfou:1␤  in block <unit> at /tmp/LX1hgjsfou:1␤␤»
17:22 masak m: sub f($ where { f(5) }) {}; f(42)
17:22 camelia rakudo-moar dfcf9f: OUTPUT«Memory allocation failed; could not allocate 6992360 bytes␤»
17:23 masak moar has a big stack.
17:24 jnthn Well, it's more that it allocates chunks at system level and doles them out.
17:26 TimToady I was not advocating &block (Sig)
17:26 TimToady I was advocating @array (subarray) vs &block(Sig)
17:26 * japhb comes back from a short wikiwalk on DDD.  Thanks for the reminder, guys.
17:29 jnthn TimToady: I'd rather the current spec's colon-based discrimination over a whitespace one...
17:30 TimToady that is, I was advocating a whitespace *dependency* before (), because we already have such a dependency before [] or {}
17:30 M_o_C joined #perl6
17:31 TimToady so a signature attached to a callable must *not* have a whitespace
17:31 jnthn ah
17:31 jnthn So @foo(...) should be an error?
17:32 TimToady not unless @foo has a signature we can match :)
17:32 TimToady s/not /
17:32 jnthn I'd be happy with that, but would think &block(...) wants to be too, and &block:(...) is the right thing
17:33 TimToady people keep wanting to write it without the colon
17:33 jnthn Though I guess I could come around to seeing &block(...) as being a kind of pun on array shape declaraiton
17:33 TimToady and we don't require : on my @array[3,3]
17:33 TimToady that's what I'm sayin'
17:33 TimToady but we do need the : in an rvalue
17:33 TimToady or it's just a call
17:33 jnthn ah
17:34 TimToady so yeah, I can argue it both ways, as usual
17:34 jnthn Same :)
17:34 * jnthn argues that it's dinner time
17:34 jnthn bbiab
17:34 Mouq m: sub foo (&f ($n)) { say $n }(&say but role :: {method Capture { \(42) }})
17:34 camelia rakudo-moar dfcf9f: OUTPUT«42␤»
17:35 jnthn :D
17:35 jnthn Yes, you can control how something destructures like that. It's rather nice. :)
17:35 jnthn Really dinner. :) &
17:36 masak sergot: so, how's tomorrow's post going? :)
17:37 anaeem1 joined #perl6
17:38 moritz m: say Version.new('2014.10-65-gdfcf9fc')
17:38 camelia rakudo-moar dfcf9f: OUTPUT«v2014.10.65.gdfcf.9.fc␤»
17:38 moritz m: say "still there?"
17:38 camelia rakudo-moar dfcf9f: OUTPUT«still there?␤»
17:38 japhb Mouq: That's ... just ... huh.  Well OK then.  :-)
17:39 japhb m: sub foo (&f ($n)) { f($n) }(&say but role :: {method Capture { \(42) }})
17:39 camelia rakudo-moar dfcf9f: OUTPUT«42␤»
17:39 moritz I'll try to clean up that mess
17:39 japhb ++moritz
17:40 moritz Mouq: would you like to write an advent post about doc.perl6.org?
17:41 moritz m: my $x = 42; say $x.VAR.scope
17:41 camelia rakudo-moar dfcf9f: OUTPUT«No such method 'scope' for invocant of type 'Int'␤  in block <unit> at /tmp/a1UOHEw0dJ:1␤␤»
17:42 moritz how do I get the Variable object from a variable?
17:42 moritz (and don't tell me I have to write a trait for that...)
17:43 japhb m: my $x = 42; say $x.VAR.WHAT
17:43 camelia rakudo-moar dfcf9f: OUTPUT«(Scalar)␤»
17:44 japhb m: my $x = 42; say $x.VAR.^methods
17:44 camelia rakudo-moar dfcf9f: OUTPUT«<anon> <anon> name of default dynamic WHICH␤»
17:44 moritz m: say Variable.^methods
17:44 camelia rakudo-moar dfcf9f: OUTPUT«-> (Variable: Any |c) { #`(Submethod+{<anon>}|56931304) ... } <anon> <anon> <anon> <anon> <anon>␤»
17:44 moritz m: say Variable.^attributes
17:44 camelia rakudo-moar dfcf9f: OUTPUT«str $!name str $!scope Mu $!var Mu $!block Mu $!slash␤»
17:45 japhb I love that we all naturally go straight to the metamodel, rather than reading the source.  :-)
17:45 moritz oh, I found class Variable by reading the source
17:46 moritz and found exactly one place where it's used from Actions.nqp, and that's in the context of traits
17:46 M_o_C joined #perl6
17:47 moritz m: multi sub trait_mod:<is>(Variable:D $v, :$scoped_how!) { say $v.scope }; my $x is scoped_how;
17:47 camelia rakudo-moar dfcf9f: OUTPUT«my␤»
17:47 moritz m: multi sub trait_mod:<is>(Variable:D $v, :$scoped_how!) { say $v.scope }; class A { has $x is scoped_how };
17:47 camelia rakudo-moar dfcf9f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/8Ai2KwOhBgâ�¤Can't use unknown trait 'is scoped_how' in an attribute declaration.â�¤at /tmp/8Ai2KwOhBg:1â�¤------> â�¤    expecting any of:â�¤        rwâ�¤        readonlyâ�¤        box_targetâ�¤   …»
17:49 moritz m: multi sub trait_mod:<is>(Variable:D $v, :$scoped_how!) { say $v.scope }; our $x is scoped_how;
17:49 camelia rakudo-moar dfcf9f: OUTPUT«our␤»
17:54 moritz has there been a post about symbol stables/stashes/pseudo stashes yet?
17:58 * masak would like to see that
17:59 * moritz writes a bit doc.perl6.org doc for Stash, and maybe PseudoStash, and see if he can derive a blog post later on
17:59 vanman joined #perl6
17:59 vanman left #perl6
18:01 perturbation joined #perl6
18:08 dalek doc: cc756f6 | moritz++ | lib/Type/Stash.pod:
18:08 dalek doc: Some initial documentation for type Stash
18:08 dalek doc: review: https://github.com/perl6/doc/commit/cc756f67f9
18:09 japhb OK, CQRS experts: How do you model a command that may result in a cascade of changes to object states, such that the system is not consistent until the cascade completes?  In other words, how do you separate transaction boundaries from changes made within transactions?
18:14 japhb To make this concrete, I'm considering the problem of casting a spell on a character that reduces their intelligence, thus making them unable to cast their most complex spells, which forces a flub of a complex spell currently being cast by the character, which results in damage to every character within the blast radius, which may kill some of them, which affects morale of the survivors, ...
18:15 moritz japhb: does if have to happen at once? there could be some friendly saving spells being cast at the same time
18:15 * japhb has a renewed respect for the mental hijinks required to play an RPG
18:16 japhb moritz: Oh dear.
18:16 moritz japhb: which reverts some of the damage, and prevents further cascades
18:16 japhb hmmm
18:17 Ugator joined #perl6
18:17 FloLo joined #perl6
18:17 japhb Yeah, that makes me wonder about the reality of the transaction boundary that I was provisionally considering the end of the cascade from a single causative action
18:18 moritz actually it might be more transparent for the observer if they see the events unfolding like you described, instead of a big BAMM, people dead, morale low
18:18 japhb That's a good point.
18:18 japhb Sheesh.  Just figuring out the constraints that would help me model a character is twisting my brain in knots.
18:19 moritz m: say MY.perl
18:19 camelia rakudo-moar dfcf9f: OUTPUT«MY␤»
18:19 moritz m: say MY.^name
18:19 camelia rakudo-moar dfcf9f: OUTPUT«MY␤»
18:20 moritz m: say CORE.^name
18:20 camelia rakudo-moar dfcf9f: OUTPUT«CORE␤»
18:30 kurahaupo joined #perl6
18:33 njmurphy joined #perl6
18:36 denis_boyun_ joined #perl6
18:42 moritz m: say CORE.^mro
18:42 camelia rakudo-moar dfcf9f: OUTPUT«No such method 'mro' for invocant of type 'Perl6::Metamodel::ModuleHOW'␤  in block <unit> at /tmp/FZpgm8_k_k:1␤␤»
18:45 dalek doc: 5aa7f9a | moritz++ | htmlify.p6:
18:45 dalek doc: htmlify: Do not use deprecate methods
18:45 dalek doc:
18:45 dalek doc: lizmat++ for making the deprecation mesages so awesome
18:45 dalek doc: review: https://github.com/perl6/doc/commit/5aa7f9ab67
18:47 moritz m: say GLOBAL.keys
18:47 camelia rakudo-moar dfcf9f: OUTPUT«␤»
18:48 moritz m: our sub foo { }; say GLOBAL.keys
18:48 camelia rakudo-moar dfcf9f: OUTPUT«␤»
18:58 FROGGS joined #perl6
18:58 prime- joined #perl6
19:02 konsolebox joined #perl6
19:03 FROGGS o/
19:03 yoleaux 01:36Z <raydiak> FROGGS: sent you a PR for Inline::C, s:g/path/IO/
19:04 psch \o FROGGS
19:06 smls joined #perl6
19:06 smls masak: Tomorrow? I thought I claimed Tuesday...
19:08 smls Although tomorrow would be fine too, unless someone thinks it needs major changes: http://smls.co.nf/advent/data-munging-in-perl-6-vs-perl-5/
19:08 masak smls: yeah, sorry. Tuesday's it.
19:11 kurahaupo_ joined #perl6
19:12 Mso150 joined #perl6
19:22 smls TimToady, jnthn: An argument in favor of the colon in «&block:(...)», is that a standalone signature in term position «:(...)» has it too...
19:23 smls so, basically  :( )  is the signarure equivalent of Array's  [ ]
19:35 * jnthn returns
19:36 jnthn Managed to catch up on a couple of days worth of backlog over post-dinner beer too :)
19:36 psch \o jnthn
19:37 * timotimo has workable internet connection again (but still not much time for Activities™)
19:37 yoleaux 5 Dec 2014 14:42Z <b2gills> timotimo: to improve the quality of the embroidery you could try adding a backing material, perhaps using some water soluble fusible web. ( I don't know if the paper backed stuff would work on its own, or if you would have to fuse some fabric to the back )
19:38 Ugator1 joined #perl6
19:38 timotimo b2gills: i actually put water-solible backing fleece under the cloth, it didn't seem to help sufficiently
19:38 jnthn psch: iirc, P6opaque is the REPR implementation, and there's a P6opaqueInstance or so (maybe s/Instance/Base) that is the appropriate thing to cast to
19:38 jnthn But maybe you're beyond that point now :)
19:39 psch there is P6OpaqueBaseInstance and P6OpaqueDelegateInstance
19:39 psch but yes, i'm beyond that point now
19:39 jnthn Ah, yeah
19:39 jnthn Cool :)
19:39 jnthn My beer was empty before I completely caught up :)
19:40 psch i'm now at "how do i figure out what type to pass to marshalIn() to get the Object i get from my CallSite into the right shape"
19:40 psch oh wait
19:40 psch i think i looked at the wrong docs, lemme check
19:43 psch right, i did
19:43 psch i'm not sure yet if this'll work, though
19:48 psch well, it compiles :P
19:48 psch (i've been there before :) )
19:48 FROGGS that's a start :o)
19:49 dalek perl6-roast-data: b8c47eb | coke++ | / (5 files):
19:49 dalek perl6-roast-data: today (automated commit)
19:49 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/b8c47eb279
19:49 psch the wonky bit at the moment is that i wasn't successful in installing a specific MethodHandle in the CallSite
19:49 psch i.e. it down(up?)casts everything to Object
19:49 jnthn "wasn't successful"? :)
19:49 psch well, i haven't figured out how to implement that
19:51 psch well, to be precise, the method i'm installing in the CallSite has a signature of (Object, Object, Object, Object...)
19:51 psch because i didn't figure out how to install a method with a more specific signature
19:51 * [Coke] tries to get jnthn another reproducable os x failure.
19:52 jnthn [Coke]: Those are always welcome. The two things I fixed after finding them on OSX so far turned out to only make things so much better...
19:53 hoelzro so it seems that STD uses sublongname for the parsing of the &block:(...), but Rakudo doesn't have sublongname; should I just do <name=.longname> ':(' ~ ')' <.signature>?
19:54 psch right, i should have anticipated the failure mode i'm getting now... the static class doesn't have the static field set at compile time but will only get it at runtime, and so i get a NPE when running into the code that wrote that invokedynamic insn...
19:55 jnthn hoelzro: No, I'd rather add sublongname, I think...
19:55 hoelzro seems reasonable; I'm just not sure what to make sublongname =/
19:55 jnthn There's another place that wants it also...
19:56 hoelzro if I copied too heavily from STD, I would be introducing a lot of new terms, most of which would probably be redundant
19:56 jnthn In variable
19:56 jnthn That one would want it in a lookup-y context
19:57 jnthn So I guess whatever "make" does wants to be non-commital in that regard
19:57 mvuets1 joined #perl6
20:02 anaeem1_ joined #perl6
20:02 atroxaper joined #perl6
20:08 psch hrm, overloading only by return type doesn't work in java, but overloading by signature with a different return type works
20:09 psch but there's no way of knowing which method will be chosen inside my CallSite at runtime during compile time
20:09 psch which means i have trouble giving the right type to marshalOut, because i don't know it yet
20:10 psch https://github.com/peschwa/rakudo/blob/jvminterop/src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java#L215 if someone wants to have a look.  warning: rambly comments and much debug output :P
20:11 psch most of the debug output is between lines 55-98 and the rambly comments are around 126-149
20:16 anaeem1_ joined #perl6
20:21 rurban joined #perl6
20:30 dalek nqp: 1fe679a | (Timo Paulssen)++ | src/vm/moar/profiler/template.html:
20:30 dalek nqp: display gen2roots in profiler output
20:30 dalek nqp: review: https://github.com/perl6/nqp/commit/1fe679aafd
20:32 dalek rakudo/rt-123116: b2cb4dd | (Rob Hoelz)++ | src/Perl6/Grammar.nqp:
20:32 dalek rakudo/rt-123116: Parse closure parameters
20:32 dalek rakudo/rt-123116:
20:32 dalek rakudo/rt-123116: See SO6/Closure parameters.  For example:
20:32 dalek rakudo/rt-123116:
20:33 timotimo dat cliffhanger
20:33 dalek joined #perl6
20:33 masak "tune in next week for... example!"
20:41 masak m: say [1, 2, 3] ~~ [Int, Int, Int]
20:41 camelia rakudo-moar dfcf9f: OUTPUT«False␤»
20:41 timotimo m: say [1, 2, 3] ~~ (Int, Int, Int)
20:41 camelia rakudo-moar dfcf9f: OUTPUT«False␤»
20:41 timotimo m: say (1, 2, 3) ~~ :(Int, Int, Int)
20:41 camelia rakudo-moar dfcf9f: OUTPUT«True␤»
20:42 araujo joined #perl6
20:42 masak m: say (:()).^name
20:42 camelia rakudo-moar dfcf9f: OUTPUT«Signature␤»
20:42 masak signatures++
20:43 vti joined #perl6
20:44 jnthn yeah, I'm happy they're first class thingies :)
20:45 masak oh, wait. so if I use colons in action method names, I have to put in whitespace before the '('?
20:45 masak did not know that.
20:45 jnthn ?
20:46 masak m: class Action { method foo:bar($/) {} }; say "alive"
20:46 camelia rakudo-moar dfcf9f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KdF9GpR9kOâ�¤Colon pair value '$/' too complex to use in nameâ�¤at /tmp/KdF9GpR9kO:1â�¤------> [32mclass Action { method foo:bar($/) {} [33mâ��[31m}; say "alive"[0mâ�¤    expecting any of:â�¤   …»
20:46 jnthn Oh
20:46 jnthn I guess, but I always do like foo:sym<bar> or so, so I never ran into it :)
20:46 masak aha.
20:47 timotimo can you even declare a method with a non-compile-time-constant name-part with foo:bar($blubb)?
20:47 * vendethiel plans to abuse signatures
20:47 timotimo please do so
20:47 jnthn timotimo: No, but $lubb could of course be a constant
20:48 jnthn m: say constant inople = 'Istanbul'
20:48 camelia rakudo-moar dfcf9f: OUTPUT«Istanbul␤»
20:50 timotimo fair enough
20:52 sqirrel joined #perl6
20:59 ilogger2 joined #perl6
21:04 Mso150 joined #perl6
21:09 [Coke] do we eventually plan to replace the exec to find our system information on every invocation?
21:09 [Coke] (looks like OS X is now calling "sw_vers" on each call)
21:10 FROGGS we could cache that I suppose...
21:11 [Coke] do we really need it? is it something we could get lazily?
21:11 * [Coke] groans at jnthn's pun
21:13 jnthn I'd hope we can get it on demand.
21:13 moritz puns on demand!
21:13 jnthn (The version info; puns are delivered asynchronously...)
21:13 jnthn :P
21:13 psch http://irclog.perlgeek.de/perl6/2014-12-03#i_9755719 has some discussion
21:14 Mso150_f joined #perl6
21:19 * breinbaas remembers the Opel marketing campaign "Constant in Opel"
21:21 Mso150_f_e joined #perl6
21:24 hoelzro is it currently possible to construct a Sub object from the ground up in Rakudo?
21:24 hoelzro ex. can I create the parameters, then the signature, then bind that to a code object to create a Sub?
21:24 hoelzro my experiments lead me to say 'no', but I wanted some confirmation from others who know more than I =)
21:25 moritz I think "no" is accurate
21:26 hoelzro ok, that's what I thought =(
21:27 hoelzro is that RT worthy, you think?
21:27 psch i think we need some mechanics of that kind to get assuming to spec
21:27 psch *mechanism
21:27 jnthn It's more a design issue. For now, use EVAL. It may fall within the remit of QTree.
21:28 jnthn Technically, you can probably mimic much of what the compiler does.
21:28 hoelzro I'm guessing you could probably do it with copious sprinklings of nqp::
21:29 * masak got bitten by a bug where /w/ trumped /d/
21:29 masak luckily, reordering tokens solved it.
21:30 jnthn masak: Uh, is that really a  bug? Or you mean "bug in your grammar"? :)
21:30 masak in my grammar :)
21:30 masak sorry, didn't mean to make you nervous there ;)
21:30 jnthn Ah, OK. Was gonna say, was not aware of a bit of spec that wanted LTM to differentiate by char class subsetness :P
21:30 masak yeech. no.
21:30 jnthn Which is a conceivable feature, but... :P
21:31 masak I don't see a big need.
21:31 jnthn Yeah, same.
21:31 bartolin m: my :($a, $b)
21:31 camelia rakudo-moar dfcf9f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/GROhOBNoeOâ�¤Malformed myâ�¤at /tmp/GROhOBNoeO:1â�¤------> [32mmy [33mâ��[31m:($a, $b)[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤Â»
21:32 bartolin is that supposed to work? in S02 there is a sentence "Declarators generally make the colon optional: my ($a,$b,$c);      # parsed as signature"
21:32 bartolin m: my ($a, $b); say "alive"
21:32 camelia rakudo-moar dfcf9f: OUTPUT«alive␤»
21:33 bartolin std: my :($a, $b)
21:33 camelia std 76ccee1: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed my at /tmp/zQC0IfVv4Y line 1:â�¤------> [32mmy [33mâ��[31m:($a, $b)[0mâ�¤    expecting any of:â�¤      nameâ�¤   scoped declaratorâ�¤Parse failedâ�¤FAILED 00:00 135mâ�¤Â»
21:33 psch m: my $x = ($a, $b); say $x.WHAT
21:33 camelia rakudo-moar dfcf9f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/mF9E0jzRVzâ�¤Variable '$a' is not declaredâ�¤at /tmp/mF9E0jzRVz:1â�¤------> [32mmy $x = ($a[33mâ��[31m, $b); say $x.WHAT[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
21:33 psch m: 6; my $x = ($a, $b); say $x.WHAT
21:33 camelia rakudo-moar dfcf9f: OUTPUT«(Parcel)␤»
21:33 psch m: my $x = :($a, $b); say $x.WHAT
21:33 camelia rakudo-moar dfcf9f: OUTPUT«(Signature)␤»
21:34 psch eh, my is the declarator
21:34 psch i don't get it :)
21:34 jnthn I can see how that bit of spec is suggestive of the : being optionally allowed there...
21:35 bartolin here is the link: http://perlcabal.org/syn/S02.html#Signature_objects
21:37 psch what does "parsed as a Signature" do for a declaration like "my ($a, $b, $c)"?
21:37 bartolin there is an ticket (RT #122917) about a broken example in the perl6 book. so I wondered whether "my :($a, $b)" was valid some years ago ...
21:37 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122917
21:38 * masak does prefix:<|> on a scalar argument for the first time
21:38 jnthn psch: Well, if you bind do it you get destructuring.
21:38 masak "pass this argument unless it's Nil" :)
21:39 psch m: 6; %h = <a 1 b 2 c 3>; my ($a, $b, $c) := %h; say $c # expecting 3?
21:39 camelia rakudo-moar dfcf9f: OUTPUT«Too few positionals passed; expected 3 arguments but got 0␤  in block <unit> at /tmp/9xeT5HfYM_:1␤␤»
21:39 psch m: 6; %h = <a 1 b 2 c 3>; my ($a, $b, $c) := |%h; say $c # expecting 3?
21:39 camelia rakudo-moar dfcf9f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/mDiWnkxeun�Variable '&prefix:<|>' is not declared�at /tmp/mDiWnkxeun:1�------> [32m %h = <a 1 b 2 c 3>; my ($a, $b, $c) := [33m�[31m|%h; say $c # expecting 3?[0m�»
21:39 psch something like that?
21:39 jnthn m: my %h = a => 1, b => 2; my (:$a, :$b) := %h; .say for $a, $b
21:39 camelia rakudo-moar dfcf9f: OUTPUT«1␤2␤»
21:40 * masak .oO( everybody wants lots of colons )
21:40 psch jnthn: and "factorizing" the colon before the parens should be allowed, but it should also be optional? is that what the spec suggests?
21:41 psch oh nvm, we'd still need them inside
21:41 psch because nameds
21:41 psch m: my ($a, $b) := [1, 2]; say $b
21:41 camelia rakudo-moar dfcf9f: OUTPUT«2␤»
21:41 jnthn yeah, it's more saying that maybe we should be able to write a : before the ( for consistency
21:41 jnthn But tbh...I'm not sure I care for being able to do so. :)
21:43 bartolin ok, so one would just use "my ($a, $b)" for now. (until someone cares :)
21:43 bartolin thanks for explaining!
21:44 denis_boyun joined #perl6
21:44 masak 'night, #perl6
21:44 bartolin o/
21:44 jnthn 'night, masak
21:44 psch g'night, masak
21:48 psch yay, my interop works
21:48 psch ...as long as the method returns a String
21:49 psch which clearly states the remaining problem: i need a way to know at compile time which method was chosen at runtime, so i can get its return type and cast the Object accordingly
21:50 psch that probably means i need another indy call to look somewhere for the right type..?
21:50 psch i'm not sure i can insert a CHECKCAST with some type from the stack as argument though :/
21:55 psch also there's primitives to pay attention to, too
21:56 jnthn Maybe the way to do it statically is always to box?
21:56 jnthn Mebbe the .filterReturnValue combinator can help also?
21:59 psch .filterReturnValue probably helps, yes.  i'd need a method that boxes correctly for every possible return type, but i guess i can get that dynamically
22:00 Mso150_f_e joined #perl6
22:01 psch always boxing could help with the primitives?  i'm having the problem that P6Int unboxes to a java.lang.Long, and i'd have to cast those to the corresponding java primitive or fail to dispatch if it's too large
22:01 psch i don't know how casting of a Long > Integer.MAX_VALUE to int works out in java and if we want to hand-hold there
22:01 psch or rather how much hand-holding we want to do there
22:02 psch because "just overflow it" (in case that's what java does) doesn't seem particularly DWIMmy to me
22:02 psch s/overflow/truncate/
22:04 dalek rakudo/rt-123116: fe8d0d9 | (Rob Hoelz)++ | src/Perl6/Actions.nqp:
22:04 dalek rakudo/rt-123116: Add post constraint for checking closure parameter signatures
22:04 dalek rakudo/rt-123116:
22:04 dalek rakudo/rt-123116: A lot of this was lifted out of make_where_block
22:04 dalek rakudo/rt-123116: review: https://github.com/rakudo/rakudo/commit/fe8d0d901d
22:04 telex joined #perl6
22:04 hoelzro so I got the post constraint bit working; I ended up duplicating a lot of code from make_where_block, though
22:04 hoelzro so any insights on how to make that cleaner would be appreciated!
22:12 virtualsue joined #perl6
22:19 jnthn hoelzro: I'm heading sleepwards now, but I've got it on a browser tab to look at in the morning :)
22:20 jnthn psch: I'd go with the Java casting semantics for now.
22:22 hoelzro ok, thanks jnthn
22:22 psch jnthn: i'm not sure that helps.  if i java-side unbox a Long to a long i can't match a MethodHandle that wants an int
22:23 psch jnthn: if i do the matching indiscriminately i'm losing the distinction between signatures of longs and ints
22:23 aborazmeh joined #perl6
22:23 psch which means i'll always match the first one, instead of the closest one...
22:23 psch hm, i think there was some kind of logic like that in the compile-indy example of ASM, i'll have to reread that
22:24 psch anyway, jnthn++ for the guidance
22:24 jnthn Ah...yeah, maybe in the case there are overloadings on things like int size and float size, the best bet is "pick the widest, minimizing information loss", and we leave the caller to disambiguate if that's not the semantics they want.
22:25 psch yeah, that seems sensible
22:26 psch i mean, the descriptor syntax is still there and won't go away either, there's always that
22:26 jnthn Right.
22:26 psch and i'd say having methods that only differ by the byte size of the parameters is bad design anyway :)
22:43 kurahaupo joined #perl6
23:06 gfldex joined #perl6
23:25 Ugator1 joined #perl6
23:27 Ugator1 joined #perl6
23:28 * [Coke] is unable to make any of the osx programs fail outside of the test summary today.
23:29 [Coke] perl6/book mentions #perl6book, which seems to be filled with bots & Util ; should we remove that reference?
23:30 Ugator1 joined #perl6
23:37 BenGoldberg joined #perl6
23:43 atroxaper joined #perl6
23:46 aborazmeh joined #perl6

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

Perl 6 | Reference Documentation | Rakudo