Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-17

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:20 dalek doc: ada47f7 | skids++ | lib/Type/Metamodel/Primitives.pod:
00:20 dalek doc: Fix an obvious pasto s/create_method/create_type/  Also gloss up verbiage in a couple places.
00:20 dalek doc:
00:20 dalek doc: I'm assuming the example was correct, as opposed to the pod declarator, because it makes more sense that create_type would create a type.
00:20 dalek doc: review: https://github.com/perl6/doc/commit/ada47f7fcd
00:29 dalek doc: 99ca399 | skids++ | lib/Type/Metamodel/RoleContainer.pod:
00:29 dalek doc: Fix typo in RoleContainer.pod
00:29 dalek doc: review: https://github.com/perl6/doc/commit/99ca39984d
01:08 kjs_ joined #perl6
01:24 skids I wonder if the metamodel signatures would be better docced e.g. trusts(Metamodel::Trusting:D $: $type), as normal use of the invocant colon may be a bit too subtle for perusers.
01:24 skids and .HOW's are probably always Scalars anyway, right?
01:27 japhb skids: Why would a .HOW be necessarily for a Scalar?
01:27 japhb m: (my @).HOW.say
01:27 camelia rakudo-moar 46e92b: OUTPUT«Perl6::Metamodel::ClassHOW.new()␤»
01:27 psch m: say Any.HOW ~~ Scalar
01:27 camelia rakudo-moar 46e92b: OUTPUT«False␤»
01:28 skids Well, bound to scalar sigil I mean.  Like is there a good reason why a .HOW would use an @ or % sigil?
01:37 psch m: class Foo { method baz(Foo:D @: $x) { say $x } };
01:37 camelia rakudo-moar 46e92b: ( no output )
01:37 psch m: class Foo { method baz(Foo:D @: $x) { say $x } }; my @f = Foo.new; @f>>.baz("bar")
01:37 camelia rakudo-moar 46e92b: OUTPUT«Type check failed in binding <anon>; expected 'Positional[Foo]' but got 'Foo'␤  in method baz at /tmp/3n_b6lDgnO:1␤  in method dispatch:<hyper> at src/gen/m-CORE.setting:1373␤  in block <unit> at /tmp/3n_b6lDgnO:1␤␤»
01:38 psch hm, i think 6pe is involved there?
01:38 psch anyway, i need sleep o/
01:41 skids o/
01:44 dj_goku joined #perl6
01:44 dj_goku joined #perl6
01:55 japhb How do you add BUILD (or the moral equivalent) to multiple roles that you expect to all be composed into the same class, without forcing the composing class to have another BUILD that does nothing but delegate to each of the roles in turn?
01:59 * japhb wonders if submethods should have different composition rules from normal methods and public attributes
02:01 skids hrm, yeah.  Well, it has to be possible because atribute defaults do work.
02:18 skids Well, no answer yet but at least I learned about WHENCE/autoviv :-)
02:18 ponbiki joined #perl6
02:50 skids joined #perl6
02:50 skids stoopid buggy old radeon.
03:22 adu joined #perl6
03:23 noganex_ joined #perl6
03:27 novice777 joined #perl6
03:27 davercc joined #perl6
03:33 novice777 Is some short form exists for "\n" in P6  as v10 was in P5 ?
03:42 leont Wow, there's just so much wrong with that suggestion
03:54 novice777 joined #perl6
03:58 slavik joined #perl6
03:59 skids novice777: Not really because for one liners you usually end up just using .say anyway.
04:07 skids novice777: unless 10.chr is good enough for you.
04:10 novice777 skids: 10.chr  ~~  qq/\n/   :-)    ( 6 LETTERS )
04:11 skids yes but 10.chr is closer to finger home positions :-)
04:26 * skids wonders what the justification for weakening '...' with 'qq[...]' was.
04:53 novice777 m:  say :2\#`「this is a coolest bit」<1_1_1_0_1_0>\#`「and this is not」.chr
04:53 camelia rakudo-moar 46e92b: OUTPUT«:␤»
04:56 TimToady skids: primarily so you can have a long heredoc with just a few very sparse interpolations
04:57 TimToady especially when the long heredoc is already program
04:57 japhb TimToady: any thoughts on my multi-role BUILD question from ~3 hours ago?
05:00 TimToady I know we decided various things at various times over the last 14 years, but as to what stuck, I don't recall offhand.
05:00 TimToady I guess that means nothing stuck... :)
05:00 japhb heh
05:01 skids there will eventually come a "great role reckoning" I suppose.
05:02 BenGoldberg joined #perl6
05:06 japhb .ask jnthn Any ideas on http://irclog.perlgeek.de/perl6/2015-01-17#i_9957880 ?  It doesn't have to be BUILD in particular, if there's another hook to hang it on ... I just want to have multiple roles contribute to object construction.
05:06 yoleaux japhb: I'll pass your message to jnthn.
05:12 novice777 joined #perl6
05:19 TimToady m: constant nl = "\n"; print nl
05:19 camelia rakudo-moar 46e92b: OUTPUT«␤»
05:19 TimToady novice777: ^^^
05:22 TimToady m: print "\c10"
05:22 camelia rakudo-moar 46e92b: OUTPUT«␤»
05:23 TimToady if you like the 10 part of it :)
05:30 novice777 TimToady: Oh, thanks!
05:30 TimToady but v-strings were deemed to be a dimbulb idea
05:31 TimToady we tried not to carry over features that were that weak
05:37 skids m: my $a = 1; :2[$a,0].say; # This form is very useful to me, but using the variable in there is specced only by tenuous inferences in S02 IMO.
05:37 camelia rakudo-moar 46e92b: OUTPUT«2␤»
05:46 skids ...and no spectest that I can grep.
05:50 TimToady I'm quite sure we never thought about it :)
05:52 skids Maybe I'll spec that tomorrow, then.  Time for bed now.
05:52 TimToady o/
06:08 vike joined #perl6
06:44 Rounin joined #perl6
08:06 anaeem1 joined #perl6
08:12 darutoko joined #perl6
08:15 japhb skids: If you spec that, please make it clear that
08:16 japhb +':2[$a,0]' will not work -- the interpolation must happen first
08:16 japhb so +":2[$a,0]" instead
08:16 japhb &  # To sleep, perchance to dream
08:17 prime joined #perl6
08:19 dsm joined #perl6
08:20 kjs_ joined #perl6
08:27 dsm joined #perl6
08:30 telex joined #perl6
08:31 xfix joined #perl6
08:58 FROGGS o/
09:00 raydiak \o
09:04 gfldex joined #perl6
09:06 Sqirrel_ joined #perl6
09:15 moritz m: foo: say foo.^name
09:15 camelia rakudo-moar 46e92b: OUTPUT«Label␤»
09:16 kjs_ joined #perl6
09:16 xinming joined #perl6
09:16 rindolf joined #perl6
09:17 FROGGS m: m: m: m: say m.^name
09:17 camelia rakudo-moar 46e92b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/TDz_ZgtrL3�Redeclaration of symbol m�at /tmp/TDz_ZgtrL3:1�------> [32mm: m: [33m�[31mm: say m.^name[0m�»
09:17 FROGGS :o)
09:18 FROGGS m: m: say m
09:18 camelia rakudo-moar 46e92b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/sreBgekmrF�Null regex not allowed�at /tmp/sreBgekmrF:1�------> [32mm: say m[33m�[31m<EOL>[0m�»
09:18 FROGGS :/
09:18 FROGGS p: p: say p
09:18 camelia rakudo-parrot 46e92b: OUTPUT«Label<p>(at /tmp/joSvGHtQ94:1, '[32m[33m�[31mp[32m: say p[0m')�»
09:19 FROGGS hmmmm, the eject should be after the label...
09:19 FROGGS p:   p: say p
09:19 camelia rakudo-parrot 46e92b: OUTPUT«Label<p>(at /tmp/dB7IbgalnL:1, '[32m[33m�[31mp[32m: say p[0m')�»
09:19 timotimo m: n: o: p: say :q
09:19 camelia rakudo-moar 46e92b: OUTPUT«Unexpected named parameter 'q' passed␤  in sub say at src/gen/m-CORE.setting:16881␤  in block <unit> at /tmp/i4BVn2zqrr:1␤␤»
09:19 timotimo m: n: o: p: say (:q)
09:19 camelia rakudo-moar 46e92b: OUTPUT«q => True␤»
09:23 kjs_ joined #perl6
09:25 molaf_ joined #perl6
09:27 jack_rabbit joined #perl6
09:33 xinming joined #perl6
09:37 rurban joined #perl6
09:48 davercc` joined #perl6
09:49 JimmyZ timotimo: I think we can, and we can removed box if it's only used by *_I/*_O op and optimize it *_i/*_s op
09:49 JimmyZ s/can/maybe/
09:50 denis_boyun_ joined #perl6
10:15 FROGGS why on earth???
10:15 FROGGS const xmlChar *URL: The URI for that document
10:15 FROGGS why do they mix URL and URI everywhere?
10:16 FROGGS this one is called URL, but other places talk about BASE URI
10:19 FROGGS I guess I go for uri everywhere...
10:24 jnthn morning, #perl6
10:24 yoleaux 05:06Z <japhb> jnthn: Any ideas on http://irclog.perlgeek.de/perl6/2015-01-17#i_9957880 ?  It doesn't have to be BUILD in particular, if there's another hook to hang it on ... I just want to have multiple roles contribute to object construction.
10:27 virtualsue joined #perl6
10:27 JimmyZ morning ,jnthn
10:28 FROGGS hi jnthn
10:29 sqirrel_ joined #perl6
10:45 ilbot3 joined #perl6
10:45 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
10:47 denis_boyun joined #perl6
10:50 lizmat good *, #perl6!
10:50 FROGGS hi lizmat
10:51 lizmat hmmm...  looks like moritz was offline for ~6 minutes just now, and those 6 minutes are not in the clogs on irclog.perlgeek.de
10:55 jnthn o/ lizmat
10:55 lizmat is it time for a MoarVM / nqp bump ?
10:56 jnthn lizmat: Mebbe; you should find the MoarVM build is a lot quieter under clang. :)
10:56 lizmat *that* I would like to see  :-)
10:57 jnthn I got it warning free on clang 3.5 on Debian last night.
10:57 jnthn Hopefully that means it will be on OSX too :)
10:58 lizmat checking...
10:58 psch hi #perl6 \o
10:58 tinyblak joined #perl6
10:58 dalek nqp: 94ed47c | lizmat++ | tools/build/MOAR_REVISION:
10:58 dalek nqp: Bump Moar for warning free compile on clang
10:58 dalek nqp: review: https://github.com/perl6/nqp/commit/94ed47ce42
11:05 lizmat jnthn: alas, 3 warning generated https://gist.github.com/lizmat/c460bec2897e2caa05d2
11:05 lizmat but still, the silence is deafening   :-)
11:06 jnthn lizmat: Odd, I thought I fixed thsoe 3...
11:08 jnthn wtf, my local (and with clean diff) repo has those lines without the unsigned
11:09 jnthn oh...those are generated from another place...gah.
11:11 dalek rakudo/newio: b0d5507 | lizmat++ | src/core/Distro.pm:
11:11 dalek rakudo/newio: Make name building a bit faster
11:11 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/b0d5507d3f
11:11 dalek rakudo/nom: a964f98 | lizmat++ | tools/build/NQP_REVISION:
11:11 dalek rakudo/nom: Bump NQP for an almost warning free Moar
11:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a964f9817b
11:11 lizmat afk for a few hours
11:11 jnthn lizmat: It's not worth another bump, but I think I fixed those 3 too now.
11:11 lizmat cool, I'm happy as it is now  :-)
11:12 lizmat if something is really wrong, it's a lot more obvious now  ;-)
11:13 jnthn Indeed. :)
11:41 lumimies joined #perl6
11:41 Ven joined #perl6
11:45 mvuets joined #perl6
11:57 spider-mario joined #perl6
12:00 davercc`` joined #perl6
12:06 virtualsue joined #perl6
12:11 kurahaupo joined #perl6
12:11 itz Bytecode validation error at offset 4, instruction 2:
12:11 itz operand type 16 does not match register type 64 in method flush-states at lib/Panda/Ecosystem.pm:16
12:12 itz 2014.12-242-ga964f98 built on MoarVM version 2014.12-22-g0194409
12:17 itz hmm seems fixed by panda rebuild
12:18 jnthn Sounds like state bytecode left around.
12:19 jnthn *stale, even
12:23 anaeem1 joined #perl6
12:26 jluis_ joined #perl6
12:28 kaare__ joined #perl6
12:29 surendra joined #perl6
12:29 dakkar joined #perl6
12:29 surendra hellow
12:30 surendra a=[1,2,3,4,5,6,7,8]
12:30 surendra a
12:30 surendra print a
12:30 surendra exit
12:32 dakkar was that a bot?
12:33 timotimo someone mistaking the irc for a repl?
12:33 kaare__ joined #perl6
12:34 psch mistaking #perl6 for a python repl at that, from the looks of it
12:41 dakkar is there any usable p6 mode for emacs?
12:41 dakkar cperl-mode gets very confused
12:46 FROGGS is there currently a way to set the start value of an enum?
12:46 jnthn m: enum A (:b(41), :c(42)); say +c
12:46 camelia rakudo-moar a964f9: OUTPUT«42␤»
12:46 jnthn m: enum A (:b(41), :c); say +c
12:46 camelia rakudo-moar a964f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Di1RqCe8_z�Type error in enum. Got 'Bool' Expected: 'Int'�at /tmp/Di1RqCe8_z:1�------> [32menum A (:b(41), :c)[33m�[31m; say +c[0m�»
12:46 psch m: enum Foo ( a=> -1, <b c d> ); say +a
12:46 camelia rakudo-moar a964f9: OUTPUT«-1␤»
12:46 psch m: enum Foo ( a=> -1, <b c d> ); say +c
12:46 camelia rakudo-moar a964f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UXTfXIYlrpâ�¤Undeclared routine:â�¤    c used at line 1â�¤â�¤Â»
12:46 psch huh
12:46 jnthn m: enum A (:b(41), 'c'); say +c
12:46 camelia rakudo-moar a964f9: OUTPUT«42␤»
12:46 jnthn There we go.
12:47 psch m: enum Foo ( a=> -1, <b c d>.flat ); say +c
12:47 camelia rakudo-moar a964f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UtxdY0Ea_lâ�¤Undeclared routine:â�¤    c used at line 1â�¤â�¤Â»
12:47 FROGGS thanks :o)
12:47 FROGGS m: enum Foo ( a=> -1, |<b c d> ); say +c
12:47 camelia rakudo-moar a964f9: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
12:47 FROGGS :/
12:48 kaare__ joined #perl6
12:50 jack_rabbit joined #perl6
12:52 jnthn It's not a call, you can't use | there.
12:52 FROGGS yeah
13:05 FROGGS hmmm, how do I get a enum symbol by its value?
13:05 FROGGS ohh..
13:05 sqirrel_ joined #perl6
13:06 itz is the intended behaviour of $*OUT.t defined where?
13:06 itz ^ anywhere
13:06 itz p: say $*OUT.t
13:06 camelia rakudo-parrot a964f9: OUTPUT«False␤»
13:07 bartolin m: enum A (b => 42, <c d e>); say A.enums.perl
13:07 camelia rakudo-moar a964f9: OUTPUT«("c d e" => 43, "b" => 42).hash␤»
13:08 bartolin ^^^ is that behaviour intended? (also RT #115052)
13:08 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=115052
13:09 FROGGS I'm not sure... I'd like to see it flatten
13:10 psch +1, if shouldn't there's parents, but there's no way to flatten it currently
13:10 psch *parens
13:10 psch ...if it's a list
13:11 psch which might be the actual problem, does it make sense to expect a List to flatten there
13:11 psch m: (:a(1), <b c d>).perl.say
13:11 camelia rakudo-moar a964f9: OUTPUT«("a" => 1, ("b", "c", "d"))␤»
13:11 psch m: (:a(1), <b c d>.flat).perl.say
13:11 camelia rakudo-moar a964f9: OUTPUT«("a" => 1, ("b", "c", "d").list)␤»
13:11 itz hmm I guess $*OUT.t tests for the existance of a tty
13:12 timotimo yes
13:20 dsm are there any function which handles the malformed Buf in Perl 6? I don't want MoarVM dies with errro message "Malformed UTF-8"
13:21 timotimo Buf can always be malformed utf8
13:21 timotimo Buf holds whatever data you like
13:21 timotimo but there's an utf8 type that will complain (and also is read-only)
13:22 jnthn Yes, but if you take a Buf and try to decode it as utf-8 and its invalid, you'll get an exception.
13:22 timotimo of course :)
13:24 dsm then how can I convert malformed Buf into utf8 stably? not dies
13:25 dakkar dsm:  what should happen when the decoder hits an invalid sequenc?
13:25 dsm maybe replacement with Unicode replacement character?
13:25 dakkar stop? put a "replacement character" in there? call a function you pass to it and use the result?
13:26 dakkar right
13:27 dakkar I suspect there's a parameter you can pass to Buf.decode for that
13:27 dakkar oh, there isn't
13:27 dakkar interesting
13:28 dakkar jnthn:  should there be an adverb or something to specify how to handle malformed input? p5's Encode has that
13:29 grondilu joined #perl6
13:29 jnthn dakkar: Not sure if that's something for the core language or for module space.
13:30 jnthn Enough malformed crap exists in the world we'd better handle it somehow, alas...
13:30 dakkar yeah, and I'd really like to prevent 15 differently broken modules for this…
13:30 * dakkar looks at the source
13:32 dakkar no, ok, working that deep inside nqp is scary
13:32 FROGGS m: enum A (b => 42, 'c', 'd', 'e'); say A.WHO.list[43 - 42].value # is there a better way to get at the actual symbol?
13:32 camelia rakudo-moar a964f9: OUTPUT«c␤»
13:33 FROGGS m: enum A (b => 42, 'c', 'd', 'e'); say A.WHO.list.first(*.value == 43).value # perhaps that...
13:33 camelia rakudo-moar a964f9: OUTPUT«c␤»
13:33 jnthn FROGGS: A.enums iirc
13:33 masak good afternoon, #perl6
13:33 jnthn m: enum A (b => 42, 'c', 'd', 'e'); say A.enums.perl
13:33 camelia rakudo-moar a964f9: OUTPUT«("e" => 45, "c" => 43, "d" => 44, "b" => 42).hash␤»
13:33 FROGGS jnthn: but that will stringify the keys
13:33 jnthn Ah
13:33 FROGGS so I cannot return the symbol by numeric value
13:33 jnthn o/ masak
13:34 psch m: enum A <a b c>; A.enums.invert.grep(*.value eq c).say
13:34 camelia rakudo-moar a964f9: OUTPUT«2 => c␤»
13:34 jnthn m: enum A (b => 42, 'c', 'd', 'e'); say A(42).perl
13:34 camelia rakudo-moar a964f9: OUTPUT«A::b␤»
13:34 FROGGS ohh
13:34 jnthn m: enum A (b => 42, 'c', 'd', 'e'); say A(43).perl
13:34 camelia rakudo-moar a964f9: OUTPUT«A::c␤»
13:34 FROGGS O.o
13:34 jnthn Coercion may be what you want? :)
13:34 FROGGS \o/
13:34 FROGGS jnthn++
13:34 FROGGS most awesome
13:35 psch oh
13:35 psch i misunderstood the question i think
13:35 * masak is very pleased with the current state of the enums spec
13:35 masak I think I recall TimToady having to revise it *twice*, at least one of the times because of kvetches I carried back from userland.
13:35 masak if I look hard enough, I might find that backlog.
13:36 masak anyway, enums are very useful now. I can't think of any other language's enums I like better.
13:40 moritz m: FOO: for ^1 { }; say Foo
13:40 camelia rakudo-moar a964f9: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nAVCT5dDOiâ�¤Undeclared name:â�¤    Foo used at line 1â�¤â�¤Â»
13:40 moritz m: FOO: for ^1 { }; say FOO
13:40 camelia rakudo-moar a964f9: OUTPUT«Label<FOO>(at /tmp/4YmAAwPLjk:1, '[32m[33m�[31mFOO[32m: for ^1 { }; say FO[0m')�»
13:41 dakkar hm. signature question: I can say «Hash:D $foo» to say I want a real hash; can I say the same but using the "%" sigil?
13:41 gfldex would it be possible to change the css for http://pl6anet.org/ from font: 12pt to font: 1em?
13:41 dakkar «Hash:D %foo» means a different thing
13:42 moritz m: sub f(%h) { }; f(Hash)
13:42 camelia rakudo-moar a964f9: ( no output )
13:42 moritz m: sub f(%h is Hash:D) { }; f(Hash)
13:42 camelia rakudo-moar a964f9: OUTPUT«use of uninitialized value of type Any in string context  in any  at src/Perl6/World.nqp:1846␤␤Unhandled exception: No exception handler located for warn␤   at <unknown>:1  (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:prin…»
13:42 moritz m: sub f(%h where *.defined) { }; f(Hash)
13:42 camelia rakudo-moar a964f9: OUTPUT«Constraint type check failed for parameter '%h'␤  in sub f at /tmp/aSDziZUEXc:1␤  in block <unit> at /tmp/aSDziZUEXc:1␤␤»
13:42 moritz dakkar: ^^ not really pretty :(
13:43 dakkar am I wrong in thinking that a "where" is less optimizable than a :D ?
13:43 jnthn Yes.
13:43 dalek rakudo/nom: 7a1e7f4 | moritz++ | src/Perl6/Actions.nqp:
13:43 dalek rakudo/nom: "for" list iteration calls .for, not .map
13:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7a1e7f4241
13:43 dalek rakudo/nom: 97edf0c | moritz++ | src/core/List.pm:
13:43 dalek rakudo/nom: Speed up List.elems by about 10%
13:43 dalek rakudo/nom:
13:43 dalek rakudo/nom: ... in a micro benchmark with an already-reified list
13:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/97edf0ca44
13:43 jnthn Uh, wait, I misread
13:43 jnthn where is harder to optimize
13:43 dakkar :)
13:44 jnthn :D is very well optimized
13:44 moritz I wonder if sigils except $ should imply :D in a signature
13:44 jnthn moritz: Possibly.
13:44 moritz TimToady: ^^ any opinitions?
13:45 anaeem1 joined #perl6
13:45 jack_rabbit joined #perl6
13:46 anaeem1_ joined #perl6
13:47 grondilu joined #perl6
13:48 anaeem1 joined #perl6
13:49 moritz *opinions
13:51 espadrine joined #perl6
13:54 moritz m: A: say A.Int
13:54 camelia rakudo-moar a964f9: OUTPUT«139633732439080␤»
13:54 moritz uhm
13:54 moritz what's the motivation behind that?
13:54 FROGGS jnthn: was it possible to use C functions like this from NativeCall? xmlDocDumpMemory(self, &result, &len);
13:55 FROGGS moritz: the code that checks for the right label calls .Int IIRC
13:55 moritz FROGGS: but should it?
13:55 moritz FROGGS: I'd expect it call .WHERE or so, maybe
13:56 moritz Int is a highly user-exposed method
13:56 FROGGS yeah, perhaps we can refactor it, but I dunno offhand
13:57 * moritz tries if it's called at all
14:00 FROGGS wow, now I've seen a nativecall sub with 'returns Positional of Str'... highly interesting
14:00 moritz FROGGS: the code   foo: for ^5 { .say; foo.last}; say "alive"  doesn't ever call Label.Int
14:01 Sir_Ragnarok joined #perl6
14:01 FROGGS maybe it is a relict :/
14:01 dakkar what's the p6 idiom for the key/value slice that p5.20 has?
14:01 moritz :p
14:02 dakkar oh!
14:02 moritz m: my %h = <a b c d> => 1..*; say (%h<a c>:p).perl
14:02 camelia rakudo-moar a964f9: OUTPUT«()␤»
14:02 moritz huh.
14:02 moritz m: my %h = <a b c d> => 1..*; say (%h<a c>:kv).perl
14:02 camelia rakudo-moar a964f9: OUTPUT«()␤»
14:02 moritz m: my %h = <a b c d> => 1..*; say %h.perl
14:02 camelia rakudo-moar a964f9: OUTPUT«("a b c d" => 1..Inf).hash␤»
14:02 dakkar it works, anyway
14:03 moritz but I failed to initialize the hash properly
14:03 jnthn m; my %h; %h<a b c d> = 1..*; say %h.perl
14:03 jnthn m: my %h; %h<a b c d> = 1..*; say %h.perl
14:03 camelia rakudo-moar a964f9: OUTPUT«("a" => 1, "c" => 3, "d" => 4, "b" => 2).hash␤»
14:03 moritz m: my %h = <a b c d> Z=> 1..*; say (%h<a c>:kv).perl
14:03 camelia rakudo-moar a964f9: OUTPUT«("a", 1, "c", 3)␤»
14:03 moritz I meant to write Z=> from the beginning
14:03 moritz m: my %h = <a b c d> Z=> 1..*; say (%h<a c>:p).perl
14:03 jnthn Ah :)
14:03 camelia rakudo-moar a964f9: OUTPUT«("a" => 1, "c" => 3)␤»
14:03 moritz anyway, both :p and :kv exist
14:03 dalek zavolaj: 50d2890 | FROGGS++ | README.markdown:
14:03 dalek zavolaj: fix callback example (whitespace before signature)
14:03 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/50d28906dd
14:03 moritz lizmat++ for implementing them
14:04 grondilu joined #perl6
14:05 dalek doc: 587d0a3 | moritz++ | lib/Type/Label.pod:
14:05 dalek doc: Document class Label
14:05 dalek doc: review: https://github.com/perl6/doc/commit/587d0a3cad
14:05 moritz FROGGS: spectests succeed with Label.Int calling die()
14:06 moritz ... on moarvm, that is
14:06 moritz I guess I should build the other backends too before I remove it altogether
14:06 FROGGS I... I really can't tell how it is/was implemented...
14:07 anaeem1_ joined #perl6
14:14 dalek doc: 7e97efe | (Steve Mynott)++ | bin/p6doc-index:
14:14 dalek doc: don't build p6doc index keyed on junk
14:14 dalek doc: review: https://github.com/perl6/doc/commit/7e97efe564
14:18 grondilu joined #perl6
14:22 KCL_ joined #perl6
14:25 dalek rakudo/6pe-mop: 46a49aa | jnthn++ | src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp:
14:25 dalek rakudo/6pe-mop: Re-organize parametric role group handling.
14:25 dalek rakudo/6pe-mop:
14:25 dalek rakudo/6pe-mop: We want to create a single point of interning in order to make use of
14:25 dalek rakudo/6pe-mop: the 6model parametric extensions. Dis-entangle resolving a role group
14:25 dalek rakudo/6pe-mop: to a particular role from the specialization of the chosen role, so we
14:25 dalek rakudo/6pe-mop: will be able to apply the type interning inside of the parametric role
14:25 dalek rakudo/6pe-mop: type's meta-object. (This may, as a side-effect, enable us to use the
14:25 dalek rakudo/6pe-mop: group type as a point of interning curries.)
14:25 dalek rakudo/6pe-mop: review: https://github.com/rakudo/rakudo/commit/46a49aa68f
14:28 grondilu joined #perl6
14:30 dalek perl6-examples: d393e53 | (Steve Mynott)++ | cookbook/09directories/09-0 (4 files):
14:30 dalek perl6-examples: import a start of cookbook section 9
14:30 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/d393e53ec9
14:35 grondilu joined #perl6
14:37 dakkar m: %a=(a=>1,b=>2); %a{all <1 3>} :exists
14:37 camelia rakudo-moar 97edf0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/3TKXcfQkzJâ�¤Variable '%a' is not declaredâ�¤at /tmp/3TKXcfQkzJ:1â�¤------> [32m%a[33mâ��[31m=(a=>1,b=>2); %a{all <1 3>} :exists[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
14:37 dakkar m: my %a=(a=>1,b=>2); %a{all <1 3>} :exists
14:37 camelia rakudo-moar 97edf0: ( no output )
14:37 dakkar m: my %a=(a=>1,b=>2); say (%a{all <1 3>} :exists).perl
14:37 camelia rakudo-moar 97edf0: OUTPUT«all(Bool::False, Bool::False)␤»
14:37 dakkar m: my %a=(a=>1,b=>2); say (%a{all <1 3>} :defined).perl
14:37 camelia rakudo-moar 97edf0: OUTPUT«Unexpected named parameter 'defined' passed␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:3090␤  in sub thread_junction at src/gen/m-CORE.setting:3930␤  in block  at src/gen/m-CORE.setting:3954␤  in method AUTOTHREAD at src/gen/m-CORE.sett…»
14:38 dakkar why is :exists so special? :/
14:38 dakkar m: my %a=(a=>1,b=>2); say (%a{all <1 3>}.defined).perl
14:38 camelia rakudo-moar 97edf0: OUTPUT«Bool::True␤»
14:38 * itz is so cold in the London Hackspace that he considers a rakudo parrot build to heat the place up
14:38 jnthn Could also spectest r-j :P
14:41 rurban joined #perl6
14:47 anaeem1_ joined #perl6
14:48 grondilu joined #perl6
14:49 * itz wonders if the reference to glob() on line 1531 of S32-setting-library/IO.pod should be deleted?
14:53 masak seems the enum discussion is here: http://irclog.perlgeek.de/perl6/2009-11-27#i_1777658 -- and the "major rethink" commit is here: https://github.com/perl6/specs/commit/ea22e33e13d9fdf869cc6a6cfe33d6bb58e0999d
14:53 itz there is no "glob" anymore isn't there?
14:54 grondilu joined #perl6
14:54 grondilu joined #perl6
14:55 dalek rakudo/6pe-mop: 2d7be09 | jnthn++ | src/Perl6/Metamodel/Mixins.nqp:
14:55 dalek rakudo/6pe-mop: Refactor mixin code in preparation for caching.
14:55 dalek rakudo/6pe-mop: review: https://github.com/rakudo/rakudo/commit/2d7be097a4
14:56 brrt joined #perl6
15:00 lizmat itz: there is none at the moment
15:06 lizmat afk again&
15:09 pmurias joined #perl6
15:09 pmurias hi
15:14 jnthn o/ pmurias
15:14 moritz \o
15:14 pmurias jnthn: do we have a list of bugs that need to be fix in order to get automatic precompilation to work?
15:17 jnthn pmurias: Look in RT for precomp
15:20 pmurias I played with 007 yesterday. Recompiling just the right file vs not using precompilation at all makes a difference between ~1.5s and ~6s. For running a simple 007 -e='say(1)'
15:28 KCL_ joined #perl6
15:33 eternaleye joined #perl6
15:41 booly-yam-116 joined #perl6
15:45 booly-yam-9484 joined #perl6
15:53 booly-yam-5649 joined #perl6
15:56 tinyblak joined #perl6
15:56 BenGoldberg joined #perl6
15:59 adu joined #perl6
16:06 moritz FROGGS: ok, rakudo-parrot uses Label.Int
16:11 JimmyZ_ joined #perl6
16:11 moritz method reify contains a PIR block that coerces the label to int
16:12 JimmyZ_ Could someone add key exchange: diffie-hellman-group1-sha1 to openssh-server? looks like xshell etc only support diffie-hellman-group1-sha1
16:12 JimmyZ_ thanks.
16:13 colomon moritz: crontab smoking is up and running. email to external addresses not supported, is that by design or oversight?
16:14 pmurias did the dalek urls change?
16:15 * colomon wishees he had thought to bring one of the bluetooth keyboards to use with his newish iPad
16:16 * pmurias updates the dalek hook on nqp-js
16:18 tinyblak joined #perl6
16:18 timotimo what's the status on nqp-js btw? :)
16:19 JimmyZ_ oh, I meant hack.p6c.org ..
16:19 grondilu joined #perl6
16:19 adu colomon: do iPads support mice/trackpads?
16:20 * JimmyZ_ couldn't connect to hack.p6c.org because of failed  key exchange
16:21 JimmyZ_ timotimo: btw, Did you see my reply?  :)
16:21 timotimo i once paired an android phone with my sister's feature phone via bluetooth and a mouse cursor appeared on my android and she got an interface for controlling that mouse pointer
16:21 BenGoldberg joined #perl6
16:22 timotimo the problem with removing a box if we have _I to turn it into _i is that _i work with native integers and _I work with arbitrary sized ints
16:22 pmurias timotimo: not sure yet how much free hacking time I'll have to work on nqp-js
16:23 timotimo but a container could be prevented or something
16:24 timotimo so at least some allocations could perhaps be removed even before escape analysis
16:25 timotimo i wonder what's missing for escape analysis
16:25 BenGoldberg joined #perl6
16:28 zakharyas joined #perl6
16:28 JimmyZ_ timotimo: or _o to _i ,  ie: if_o => if_i
16:29 adu so _o stands for object?
16:30 JimmyZ_ yeah
16:30 arnsholt timotimo: Apparently, Android phones are compatible with Bluetooth mice too =D
16:30 adu also known as Parrot Magick Cookie?
16:30 JimmyZ_ adu: I meant the moarvm opcde
16:30 JimmyZ_ *opcode
16:30 arnsholt On Parrot, it'd be a PMC
16:30 adu JimmyZ_: I know
16:31 arnsholt On JVM or Moar, not so much
16:31 adu I'm just glad they're called objects now, I never liked the name "PMC"
16:32 timotimo arnsholt: neato
16:32 * JimmyZ_ hopes parrot will remove pmc and port moarvm's object/6model struct to there :)
16:32 JimmyZ_ well someday
16:32 timotimo JimmyZ_: i've tried to build that exact feature in the past, but it ended up breaking stuff; it's still around in a branch "spesh_box_tracking" or something?
16:33 JimmyZ_ oh, I remember it
16:33 JimmyZ_ :)
16:33 adu timotimo++
16:34 timotimo i still don't understand why it b0rked ... maybe some operation was working on the object in between write and read and my code wasn't properly aborting?
16:34 JimmyZ_ and I still didn't understand the use_fact function well enough, maybe due to my poor english :(
16:35 timotimo use_fact is there to decide whether or not the guards that have been created during the logging phase are useful
16:35 timotimo if you figure out during logging that r15(2) is always a concrete, but spesh never "uses that fact", the guard can be thrown away later
16:35 timotimo and we get fewer deopts
16:35 timotimo but if you rely on the concreteness, you have to mark the guard as "used" with "use_fact"
16:36 Mso150 joined #perl6
16:36 JimmyZ_ and then we maybe get more deopts?
16:39 JimmyZ_ 00:40 am here ,good night
16:40 noganex joined #perl6
16:42 colomon adu: I've got no idea.  i know the keyboard works, though I've not actually used it with this iPad.
16:42 * colomon wishees he had thought to bring one of the bluetooth keyboards to use with his newish iPad
16:54 timotimo i wonder if it'd be worth it to try porting spesh_diff to nqp and seeing how much faster it'll turn out to be
17:06 Ovid joined #perl6
17:11 adu ok
17:12 adu suppose I have a list, and some of the elements of the list are of type Spec, and the others are of type Type
17:12 adu how do I partition the list into Specs and Types?
17:13 adu something like if $x.HOW == Spec?
17:13 adu uhm, I mean WHAT
17:14 jnthn m: my @a = 1, 3, "cat", 7, "lol"; @a.classify({.^name}).perl.say
17:14 camelia rakudo-moar 97edf0: OUTPUT«("Int" => [1, 3, 7], "Str" => ["cat", "lol"]).hash␤»
17:14 dakkar m: my @a = 1, 3, "cat", 7, "lol"; @a.classify({.WHAT}).perl.say
17:14 camelia rakudo-moar 97edf0: OUTPUT«use of uninitialized value of type Int in string context  in method classify-list at src/gen/m-CORE.setting:1␤␤use of uninitialized value of type Int in string context  in method classify-list at src/gen/m-CORE.setting:1␤␤Cannot unbox a type object…»
17:14 dakkar ah!
17:15 arnsholt Wouldn't it be better to use ~~ to compare the element and the type?
17:15 dakkar is classify documented as requiring string values?
17:15 adu jnthn: also, Spec is a class, Type is a role
17:15 dakkar m: my @a = 1, 3, "cat", 7, "lol"; @a.classify({$_ ~~ Str ?? 'string' !! 'integer' }).perl.say
17:15 camelia rakudo-moar 97edf0: OUTPUT«("integer" => [1, 3, 7], "string" => ["cat", "lol"]).hash␤»
17:16 jnthn adu: I assumed you meant "exactly of type"... :)
17:16 adu jnthn: does that change anything?
17:16 isBEKaml joined #perl6
17:16 jnthn Well, you could somethin glike
17:16 adu jnthn: well, I believe the classes are either Spec or TypeOp (which does Type)
17:16 isBEKaml joined #perl6
17:16 jnthn @things.classify({ $_ ~~ Spec ?? 'spec' !! 'type' })
17:17 jnthn Though if it's a short list
17:17 jnthn You could just
17:17 adu jnthn: that works :)
17:17 jnthn @specs = .grep(Spec); @types = .grep(Type); :)
17:23 adu how do I flatten an array?
17:23 adu to a @()?
17:24 adu wait
17:24 adu no
17:24 adu to a Parcel
17:24 Ben_Goldberg joined #perl6
17:35 adu it works!
17:38 masak \o/
17:40 rmgk_ joined #perl6
17:43 mst where would I look for the current state of the art for embedding MoarVM+rakudo into perl5 code?
17:46 FROGGS mst: probably Inline::Perl5
17:46 FROGGS https://github.com/niner/Inline-Perl5/
17:46 FROGGS at least I think there was a way to turn it around...
17:53 biff_ joined #perl6
18:10 eternaleye joined #perl6
18:14 TimToady hah, .classify is currently defaulting to string hashes, and if you change it to object hashes, it breaks the compiler
18:14 kurahaupo joined #perl6
18:16 TimToady Method 'Str<381319720>' not found for invocant of class 'X::Undeclared::Symbols'
18:16 jnthn Wow.
18:17 TimToady so obviously it's putting a string in as the key, but not capable of pulling it back out as a string somehow
18:17 jnthn Object hashes are one of the things getting attention during the parametrics improvements.
18:18 jnthn Though at the moment I'm working on getting it able to deal with some simpler cases...
18:19 TimToady so...should I just put this on hold for now, maybe just spec it?
18:19 TimToady I think .classify could usefully default to object hashes keyed on numbers, enums, etc
18:20 TimToady but seems something is using the .WHICH directly instead of a stringy interface
18:21 jnthn TimToady: Yeah, and RT your patch as "tried this, didn't work"
18:21 jnthn I'll add it to my collection of tickets I'm hoping the current stuff I'm doing will resolve.
18:23 skids Doubt I'm the first to notice but evalbot neicza is borked
18:24 BenGoldberg_ joined #perl6
18:32 FROGGS_ joined #perl6
18:32 TimToady jnthn: actually, I think was a bootstrap issue, may have a good patch
18:33 TimToady > p -e 'say (1...10).classify(* % 2).perl'
18:33 TimToady Hash[Any,Any].new(1 => [1, 3, 5, 7, 9], 0 => [2, 4, 6, 8, 10])
18:33 TimToady but now to spectest
18:35 jnthn \o/
18:35 TimToady dakkar++ btw
18:35 jnthn away for a bit
18:35 Sqirrel joined #perl6
18:40 pmurias FROGGS_: turn it around?
18:44 moritz JimmyZ: key exchange algorithm added
18:45 skids m: 10:[40].say; # spec says this should error -- do we want to keep that specced?
18:45 camelia rakudo-moar 97edf0: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UmgvTuZ70M�You can't adverb that�at /tmp/UmgvTuZ70M:1�------> [32m10:[40][33m�[31m.say; # spec says this should error -- d[0m�»
18:45 skids oops.
18:45 skids m: :10[40].say; # spec says this should error -- do we want to keep that specced?
18:45 camelia rakudo-moar 97edf0: OUTPUT«40␤»
18:51 booly-yam-4706 joined #perl6
18:53 TimToady maybe we could relax it for the first 'digit'
18:54 TimToady :60[$hours,$minutes,$seconds) being the prototypicaly use case
18:54 TimToady *ical
18:56 TimToady $hours can usefully overflow, while $minutes and $seconds probably shouldn't
18:56 TimToady otoh, this is for constructing radixy numbers, so maybe we shouldn't allow even that
18:57 skids I'd argue it's more useful without the failure/check.  Not sure which is worse efficiency-wise -- doing the check, or doing the overflows.
18:57 TimToady if we have a multiple divmod operator that returns a list from $time divmod 60,60,24
18:57 TimToady then we want an operation that can do the inverse too
18:58 FROGGS_ pmurias: well, it was about "embedding" P6 in P5
18:58 TimToady and I don't think :60[] can be that operation, since there's no way to sneak the 24 in there
18:59 mst pmurias: I'm interested in the idea of having a plugin system that supports plugins written in either
18:59 mst (roughly)
18:59 dalek rakudo/nom: e37eb06 | lizmat++ | src/core/Supply.pm:
18:59 dalek rakudo/nom: Remove superfluous prototype
18:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e37eb0646c
18:59 TimToady so we want a @values mulmod 60,60,24 or so
19:00 TimToady 'course, then there's the question of whether mulmod should enforce overflow checking
19:00 TimToady but then :60[@list] would just be a shorthand for @list mulmod 60 xx *
19:01 TimToady one wants to preserve the round-tripping of ($value divmod @mods) mulmod @mods == $value
19:02 skids Well, the result of divmod would necessarily conform.
19:02 TimToady well, with extra parens, since == is tigher than multmod
19:03 TimToady oh, I was just explaining the semantics, not using that as an argument for checking
19:03 TimToady or maybe only as an argument for skipping the check on the largest part
19:03 lizmat m: say (1...10).classify(* % 2,:into(my %h{Int})).perl   # current way to use typed hashes on .classify
19:03 camelia rakudo-moar 97edf0: OUTPUT«Hash[Any,Int].new(0 => [2, 4, 6, 8, 10], 1 => [1, 3, 5, 7, 9])␤»
19:03 lizmat TimToady:  ^^
19:03 TimToady lizmat: yes, and that should be default
19:04 lizmat Int???
19:04 TimToady classifying into things that are not strings is too useful to not have it as the default
19:04 lizmat ok
19:04 TimToady int or enum or anything
19:05 TimToady anyway, I've got it working, but 3 tests fail
19:05 lizmat well, not surprised it will fail some tests
19:05 TimToady 2 because it breaks the idiom: my (:@even, :@odd) := classify { $_ %% 2 ?? 'even' !! 'odd' }, @list;
19:05 TimToady which appears to be a failure to turn a typed hash into a capture
19:06 TimToady even though the keys happen to be strings
19:07 TimToady there's also some failure inside t/spec/S03-smartmatch/signature-signature.t that might be an internal use of classify somewhere
19:08 TimToady oh, only 1 was a bind fail
19:08 TimToady categorize.t is just written to expect .perl to return an untyped hash
19:11 lizmat I remember now why typed hashes are not the default: I couldn't get typed hashes to work in the settings
19:11 lizmat that's also why Sets/Bags/Mixes don't use typed hashes undeneath
19:11 TimToady agh, they must
19:12 lizmat well, I had banged my head for over a week on it at the time
19:12 lizmat and decided on a different approach
19:13 lizmat which I'll gladly throw away, as soon as we have typed hashes working in the setting
19:13 TimToady well, maybe 6pe will help
19:13 eternaleye joined #perl6
19:13 TimToady well, I'm using typed hashes in the setting, and they work
19:13 lizmat well, then more power to you  :-)
19:13 TimToady well, now they work...they didn't on my first three tries :)
19:14 TimToady you have to use Hash.PARAMETERIZE_TYPE(Any,Any).new or things break downstream
19:14 lizmat btw, have you also checked it on jvm and parrot?
19:14 TimToady not yet
19:14 dalek nqp-js: c8daec5 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
19:14 dalek nqp-js: NYI things are emitted as cosole.trace(...) instead of silently ignored.
19:14 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/c8daec5b04
19:14 dalek nqp-js: 6032321 | (Pawel Murias)++ | TODO:
19:14 dalek nqp-js: Add writing a ifnull test to TODO.
19:14 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/6032321aa4
19:14 dalek nqp-js: 04f144b | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
19:14 dalek nqp-js: Implement nqp::ifnull.
19:14 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/04f144b91d
19:14 lizmat ah, forget JVM,
19:14 lizmat parrot was the only game in town when I worked on that
19:16 telex joined #perl6
19:17 pmurias mst: that would be great, I'm not sure moarvm has an offical embedding api atm
19:18 mst I suppose I could always start rakudo first, then do $p5.invoke('MyApp', 'run_forever');
19:18 mst but ... that would make me sad
19:19 pmurias Inline-Perl5 supports that approach currently
19:19 mst yes, that's where I got $p5.invoke from :)
19:20 arnsholt mst: I think moar mostly wraps libmoar.so, so embedding it in Perl 5 should be possible
19:21 arnsholt Whether the API is stable, I don't know
19:21 TimToady I think we need a shorthand for object hashes, such as \{}
19:22 beastd joined #perl6
19:23 TimToady either that, or we steal {} for object hashes, and provide some way of forcing one to be a string hash
19:24 lizmat well, that would slow down rakudo tremendously at the moment
19:24 TimToady not necessarily, if we fixed the spots that assume string hash
19:24 Juerd What is an "object hash"?
19:24 lizmat my %h{Any}
19:24 Ben_Goldberg joined #perl6
19:24 Juerd Ah
19:25 moritz Juerd: a hash with non-string keys
19:25 Juerd Can {} get adverbs?
19:25 lizmat yes
19:25 TimToady we could, for instance, say that ~{} is the string hash literal
19:25 lizmat if I understand you correct
19:26 moritz the problem is that adverbs go to the end
19:26 Juerd TimToady: I'd expect ~{} to return a stringified hash
19:26 pmurias mst: we could also embed the jvm :/
19:26 lizmat at the moment, accessing an element in an object hash, is about 22x slower than a string hash
19:26 moritz and hash literals can be quite long
19:26 mst pmurias: amusingly, Inline::Java does have two way calling
19:27 mst pmurias: but I think I'd rather stab myself in the scrotum with a rusty fork than go that route
19:27 Juerd Colon is taken, right? ;-)
19:27 moritz Juerd: yes
19:27 Juerd I'm thinking that a different spelling for => could be useful.
19:27 Juerd I dislike => anyway. It's hard to type. I've come to like Javascript's :.
19:27 TimToady Juerd: that doesn't help for {}
19:27 Juerd But : won't fly :)
19:28 Juerd TimToady: I don't really see why. It could mean something else depending on what's in it.
19:29 TimToady lizmat: they're slow because identity is poorly implemented as of yet, especially for immutables
19:29 TimToady Juerd: I mean literally the empty {}
19:29 TimToady so there is nothing in it to let you decide
19:29 lizmat agree, I was merely pointing out the ramifications of making {} default to %h{Any}
19:30 TimToady lizmat: we wouldn't do that unless we also fixed all the internal {} to use stringy
19:30 Juerd TimToady: Could the empty hash be a protohash, delaying the choice between object and string until later?
19:30 Juerd Hm, probably not
19:30 TimToady well, first use is also a bit problematical
19:32 Juerd Why does a hash need to be either type, instead of both simultaneously?
19:32 Juerd Or two hashes.
19:33 lizmat Juerd: that's how Sets/Bags/Mixes are implemented, basically
19:33 Juerd Which 'that'? :)
19:33 TimToady the P5 trick for object hashes, basically
19:34 lizmat A Bag is a hash with the .WHICH of the object as the key, and a Pair of the original key/value as the value
19:34 lizmat A Set is a hash with the .WHICH as the key, and the object as the value
19:35 TimToady object hashes are supposed to do that for you...
19:36 TimToady we need to figure out why they won't work in the setting (or didn't work, and do now...)
19:36 raydiak .tell tadzik noticed I can't "rakudobrew switch moar-2014.12" :) https://github.com/tadzik/rakudobrew/pull/25
19:36 yoleaux raydiak: I'll pass your message to tadzik.
19:37 lizmat I believe it when I see it: developing Sets/Bags/Mixes in rakudo was pretty frustrating thing at the time (on parrot)
19:38 dalek nqp-js: 10c334b | (Pawel Murias)++ | t/nqp/59-nqpop.t:
19:38 dalek nqp-js: Add tests for nqp::bitshiftl_i.
19:38 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/10c334b44b
19:38 dalek nqp-js: cb98dac | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
19:38 dalek nqp-js: Implement nqp::bitshiftl_i.
19:38 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/cb98dacd3a
19:39 TimToady I'll run the tests on the other VMs to see if it fails the same three tests, and then we'll know more
19:41 lizmat TimToady++  :-)
19:42 biff_ joined #perl6
19:42 TimToady maybe the literal for a string hash could be {~} as a degenerate case and otherwise based on the first key, or require a ~ on the first key
19:42 dj_goku joined #perl6
19:42 dj_goku joined #perl6
19:45 pmurias mst: I have little experience with MoarVM other than looking at what it's ops do so that I can reimplement them on nqp-js
19:46 raydiak thanks for the speedy merge colomon++
19:47 pmurias mst: if you want NQP plugins I could help with integrating nqp-js via JavaScript::V8
19:47 pmurias not sure that would be that useful
19:50 zakharyas joined #perl6
19:56 jnthn mst: I kinda punted on "embedding API" until somebody told me they wanted to use it. tbh it's muchly a case of writing documentation and making sure the API looks sane. If you're wanting to use it, I can probably look at doing that in the next couple of days.
19:56 skids m: my $a = 0; ($a, ++$a).say
19:56 camelia rakudo-moar e37eb0: OUTPUT«1 1␤»
19:56 jnthn We already build a libmoar and hve various stuff marked as part of the public API.
19:57 jnthn Though the stuff that got marked that way is intended for extending the VM rather than embedding it. So some things you'd want as an embedder may not be marked as such.
19:58 TimToady signals might be tricksy
19:58 lizmat skids: I think you cannot depend on the order
19:58 skids That... is going to throw off a lot of people.
19:59 lizmat maybe TimToady / jnthn have a different opinion ?
19:59 jnthn TimToady: Might be? :P
19:59 TimToady probably not :P
19:59 TimToady we could flip two coins and see if they match
20:00 TimToady but I suspect my opinion is the same as jnthn's
20:01 TimToady I doubt we're going to do more containerization of list values on the off chance that someone has put an alias into the list
20:02 jnthn ($a, ++$a) is nothing to do with ordering.
20:02 jnthn It's that you made a Parcel that contains the Scalar $a
20:02 TimToady and there are lots of places you probably want ($a, $a) to mean the same two things
20:02 mst jnthn: I'm not convinced I'll necessarily try any time soon, I'm more "attempting to keep track of progress" than anything else
20:03 mst jnthn: however I do have at least one plan that requires it, which I'll get to eventually :)
20:03 jnthn mst: I rather doubt you're going to be the only one who hatches a plan that needs it. :)
20:04 mst jnthn: of course. I'm just saying "I intend to be a user of this, but I have no particular schedule for when"
20:04 jnthn Knowing somebody intends to is motivation enough to sort it out soonish.
20:05 mst yeah, I just don't want you to do it then feel annoyed because I likely won't get round to it particularly soonish
20:07 adu joined #perl6
20:09 Mso150_c joined #perl6
20:13 eternaleye joined #perl6
20:13 skaufman joined #perl6
20:16 lizmat on the wishing for dept: I've seen several places in the core where we're doing first a substr on the first 1, 2 characters, and then on the rest of the string
20:16 lizmat I wonder whether we couldn't generalize that (and optimize) by having a "break" (as opposed to join)
20:17 lizmat that would take an array of indices in the string at which the string should be "broken"
20:17 lizmat basically, what .comb() does, but then with a range of indices
20:17 jdv79 mst: curious what use cases that would be for.  can't imagine that being fun to work with..
20:18 colomon adu: I've got no idea.  i know the keyboard works, though I've not actually used it with this iPad.
20:18 adu colomon: didn't you already say that?
20:18 lizmat $string.comb   would be the same as  $string.break(1..^$string.chars)
20:18 jdv79 i was about to say - deja vu
20:18 colomon o/
20:19 adu colomon: maybe not, my memory is longer than my scrollback buffer
20:19 jnthn lizmat: Split with a limit?
20:19 jnthn lizmat: But I think 2 substr operations should be fairly cheap.
20:19 lizmat no, not a limit, a set of indices
20:20 jnthn lizmat: Because, at least on MoarVM, the indexes don't require scanning 'cus of NFG.
20:20 lizmat my ($sigil,$name) = $variable.break(1)
20:20 lizmat my ($sigil,$twigil,$name) = $variable.break(1,2)
20:21 jnthn I highly doubt that's going to be more optimal than the individual substr calls.
20:21 lizmat yeah, you're probably right
20:22 lizmat I guess it's more of a Huffmanizing thing
20:22 FROGGS_ btw, I really enjoy libxml:
20:22 FROGGS_ my $doc  = XML::LibXML::Document.new();  my $elem = $doc.new-elem('foo');  my $attr = $doc.new-attr(:attr('e & f'));
20:22 FROGGS_ $elem.push: $attr;  say ~$elem; # <foo attr="e &amp; f"/>
20:23 mst jdv79: primarily, letting people experiment
20:24 mst I think
20:24 lizmat .tell itz what happened to szabgab's post on pl6anet.org ?
20:24 yoleaux lizmat: I'll pass your message to itz.
20:24 jdv79 i should have qualified that as "non-toyish" or production type usages.
20:24 jdv79 cool
20:24 mst though one of the things I'd been pondering is (ab)using rakudo just for the grammar engine
20:25 kjs_ joined #perl6
20:25 BenGoldberg_ joined #perl6
20:31 psch No such method 'postcircumfix:<( )>' for invocant of type 'Method'
20:31 psch i have a feeling i'm not going about "write JavaHOW in Perl 6" the right way... :)
20:32 psch the good part is that that only seems to happen for methods added with .^add_method
20:35 dalek specs: d327d32 | skids++ | S02-bits.pod:
20:35 dalek specs: Clarify that adverbial radix list form does not merely take decimal literals.
20:35 dalek specs: review: https://github.com/perl6/specs/commit/d327d3237d
20:35 Mso150 joined #perl6
20:36 dalek roast: 243f874 | skids++ | S02-literals/radix.t:
20:36 dalek roast: Add test for radix literal using a list of expressions
20:36 dalek roast: review: https://github.com/perl6/roast/commit/243f874d3d
20:41 kaare__ joined #perl6
20:45 dalek nqp-js: 0c3b93a | (Pawel Murias)++ | src/vm/js/ (2 files):
20:45 dalek nqp-js: Pass test 76.
20:45 dalek nqp-js:
20:45 dalek nqp-js: Implement ops for saving a capture and extracting positionals and invoking with it.
20:45 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/0c3b93aec9
20:45 slavik joined #perl6
20:47 psch the confusing bit is, that «my $meth = $javaclass.^find_method($addedMethod); $meth($javaclass)» works...
20:49 anaeem1 joined #perl6
20:51 anaeem1 joined #perl6
20:54 vendethiel pmurias++
20:56 FROGGS_ psch: strange when things work out :o)
20:58 psch FROGGS_: well, i'd still like to also call the method as literal behind the meth invocation dot...
20:59 FROGGS_ ahh, I see
21:00 FROGGS_ psch: I guess you are calling .compose after .add_method?
21:01 FROGGS_ (or .^compose for that matter)
21:01 rurban joined #perl6
21:04 psch FROGGS_: no, i'm not.  i'd have to write it first too...
21:05 anaeem1_ joined #perl6
21:05 FROGGS_ psch: there is an composetype op if that helps
21:08 eternaleye joined #perl6
21:08 TimToady lizmat: other than the usual flappers, -p and -j fail the same three tests, so I don't think we have vm-specific issues, at least with object classify
21:15 biff_ joined #perl6
21:25 lizmat TimToady: glad to hear that!
21:26 [Sno] joined #perl6
21:28 * lizmat is tired and gets some shuteye
21:32 Mso150 joined #perl6
21:33 tgt joined #perl6
21:34 dalek nqp-js: 69d1177 | (Pawel Murias)++ | src/vm/js/bin/run_tests:
21:34 dalek nqp-js: Add passing test 76 to run_tests.
21:34 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/69d1177254
21:34 dalek nqp-js: 826e11f | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
21:34 dalek nqp-js: Stub nqp::multicachefind and nqp::multicacheadd.
21:34 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/826e11f552
21:47 vendethiel pmurias: is this comment still relevant?
21:47 vendethiel https://github.com/pmurias/nqp-js/blob/826e11f5520428b1f84bbd416fe4d8abc4329e8e/src/vm/js/QAST/Compiler.nqp#L14
21:53 pmurias vendethiel: I think so
21:54 Mso150 joined #perl6
22:01 BenGoldberg_ joined #perl6
22:03 dalek nqp-js: e045091 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
22:03 dalek nqp-js: Simplify quote_string as we are no longer on parrot. vendethiel++
22:03 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/e045091c58
22:03 BenGoldberg_ joined #perl6
22:10 eternaleye joined #perl6
22:14 [Sno] joined #perl6
22:19 TimToady m: say :{}.WHAT
22:19 camelia rakudo-moar e37eb0: OUTPUT«(Hash)␤»
22:20 TimToady actually, I think :{} is available
22:20 TimToady m: say :{ a => 42 }
22:20 camelia rakudo-moar e37eb0: OUTPUT«a => 42␤»
22:20 TimToady yes, it more or less ignores the : in term position
22:22 timotimo what curious and unexpected construct could we use it for? :)
22:26 leont joined #perl6
22:27 TimToady that's a sekrit!
22:29 masak :)
22:29 * masak .oO( Larry gets the sekrit colon )
22:31 kaare__ joined #perl6
22:33 eternaleye joined #perl6
22:35 * FROGGS_ .oO( Colonel Sekrit )
22:54 raydiak ah nothing quite like rotating your tires with hand tools on mud in a mid-january snow storm to remind you that you're alive :)
22:57 FROGGS_ *g*
22:57 kurahaupo joined #perl6
23:02 Ben_Goldberg joined #perl6
23:02 clearcut joined #perl6
23:08 skids I usually reserve freezing my fingers for matters more urgent than uneven tire wear, personally :-)
23:09 raydiak it becomes urgent at a certain point :)
23:10 raydiak g/f wanted to drive herself to work today...made it a few blocks and came home so I could drive her...fronts (now rears) on a FWD are nearly-bald all-seasons
23:11 raydiak at least the other two have a few millimeters of tread left and are snow tires
23:12 raydiak so maybe it'll do stuff again like stop, go, and turn without expert handling :)
23:13 * raydiak just realized the irony of telling this story to someone named skids :)
23:14 raydiak wow my fingers don't want to stop typing emoticons today
23:14 skids Winter is fun fun powerslides! :-)
23:16 raydiak I almost miss having a stick in a car in a good state of repair...used to like to shoot down the freeway sideways in the snow w/the e-brake in my early 20s
23:17 raydiak that's a bit much for me these days anyway though
23:19 raydiak heh but this thing...brake rotors are scary-thin, steering is loose, FL wheel bearing is about to explode, tires are all way past legal wear...those are just the safety issues, not all operating issues
23:22 raydiak anyway I'm gonna go test drive it before it's dark...when I get back I'll check the backlog if anyone has advice: *everything* I have on the ecosystem is broken under precomp one way or another now...argh what to do!?  ttfn o/
23:23 eternaleye joined #perl6
23:26 skids Over half the precomp issues I've had have traced back to some list-like literal not serializing right in some context or another.
23:29 TimToady testing a version that treats :{} as an object hash composer...
23:44 masak I took moritz++' advice and wrote the README of 007 as a story. here's the result: https://github.com/masak/007/blob/master/README.md
23:47 [Sno] joined #perl6
23:53 lue masak: "His calm, deep voice that cuts through the silence." seems like a superfluous "that" to me.
23:54 masak lue: fixed. lue++
23:54 lue (still reading)
23:56 lue "\click**" methinks that \ wasn't meant to be there :)
23:56 geekosaur to me, "that" makes it a clause, not a complete sentence
23:56 masak lue: just found it. fixing.
23:57 geekosaur it's missing a verb and an object, since "that" turns "cuts through the silence" into an adjectival phrase
23:57 geekosaur (where's the linguist when you need him :p )
23:57 masak geekosaur: I think it was a fossil from when that sentence was an adjectival phrase, or something.
23:57 lue That's what I was thinking :) .
23:57 masak lue: fixed, thanks.

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

Perl 6 | Reference Documentation | Rakudo