»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by moritz on 25 December 2014.
dalek c: ada47f7 | skids++ | lib/Type/Metamodel/Primitives.pod:
Fix an obvious pasto s/create_method/create_type/ Also gloss up verbiage in a couple places.

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
c: 99ca399 | skids++ | lib/Type/Metamodel/RoleContainer.pod:
Fix typo in RoleContainer.pod
00:29
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
and .HOW's are probably always Scalars anyway, right?
japhb skids: Why would a .HOW be necessarily for a Scalar? 01:27
m: (my @).HOW.say
camelia rakudo-moar 46e92b: OUTPUT«Perl6::Metamodel::ClassHOW.new()␤»
psch m: say Any.HOW ~~ Scalar 01:28
camelia rakudo-moar 46e92b: OUTPUT«False␤»
skids Well, bound to scalar sigil I mean. Like is there a good reason why a .HOW would use an @ or % sigil? 01:29
psch m: class Foo { method baz(Foo:D @: $x) { say $x } }; 01:37
camelia ( no output )
psch m: class Foo { method baz(Foo:D @: $x) { say $x } }; my @f = Foo.new; @f>>.baz("bar")
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␤␤»
psch hm, i think 6pe is involved there? 01:38
anyway, i need sleep o/
skids o/ 01:41
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:55
japhb wonders if submethods should have different composition rules from normal methods and public attributes 01:59
skids hrm, yeah. Well, it has to be possible because atribute defaults do work. 02:01
skids Well, no answer yet but at least I learned about WHENCE/autoviv :-) 02:18
skids stoopid buggy old radeon. 02:50
novice777 Is some short form exists for "\n" in P6 as v10 was in P5 ? 03:33
leont Wow, there's just so much wrong with that suggestion 03:42
skids novice777: Not really because for one liners you usually end up just using .say anyway. 03:59
skids novice777: unless 10.chr is good enough for you. 04:07
novice777 skids: 10.chr ~~ qq/\n/ :-) ( 6 LETTERS ) 04:10
skids yes but 10.chr is closer to finger home positions :-) 04:11
skids wonders what the justification for weakening '...' with 'qq[...]' was. 04:26
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«:␤»
TimToady skids: primarily so you can have a long heredoc with just a few very sparse interpolations 04:56
especially when the long heredoc is already program 04:57
japhb TimToady: any thoughts on my multi-role BUILD question from ~3 hours ago? 04:58
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
I guess that means nothing stuck... :)
japhb heh
skids there will eventually come a "great role reckoning" I suppose. 05:01
japhb .ask jnthn Any ideas on 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.
TimToady m: constant nl = "\n"; print nl 05:19
camelia rakudo-moar 46e92b: OUTPUT«␤»
TimToady novice777: ^^^
m: print "\c10" 05:22
camelia rakudo-moar 46e92b: OUTPUT«␤»
TimToady if you like the 10 part of it :) 05:23
novice777 TimToady: Oh, thanks! 05:30
TimToady but v-strings were deemed to be a dimbulb idea
we tried not to carry over features that were that weak 05:31
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␤»
skids ...and no spectest that I can grep. 05:46
TimToady I'm quite sure we never thought about it :) 05:50
skids Maybe I'll spec that tomorrow, then. Time for bed now. 05:52
TimToady o/
japhb skids: If you spec that, please make it clear that 08:15
+':2[$a,0]' will not work -- the interpolation must happen first 08:16
so +":2[$a,0]" instead
& # To sleep, perchance to dream
FROGGS o/ 08:58
raydiak \o 09:00
moritz m: foo: say foo.^name 09:15
camelia rakudo-moar 46e92b: OUTPUT«Label␤»
FROGGS m: m: m: m: say m.^name 09:17
camelia rakudo-moar 46e92b: OUTPUT«===SORRY!=== Error while compiling /tmp/TDz_ZgtrL3␤Redeclaration of symbol m␤at /tmp/TDz_ZgtrL3:1␤------> m: m: ⏏m: say m.^name␤»
FROGGS :o)
m: m: say m 09:18
camelia rakudo-moar 46e92b: OUTPUT«===SORRY!=== Error while compiling /tmp/sreBgekmrF␤Null regex not allowed␤at /tmp/sreBgekmrF:1␤------> m: say m⏏<EOL>␤»
FROGGS :/
p: p: say p
camelia rakudo-parrot 46e92b: OUTPUT«Label<p>(at /tmp/joSvGHtQ94:1, '⏏p: say p')␤»
FROGGS hmmmm, the eject should be after the label... 09:19
p: p: say p
camelia rakudo-parrot 46e92b: OUTPUT«Label<p>(at /tmp/dB7IbgalnL:1, '⏏p: say p')␤»
timotimo m: n: o: p: say :q
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␤␤»
timotimo m: n: o: p: say (:q)
camelia rakudo-moar 46e92b: OUTPUT«q => True␤»
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
s/can/maybe/
FROGGS why on earth??? 10:15
const xmlChar *URL: The URI for that document
why do they mix URL and URI everywhere? 10:16
this one is called URL, but other places talk about BASE URI
I guess I go for uri everywhere... 10:19
jnthn morning, #perl6 10:25
yoleaux 05:06Z <japhb> jnthn: Any ideas on 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.
JimmyZ morning ,jnthn 10:27
FROGGS hi jnthn 10:28
FROGGS how I love Perl 6: 10:37
class XML::LibXML::Document is xmlDoc is repr('CStruct');
method encoding() {
Proxy.new( FETCH => -> $ { self.xmlDoc::encoding }, [...]
(xmlDoc is the CStruct) 10:38
jnthn :)
FROGGS I am working around the NYI'd 'is rw' for natively typed attributes :o) 10:39
and it is fun
jnthn That's also relatively high on my todo list :) 10:40
FROGGS yay :o) 10:41
lizmat good *, #perl6! 10:50
FROGGS hi lizmat
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:51
jnthn o/ lizmat 10:55
lizmat is it time for a MoarVM / nqp bump ?
jnthn lizmat: Mebbe; you should find the MoarVM build is a lot quieter under clang. :) 10:56
lizmat *that* I would like to see :-)
jnthn I got it warning free on clang 3.5 on Debian last night. 10:57
Hopefully that means it will be on OSX too :)
lizmat checking... 10:58
psch hi #perl6 \o
dalek p: 94ed47c | lizmat++ | tools/build/MOAR_REVISION:
Bump Moar for warning free compile on clang
10:58
lizmat jnthn: alas, 3 warning generated gist.github.com/lizmat/c460bec2897e2caa05d2 11:05
but still, the silence is deafening :-)
jnthn lizmat: Odd, I thought I fixed thsoe 3... 11:06
wtf, my local (and with clean diff) repo has those lines without the unsigned 11:08
oh...those are generated from another place...gah. 11:09
dalek kudo/newio: b0d5507 | lizmat++ | src/core/Distro.pm:
Make name building a bit faster
11:11
kudo/nom: a964f98 | lizmat++ | tools/build/NQP_REVISION:
Bump NQP for an almost warning free Moar
lizmat afk for a few hours
jnthn lizmat: It's not worth another bump, but I think I fixed those 3 too now.
lizmat cool, I'm happy as it is now :-)
if something is really wrong, it's a lot more obvious now ;-) 11:12
jnthn Indeed. :) 11:13
itz Bytecode validation error at offset 4, instruction 2: 12:11
operand type 16 does not match register type 64 in method flush-states at lib/Panda/Ecosystem.pm:16
2014.12-242-ga964f98 built on MoarVM version 2014.12-22-g0194409 12:12
hmm seems fixed by panda rebuild 12:17
jnthn Sounds like state bytecode left around. 12:18
*stale, even 12:19
surendra hellow 12:30
a=[1,2,3,4,5,6,7,8]
a
print a
exit 12:31
dakkar was that a bot? 12:32
timotimo someone mistaking the irc for a repl? 12:33
psch mistaking #perl6 for a python repl at that, from the looks of it 12:34
dakkar is there any usable p6 mode for emacs? 12:41
cperl-mode gets very confused
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
camelia rakudo-moar a964f9: OUTPUT«42␤»
jnthn m: enum A (:b(41), :c); say +c
camelia rakudo-moar a964f9: OUTPUT«===SORRY!=== Error while compiling /tmp/Di1RqCe8_z␤Type error in enum. Got 'Bool' Expected: 'Int'␤at /tmp/Di1RqCe8_z:1␤------> enum A (:b(41), :c)⏏; say +c␤»
psch m: enum Foo ( a=> -1, <b c d> ); say +a
camelia rakudo-moar a964f9: OUTPUT«-1␤»
psch m: enum Foo ( a=> -1, <b c d> ); say +c
camelia rakudo-moar a964f9: OUTPUT«===SORRY!=== Error while compiling /tmp/UXTfXIYlrp␤Undeclared routine:␤ c used at line 1␤␤»
psch huh
jnthn m: enum A (:b(41), 'c'); say +c
camelia rakudo-moar a964f9: OUTPUT«42␤»
jnthn There we go.
psch m: enum Foo ( a=> -1, <b c d>.flat ); say +c 12:47
camelia rakudo-moar a964f9: OUTPUT«===SORRY!=== Error while compiling /tmp/UtxdY0Ea_l␤Undeclared routine:␤ c used at line 1␤␤»
FROGGS thanks :o)
m: enum Foo ( a=> -1, |<b c d> ); say +c
camelia rakudo-moar a964f9: OUTPUT«===SORRY!===␤Cannot invoke null object␤»
FROGGS :/
jnthn It's not a call, you can't use | there. 12:52
FROGGS yeah
hmmm, how do I get a enum symbol by its value? 13:05
ohh..
itz is the intended behaviour of $*OUT.t defined where? 13:06
^ anywhere
p: say $*OUT.t
camelia rakudo-parrot a964f9: OUTPUT«False␤»
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␤»
bartolin ^^^ is that behaviour intended? (also RT #115052) 13:08
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=115052
FROGGS I'm not sure... I'd like to see it flatten 13:09
psch +1, if shouldn't there's parents, but there's no way to flatten it currently 13:10
*parens
...if it's a list
which might be the actual problem, does it make sense to expect a List to flatten there 13:11
m: (:a(1), <b c d>).perl.say
camelia rakudo-moar a964f9: OUTPUT«("a" => 1, ("b", "c", "d"))␤»
psch m: (:a(1), <b c d>.flat).perl.say
camelia rakudo-moar a964f9: OUTPUT«("a" => 1, ("b", "c", "d").list)␤»
itz hmm I guess $*OUT.t tests for the existance of a tty
timotimo yes 13:12
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:20
timotimo Buf can always be malformed utf8 13:21
Buf holds whatever data you like
but there's an utf8 type that will complain (and also is read-only)
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 :)
dsm then how can I convert malformed Buf into utf8 stably? not dies 13:24
dakkar dsm: what should happen when the decoder hits an invalid sequenc? 13:25
dsm maybe replacement with Unicode replacement character?
dakkar stop? put a "replacement character" in there? call a function you pass to it and use the result?
right 13:26
I suspect there's a parameter you can pass to Buf.decode for that 13:27
oh, there isn't
interesting
jnthn: should there be an adverb or something to specify how to handle malformed input? p5's Encode has that 13:28
jnthn dakkar: Not sure if that's something for the core language or for module space. 13:29
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…
dakkar looks at the source
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?
camelia rakudo-moar a964f9: OUTPUT«c␤»
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␤»
jnthn FROGGS: A.enums iirc
masak good afternoon, #perl6
jnthn m: enum A (b => 42, 'c', 'd', 'e'); say A.enums.perl
camelia rakudo-moar a964f9: OUTPUT«("e" => 45, "c" => 43, "d" => 44, "b" => 42).hash␤»
FROGGS jnthn: but that will stringify the keys
jnthn Ah
FROGGS so I cannot return the symbol by numeric value
jnthn o/ masak
psch m: enum A <a b c>; A.enums.invert.grep(*.value eq c).say 13:34
camelia rakudo-moar a964f9: OUTPUT«2 => c␤»
jnthn m: enum A (b => 42, 'c', 'd', 'e'); say A(42).perl
camelia rakudo-moar a964f9: OUTPUT«A::b␤»
FROGGS ohh
jnthn m: enum A (b => 42, 'c', 'd', 'e'); say A(43).perl
camelia rakudo-moar a964f9: OUTPUT«A::c␤»
FROGGS O.o
jnthn Coercion may be what you want? :)
FROGGS \o/
jnthn++
most awesome
psch oh 13:35
i misunderstood the question i think
masak is very pleased with the current state of the enums spec
I think I recall TimToady having to revise it *twice*, at least one of the times because of kvetches I carried back from userland.
if I look hard enough, I might find that backlog.
anyway, enums are very useful now. I can't think of any other language's enums I like better. 13:36
moritz m: FOO: for ^1 { }; say Foo 13:40
camelia rakudo-moar a964f9: OUTPUT«===SORRY!=== Error while compiling /tmp/nAVCT5dDOi␤Undeclared name:␤ Foo used at line 1␤␤»
moritz m: FOO: for ^1 { }; say FOO
camelia rakudo-moar a964f9: OUTPUT«Label<FOO>(at /tmp/4YmAAwPLjk:1, '⏏FOO: for ^1 { }; say FO')␤»
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 pl6anet.org/ from font: 12pt to font: 1em?
dakkar «Hash:D %foo» means a different thing
moritz m: sub f(%h) { }; f(Hash) 13:42
camelia ( no output )
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…»
moritz m: sub f(%h where *.defined) { }; f(Hash)
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␤␤»
moritz dakkar: ^^ not really pretty :(
dakkar am I wrong in thinking that a "where" is less optimizable than a :D ? 13:43
jnthn Yes.
dalek kudo/nom: 7a1e7f4 | moritz++ | src/Perl6/Actions.nqp:
"for" list iteration calls .for, not .map
kudo/nom: 97edf0c | moritz++ | src/core/List.pm:
Speed up List.elems by about 10%

  ... in a micro benchmark with an already-reified list
jnthn Uh, wait, I misread
where is harder to optimize
dakkar :)
jnthn :D is very well optimized 13:44
moritz I wonder if sigils except $ should imply :D in a signature
jnthn moritz: Possibly.
moritz TimToady: ^^ any opinitions?
moritz *opinions 13:49
moritz m: A: say A.Int 13:54
camelia rakudo-moar a964f9: OUTPUT«139633732439080␤»
moritz uhm
what's the motivation behind that?
FROGGS jnthn: was it possible to use C functions like this from NativeCall? xmlDocDumpMemory(self, &result, &len);
moritz: the code that checks for the right label calls .Int IIRC 13:55
moritz FROGGS: but should it?
FROGGS: I'd expect it call .WHERE or so, maybe
Int is a highly user-exposed method 13:56
FROGGS yeah, perhaps we can refactor it, but I dunno offhand
moritz tries if it's called at all 13:57
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
FROGGS maybe it is a relict :/ 14:01
dakkar what's the p6 idiom for the key/value slice that p5.20 has?
moritz :p
dakkar oh! 14:02
moritz m: my %h = <a b c d> => 1..*; say (%h<a c>:p).perl
camelia rakudo-moar a964f9: OUTPUT«()␤»
moritz huh.
m: my %h = <a b c d> => 1..*; say (%h<a c>:kv).perl
camelia rakudo-moar a964f9: OUTPUT«()␤»
moritz m: my %h = <a b c d> => 1..*; say %h.perl
camelia rakudo-moar a964f9: OUTPUT«("a b c d" => 1..Inf).hash␤»
dakkar it works, anyway
moritz but I failed to initialize the hash properly 14:03
jnthn m; my %h; %h<a b c d> = 1..*; say %h.perl
m: my %h; %h<a b c d> = 1..*; say %h.perl
camelia rakudo-moar a964f9: OUTPUT«("a" => 1, "c" => 3, "d" => 4, "b" => 2).hash␤»
moritz m: my %h = <a b c d> Z=> 1..*; say (%h<a c>:kv).perl
camelia rakudo-moar a964f9: OUTPUT«("a", 1, "c", 3)␤»
moritz I meant to write Z=> from the beginning
moritz m: my %h = <a b c d> Z=> 1..*; say (%h<a c>:p).perl 14:03
jnthn Ah :)
camelia rakudo-moar a964f9: OUTPUT«("a" => 1, "c" => 3)␤»
moritz anyway, both :p and :kv exist
dalek volaj: 50d2890 | FROGGS++ | README.markdown:
fix callback example (whitespace before signature)
moritz lizmat++ for implementing them
dalek c: 587d0a3 | moritz++ | lib/Type/Label.pod:
Document class Label
14:05
moritz FROGGS: spectests succeed with Label.Int calling die()
... on moarvm, that is 14:06
I guess I should build the other backends too before I remove it altogether
FROGGS I... I really can't tell how it is/was implemented...
dalek c: 7e97efe | (Steve Mynott)++ | bin/p6doc-index:
don't build p6doc index keyed on junk
14:14
dalek kudo/6pe-mop: 46a49aa | jnthn++ | src/Perl6/Metamodel/ParametricRoleGroupHOW.nqp:
Re-organize parametric role group handling.

We want to create a single point of interning in order to make use of the 6model parametric extensions. Dis-entangle resolving a role group to a particular role from the specialization of the chosen role, so we will be able to apply the type interning inside of the parametric role type's meta-object. (This may, as a side-effect, enable us to use the group type as a point of interning curries.)
14:25
dalek pan style="color: #395be5">perl6-examples: d393e53 | (Steve Mynott)++ | cookbook/09directories/09-0 (4 files):
import a start of cookbook section 9
14:30
dakkar m: %a=(a=>1,b=>2); %a{all <1 3>} :exists 14:37
camelia rakudo-moar 97edf0: OUTPUT«===SORRY!=== Error while compiling /tmp/3TKXcfQkzJ␤Variable '%a' is not declared␤at /tmp/3TKXcfQkzJ:1␤------> %a⏏=(a=>1,b=>2); %a{all <1 3>} :exists␤ expecting any of:␤ postfix␤»
dakkar m: my %a=(a=>1,b=>2); %a{all <1 3>} :exists
camelia ( no output )
dakkar m: my %a=(a=>1,b=>2); say (%a{all <1 3>} :exists).perl
camelia rakudo-moar 97edf0: OUTPUT«all(Bool::False, Bool::False)␤»
dakkar m: my %a=(a=>1,b=>2); say (%a{all <1 3>} :defined).perl
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…»
dakkar why is :exists so special? :/ 14:38
m: my %a=(a=>1,b=>2); say (%a{all <1 3>}.defined).perl
camelia rakudo-moar 97edf0: OUTPUT«Bool::True␤»
itz is so cold in the London Hackspace that he considers a rakudo parrot build to heat the place up
jnthn Could also spectest r-j :P
itz wonders if the reference to glob() on line 1531 of S32-setting-library/IO.pod should be deleted? 14:49
masak seems the enum discussion is here: irclog.perlgeek.de/perl6/2009-11-27#i_1777658 -- and the "major rethink" commit is here: github.com/perl6/specs/commit/ea22...bb58e0999d 14:53
itz there is no "glob" anymore isn't there? 14:53
dalek kudo/6pe-mop: 2d7be09 | jnthn++ | src/Perl6/Metamodel/Mixins.nqp:
Refactor mixin code in preparation for caching.
14:55
lizmat itz: there is none at the moment 15:00
afk again& 15:06
pmurias hi 15:09
jnthn o/ pmurias 15:14
moritz \o
pmurias jnthn: do we have a list of bugs that need to be fix in order to get automatic precompilation to work?
jnthn pmurias: Look in RT for precomp 15:17
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:20
moritz FROGGS: ok, rakudo-parrot uses Label.Int 16:06
moritz method reify contains a PIR block that coerces the label to int 16:11
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
thanks.
colomon moritz: crontab smoking is up and running. email to external addresses not supported, is that by design or oversight? 16:13
pmurias did the dalek urls change? 16:14
colomon wishees he had thought to bring one of the bluetooth keyboards to use with his newish iPad 16:15
pmurias updates the dalek hook on nqp-js 16:16
timotimo what's the status on nqp-js btw? :) 16:18
JimmyZ_ oh, I meant hack.p6c.org .. 16:19
adu colomon: do iPads support mice/trackpads? 16:19
JimmyZ_ couldn't connect to hack.p6c.org because of failed key exchange 16:20
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
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
timotimo but a container could be prevented or something 16:23
so at least some allocations could perhaps be removed even before escape analysis 16:24
timotimo i wonder what's missing for escape analysis 16:25
JimmyZ_ timotimo: or _o to _i , ie: if_o => if_i 16:28
adu so _o stands for object? 16:29
JimmyZ_ yeah 16:30
arnsholt timotimo: Apparently, Android phones are compatible with Bluetooth mice too =D
adu also known as Parrot Magick Cookie?
JimmyZ_ adu: I meant the moarvm opcde
*opcode
arnsholt On Parrot, it'd be a PMC
adu JimmyZ_: I know
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"
timotimo arnsholt: neato 16:32
JimmyZ_ hopes parrot will remove pmc and port moarvm's object/6model struct to there :)
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?
JimmyZ_ oh, I remember it 16:33
:)
adu timotimo++
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 :(
timotimo use_fact is there to decide whether or not the guards that have been created during the logging phase are useful 16:35
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
and we get fewer deopts
but if you rely on the concreteness, you have to mark the guard as "used" with "use_fact"
JimmyZ_ and then we maybe get more deopts? 16:36
00:40 am here ,good night 16:39
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
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 16:54
adu ok 17:11
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
how do I partition the list into Specs and Types?
something like if $x.HOW == Spec? 17:13
uhm, I mean WHAT
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␤»
dakkar m: my @a = 1, 3, "cat", 7, "lol"; @a.classify({.WHAT}).perl.say
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…»
dakkar ah!
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?
adu jnthn: also, Spec is a class, Type is a role
dakkar m: my @a = 1, 3, "cat", 7, "lol"; @a.classify({$_ ~~ Str ?? 'string' !! 'integer' }).perl.say
camelia rakudo-moar 97edf0: OUTPUT«("integer" => [1, 3, 7], "string" => ["cat", "lol"]).hash␤»
jnthn adu: I assumed you meant "exactly of type"... :) 17:16
adu jnthn: does that change anything?
jnthn Well, you could somethin glike 17:16
adu jnthn: well, I believe the classes are either Spec or TypeOp (which does Type)
jnthn @things.classify({ $_ ~~ Spec ?? 'spec' !! 'type' }) 17:16
Though if it's a short list 17:17
You could just
adu jnthn: that works :)
jnthn @specs = .grep(Spec); @types = .grep(Type); :)
adu how do I flatten an array? 17:23
to a @()?
wait 17:24
no
to a Parcel
adu it works! 17:35
masak \o/ 17:38
mst where would I look for the current state of the art for embedding MoarVM+rakudo into perl5 code? 17:43
FROGGS mst: probably Inline::Perl5 17:46
github.com/niner/Inline-Perl5/
at least I think there was a way to turn it around...
TimToady hah, .classify is currently defaulting to string hashes, and if you change it to object hashes, it breaks the compiler 18:14
TimToady Method 'Str<381319720>' not found for invocant of class 'X::Undeclared::Symbols' 18:16
jnthn Wow.
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.
Though at the moment I'm working on getting it able to deal with some simpler cases... 18:18
TimToady so...should I just put this on hold for now, maybe just spec it? 18:19
I think .classify could usefully default to object hashes keyed on numbers, enums, etc
but seems something is using the .WHICH directly instead of a stringy interface 18:20
jnthn TimToady: Yeah, and RT your patch as "tried this, didn't work" 18:21
I'll add it to my collection of tickets I'm hoping the current stuff I'm doing will resolve.
skids Doubt I'm the first to notice but evalbot neicza is borked 18:23
TimToady jnthn: actually, I think was a bootstrap issue, may have a good patch 18:32
> p -e 'say (1...10).classify(* % 2).perl' 18:33
Hash[Any,Any].new(1 => [1, 3, 5, 7, 9], 0 => [2, 4, 6, 8, 10])
but now to spectest
jnthn \o/ 18:35
TimToady dakkar++ btw
jnthn away for a bit
pmurias FROGGS_: turn it around? 18:40
moritz JimmyZ: key exchange algorithm added 18:44
skids m: 10:[40].say; # spec says this should error -- do we want to keep that specced? 18:45
camelia rakudo-moar 97edf0: OUTPUT«===SORRY!=== Error while compiling /tmp/UmgvTuZ70M␤You can't adverb that␤at /tmp/UmgvTuZ70M:1␤------> 10:[40]⏏.say; # spec says this should error -- d␤»
skids oops.
m: :10[40].say; # spec says this should error -- do we want to keep that specced?
camelia rakudo-moar 97edf0: OUTPUT«40␤»
TimToady maybe we could relax it for the first 'digit' 18:53
:60[$hours,$minutes,$seconds) being the prototypicaly use case 18:54
*ical
$hours can usefully overflow, while $minutes and $seconds probably shouldn't 18:56
otoh, this is for constructing radixy numbers, so maybe we shouldn't allow even that
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
then we want an operation that can do the inverse too
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
mst pmurias: I'm interested in the idea of having a plugin system that supports plugins written in either 18:59
(roughly)
dalek kudo/nom: e37eb06 | lizmat++ | src/core/Supply.pm:
Remove superfluous prototype
TimToady so we want a @values mulmod 60,60,24 or so
'course, then there's the question of whether mulmod should enforce overflow checking 19:00
but then :60[@list] would just be a shorthand for @list mulmod 60 xx *
one wants to preserve the round-tripping of ($value divmod @mods) mulmod @mods == $value 19:01
skids Well, the result of divmod would necessarily conform. 19:02
TimToady well, with extra parens, since == is tigher than multmod
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
camelia rakudo-moar 97edf0: OUTPUT«Hash[Any,Int].new(0 => [2, 4, 6, 8, 10], 1 => [1, 3, 5, 7, 9])␤»
lizmat TimToady: ^^
TimToady lizmat: yes, and that should be default
lizmat Int??? 19:04
TimToady classifying into things that are not strings is too useful to not have it as the default
lizmat ok
TimToady int or enum or anything
anyway, I've got it working, but 3 tests fail 19:05
lizmat well, not surprised it will fail some tests
TimToady 2 because it breaks the idiom: my (:@even, :@odd) := classify { $_ %% 2 ?? 'even' !! 'odd' }, @list;
which appears to be a failure to turn a typed hash into a capture
even though the keys happen to be strings 19:06
there's also some failure inside t/spec/S03-smartmatch/signature-signature.t that might be an internal use of classify somewhere 19:07
oh, only 1 was a bind fail 19:08
categorize.t is just written to expect .perl to return an untyped hash
lizmat I remember now why typed hashes are not the default: I couldn't get typed hashes to work in the settings 19:11
that's also why Sets/Bags/Mixes don't use typed hashes undeneath
TimToady agh, they must
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:12
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
TimToady well, I'm using typed hashes in the setting, and they work 19:13
lizmat well, then more power to you :-)
TimToady well, now they work...they didn't on my first three tries :)
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?
TimToady not yet
dalek p-js: c8daec5 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
NYI things are emitted as cosole.trace(...) instead of silently ignored.
p-js: 6032321 | (Pawel Murias)++ | TODO:
Add writing a ifnull test to TODO.
p-js: 04f144b | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement nqp::ifnull.
lizmat ah, forget JVM,
parrot was the only game in town when I worked on that
pmurias mst: that would be great, I'm not sure moarvm has an offical embedding api atm 19:17
mst I suppose I could always start rakudo first, then do $p5.invoke('MyApp', 'run_forever'); 19:18
but ... that would make me sad
pmurias Inline-Perl5 supports that approach currently 19:19
mst yes, that's where I got $p5.invoke from :)
arnsholt mst: I think moar mostly wraps libmoar.so, so embedding it in Perl 5 should be possible 19:20
Whether the API is stable, I don't know 19:21
TimToady I think we need a shorthand for object hashes, such as \{}
TimToady either that, or we steal {} for object hashes, and provide some way of forcing one to be a string hash 19:23
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
Juerd What is an "object hash"?
lizmat my %h{Any}
Juerd Ah 19:25
moritz Juerd: a hash with non-string keys
Juerd Can {} get adverbs?
lizmat yes
TimToady we could, for instance, say that ~{} is the string hash literal
lizmat if I understand you correct
moritz the problem is that adverbs go to the end 19:26
Juerd TimToady: I'd expect ~{} to return a stringified hash
pmurias mst: we could also embed the jvm :/
lizmat at the moment, accessing an element in an object hash, is about 22x slower than a string hash
moritz and hash literals can be quite long
mst pmurias: amusingly, Inline::Java does have two way calling
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? ;-)
moritz Juerd: yes
Juerd I'm thinking that a different spelling for => could be useful.
I dislike => anyway. It's hard to type. I've come to like Javascript's :.
TimToady Juerd: that doesn't help for {}
Juerd But : won't fly :)
Juerd TimToady: I don't really see why. It could mean something else depending on what's in it. 19:28
TimToady lizmat: they're slow because identity is poorly implemented as of yet, especially for immutables 19:29
Juerd: I mean literally the empty {}
so there is nothing in it to let you decide
lizmat agree, I was merely pointing out the ramifications of making {} default to %h{Any}
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?
Hm, probably not
TimToady well, first use is also a bit problematical
Juerd Why does a hash need to be either type, instead of both simultaneously? 19:32
Or two hashes.
lizmat Juerd: that's how Sets/Bags/Mixes are implemented, basically 19:33
Juerd Which 'that'? :)
TimToady the P5 trick for object hashes, basically
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
A Set is a hash with the .WHICH as the key, and the object as the value
TimToady object hashes are supposed to do that for you... 19:35
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" :) github.com/tadzik/rakudobrew/pull/25
yoleaux raydiak: I'll pass your message to tadzik.
lizmat I believe it when I see it: developing Sets/Bags/Mixes in rakudo was pretty frustrating thing at the time (on parrot) 19:37
dalek p-js: 10c334b | (Pawel Murias)++ | t/nqp/59-nqpop.t:
Add tests for nqp::bitshiftl_i.
19:38
p-js: cb98dac | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Implement nqp::bitshiftl_i.
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:39
lizmat TimToady++ :-) 19:41
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
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:45
raydiak thanks for the speedy merge colomon++ 19:46
pmurias mst: if you want NQP plugins I could help with integrating nqp-js via JavaScripdt::V8 19:47
not sure that would be that useful
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
camelia rakudo-moar e37eb0: OUTPUT«1 1␤»
jnthn We already build a libmoar and hve various stuff marked as part of the public API.
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:57
TimToady signals might be tricksy 19:58
lizmat skids: I think you cannot depend on the order
skids That... is going to throw off a lot of people.
lizmat maybe TimToady / jnthn have a different opinion ? 19:59
jnthn TimToady: Might be? :P
TimToady probably not :P
we could flip two coins and see if they match
but I suspect my opinion is the same as jnthn's 20:00
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:01
jnthn ($a, ++$a) is nothing to do with ordering. 20:02
It's that you made a Parcel that contains the Scalar $a
TimToady and there are lots of places you probably want ($a, $a) to mean the same two things
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
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. :)
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.
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:05
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
I wonder whether we couldn't generalize that (and optimize) by having a "break" (as opposed to join)
that would take an array of indices in the string at which the string should be "broken" 20:17
basically, what .comb() does, but then with a range of indices
jdv79 mst: curious what use cases that would be for. can't imagine that being fun to work with..
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?
lizmat $string.comb would be the same as $string.break(1..^$string.chars)
jdv79 i was about to say - deja vu
colomon o/
adu colomon: maybe not, my memory is longer than my scrollback buffer 20:19
jnthn lizmat: Split with a limit?
lizmat: But I think 2 substr operations should be fairly cheap.
lizmat no, not a limit, a set of indices
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)
my ($sigil,$twigil,$name) = $variable.break(1,2)
jnthn I highly doubt that's going to be more optimal than the individual substr calls. 20:21
lizmat yeah, you're probably right
I guess it's more of a Huffmanizing thing 20:22
FROGGS_ btw, I really enjoy libxml:
my $doc = XML::LibXML::Document.new(); my $elem = $doc.new-elem('foo'); my $attr = $doc.new-attr(:attr('e & f'));
$elem.push: $attr; say ~$elem; # <foo attr="e &amp; f"/>
mst jdv79: primarily, letting people experiment 20:23
I think 20:24
lizmat .tell itz what happened to szabgab's post on pl6anet.org ?
yoleaux lizmat: I'll pass your message to itz.
jdv79 i should have qualified that as "non-toyish" or production type usages.
cool
mst though one of the things I'd been pondering is (ab)using rakudo just for the grammar engine
psch No such method 'postcircumfix:<( )>' for invocant of type 'Method' 20:31
i have a feeling i'm not going about "write JavaHOW in Perl 6" the right way... :) 20:32
the good part is that that only seems to happen for methods added with .^add_method
dalek ecs: d327d32 | skids++ | S02-bits.pod:
Clarify that adverbial radix list form does not merely take decimal literals.
20:35
dalek ast: 243f874 | skids++ | S02-literals/radix.t:
Add test for radix literal using a list of expressions
20:36
dalek p-js: 0c3b93a | (Pawel Murias)++ | src/vm/js/ (2 files):
Pass test 76.

Implement ops for saving a capture and extracting positionals and invoking with it.
20:45
psch the confusing bit is, that «my $meth = $javaclass.^find_method($addedMethod); $meth($javaclass)» works... 20:47
vendethiel pmurias++ 20:54
FROGGS_ psch: strange when things work out :o) 20:56
psch FROGGS_: well, i'd still like to also call the method as literal behind the meth invocation dot... 20:58
FROGGS_ ahh, I see 20:59
psch: I guess you are calling .compose after .add_method? 21:00
(or .^compose for that matter) 21:01
psch FROGGS_: no, i'm not. i'd have to write it first too... 21:04
FROGGS_ psch: there is an composetype op if that helps 21:05
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:08
lizmat TimToady: glad to hear that! 21:25
lizmat is tired and gets some shuteye 21:28
dalek p-js: 69d1177 | (Pawel Murias)++ | src/vm/js/bin/run_tests:
Add passing test 76 to run_tests.
21:34
p-js: 826e11f | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Stub nqp::multicachefind and nqp::multicacheadd.
vendethiel pmurias: is this comment still relevant? 21:47
github.com/pmurias/nqp-js/blob/826...er.nqp#L14
pmurias vendethiel: I think so 21:53
dalek p-js: e045091 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Simplify quote_string as we are no longer on parrot. vendethiel++
22:03
TimToady m: say :{}.WHAT 22:19
camelia rakudo-moar e37eb0: OUTPUT«(Hash)␤»
TimToady actually, I think :{} is available 22:20
TimToady m: say :{ a => 42 } 22:20
camelia rakudo-moar e37eb0: OUTPUT«a => 42␤»
TimToady yes, it more or less ignores the : in term position
timotimo what curious and unexpected construct could we use it for? :) 22:22
TimToady that's a sekrit! 22:27
masak :) 22:29
masak .oO( Larry gets the sekrit colon )
FROGGS_ .oO( Colonel Sekrit ) 22:35
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:54
FROGGS_ *g* 22:57
skids I usually reserve freezing my fingers for matters more urgent than uneven tire wear, personally :-) 23:08
raydiak it becomes urgent at a certain point :) 23:09
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:10
at least the other two have a few millimeters of tread left and are snow tires 23:11
so maybe it'll do stuff again like stop, go, and turn without expert handling :) 23:12
raydiak just realized the irony of telling this story to someone named skids :) 23:13
wow my fingers don't want to stop typing emoticons today 23:14
skids Winter is fun fun powerslides! :-)
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:16
raydiak that's a bit much for me these days anyway though 23:17
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:19
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:22
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:26
TimToady testing a version that treats :{} as an object hash composer... 23:29
masak I took moritz++' advice and wrote the README of 007 as a story. here's the result: github.com/masak/007/blob/master/README.md 23:44
lue masak: "His calm, deep voice that cuts through the silence." seems like a superfluous "that" to me. 23:53
masak lue: fixed. lue++ 23:54
lue (still reading)
"\click**" methinks that \ wasn't meant to be there :) 23:56
geekosaur to me, "that" makes it a clause, not a complete sentence
masak lue: just found it. fixing.
geekosaur it's missing a verb and an object, since "that" turns "cuts through the silence" into an adjectival phrase 23:57
(where's the linguist when you need him :p )
masak geekosaur: I think it was a fossil from when that sentence was an adjectival phrase, or something.
lue That's what I was thinking :) .
masak lue: fixed, thanks.