»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:03 Mso150_g left
Augustus how do you add the current directory to the include path? 00:10
nm it's the usual -I sry 00:11
is there an easy way to have your pm file export all of its symbols when you use it? 00:17
00:18 BenGoldberg joined 00:25 espadrine_ left
Augustus is there a reason why I have to put "is export" on my grammar but not on my actions class? 00:29
00:35 Exodist left 00:37 exixt_ is now known as exixt 00:38 Exodist joined 00:45 Mouq joined, ClarusCogitatio left 00:50 kurahaupo left
peterete1 I can't imagine anyone was following along at home, but my supervisor has talked me out of my CPAN6 proposal, so I won't be working on that this year 00:52
Mouq Augustus: Depending on what you want, something like `sub EXPORT (|) { OUR:: }` may be what you want?
peterete1: Aww. why? 00:54
peterete1 I think he could see my heart wasn't in it, and it felt like a moving target considering the active and not-so-active work on it 00:55
00:55 peterete1 is now known as peteretep
Mouq peteretep: Yeah, I could see that as being the case. Do you have any idea what you're planning on instead? 00:57
peteretep I'll be writing a specialized document similarity engine and DB for job descriptions 00:58
Mouq Nice! 01:00
01:00 chenryn left
peteretep Just trying to pick between Go and Rust 01:02
01:03 Ugator left
bjz perturbation: What is your project? 01:04
woops - peteretep
Mouq I really like what Rust aspires to, though the strictness was tough for a newb (me) to write in
peteretep bjz: The specialized document similarity engine I was talking about 01:05
Mouq: I'm a big fan of HAskell, so I find it quite exciting
bjz apologises for butting in - he has a notification on
peteretep I am also on Team Mozilla, rather than Team Google, philosophically, which makes Rust more exciting 01:06
bjz peteretep: you would probably get more out of Rust then - the type system is much more similar to Haskell
peteretep bjz: That's the conclusion I am coming to
The "terrible syntax" looks no worse than Erlang or Perl 5 01:07
bjz heh
peteretep let me take that back. Erlang is HORRIBLE, but you do get over it
01:07 adu joined
peteretep You become mindful of it - you note the syntax is still horrible whenever yo uuse it, but you cease to get upset about it 01:07
bjz yeah I don't like the syntax either - it has got a great deal better in the last year, but it could be worse. it tends to recede into the background if the semantics are good enough 01:08
like Erlang
perturbation after mumps, everything looks clean... guess what 'f p=2,3:2 s q=1 x "f f=3:2 q:f*f>p!'q s q=p#f" w:q p,?$x\8+1*8' does? 01:09
01:09 KCL_ joined
perturbation one-liner for primes, formatted for 80-col terminal... nifty, but kinda terrible too.. 01:10
bjz Mouq: you have to treat it differently than a dynamic language where the interpeter is like the clay you mould. In a statically the compiler is a far more active participant in your work, and you are having a conversation with it to work towards figuring out what you actually meant to say.
peteretep perturbation: Nothing beats APL
bjz Mouq: And the rust compiler has much more to say about memory management than almost any other language out there, so it can be a little off-putting at first. 01:11
Augustus If I have a QAST object at runtime, is there a simple way to eval it? 01:12
bjz Mouq: either way isn't better or worse, but for stuff where you are working intimately with memory, you want a friend (ie. rustc) to be watching your back. :) anyway, 01:14
perturbation: your project sounds cool. we are very friendly over at irc.mozilla.org #rust - I don't want to blabber with off topic stuff here. 01:15
perturbation bjz: I think you mean peteretep again :) 01:16
bjz arrrrgh
peteretep :-)
bjz sorry
peteretep I think so too
peteretep needs to part some channels, and will join
Mouq bjz: :) I wasn't complaining, per se -- I simply never got into it. I think it's a super cool project, and I plan to use it at some point :) 01:17
bjz Mouq: no worries! as I say, we are trying hard to be a friendly community, so if you have trouble we would love to help. 01:20
Augustus what is the perl6 equivalent of eval? 01:27
BenGoldberg EVAL 01:28
Augustus ah ok all caps, thanks. Anybody know where I can find the EVAL implementation? 01:29
ugexe github.com/rakudo/rakudo/blob/b6b1...ol.pm#L204 01:30
01:31 immortal left
Augustus awesome thx 01:33
colomon FROGGS is probably in bed, but the smoke run came out much better second time around 01:37
01:38 dayangkun joined
[Coke] Did we lose dalek again? 01:41
01:50 dayangkun left 01:59 xinming_ joined 02:03 xinming left
BenGoldberg .seen dalex 02:06
yoleaux I haven't seen dalex around.
BenGoldberg .seen dalek
yoleaux I saw dalek 18 Nov 2014 06:54Z in #perl6: <dalek> rakudo/nom: review: github.com/rakudo/rakudo/commit/f2ffb9a384
02:11 jimmy_ joined, jimmy_ is now known as JimmyZ
[Coke] .time 02:12
02:19 adu left 02:27 adu joined, adu left 02:28 adu joined
Augustus currently, does nqp work as a slang? Can you mix and match nqp and Perl6 in the same file, or do you have to put all your nqp in a separate file? 02:29
also, if I just put NQP libs directory on the path, I can just use nqp libs directly right? 02:30
ugexe m: nqp::say('hello'); say 'world'; 02:34
camelia rakudo-moar 93c2b4: OUTPUT«world␤hello␤»
ugexe nqp: nqp::say('hello'); say 'world';
camelia nqp-moarvm: OUTPUT«Confused at line 2, near "say 'world"␤ at gen/moar/stage2/NQPHLL.nqp:485 (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:913 (/home/camelia/rakudo-inst-2/languages/nqp/lib/nqp.moarvm:comp_unit:872)␤ f…»
..nqp-jvm: OUTPUT«(signal ABRT)»
..nqp-parrot: OUTPUT«Confused at line 2, near "say 'world"␤current instr.: 'panic' pc 15673 (gen/parrot/stage2/NQPHLL.pir:5731) (gen/parrot/stage2/NQPHLL.nqp:425)␤»
02:35 rurban left
ugexe m: nqp::say('hello'); say 'world'; say 'X'; 02:37
camelia rakudo-moar 93c2b4: OUTPUT«world␤X␤hello␤»
02:37 raiph left
ugexe i thought i was answering your question but now im asking one myself 02:38
Augustus let me be more specific. I'm trying to create ASTs. Do I have to do that from pure nqp? I can put the QAST module in my path, but when I load it from perl6 it seems the symbols aren't exported. 02:40
When I load it from nqp, it works fine. 02:41
can I pass a parameter to the use statement to tell it to import all the symbols? 02:42
JimmyZ m: use QAST:from<nqp>; 02:44
camelia rakudo-moar 93c2b4: OUTPUT«===SORRY!===␤Do not know how to load code from nqp␤»
JimmyZ m: use QAST:from<NQP>; 02:45
camelia ( no output )
02:45 KCL joined, KCL_ left
Augustus JimmyZ: Thanks, that seems to work, at least no immediate errors pop. 02:46
Mouq Augustus: There's no need to put them in-path unless you wrote them 02:50
Augustus Mouq: I see now, I wasn't aware of the :from attribute to pull from the other language 02:52
02:55 telex left 02:56 telex joined 03:06 chenryn joined 03:12 kjs_ joined 03:17 zakharyas joined
Augustus when I pass a QAST object from perl6 code back into NQP I am getting "This type does not support positional operations" errors. Do I have to do something special for NQP objects to pass through my p6 code unscathed? 03:30
03:32 kjs_ left
Augustus also, if I use := in my p6 code rather than plain =, then when I pass the object back to NQP it doesn't recognize the object's class. Can anyone explain? 03:32
03:36 Mso150 joined
JimmyZ NQP doesn't support = 03:39
and NQP knowns nothing about Perl 6 03:40
You can't pass p6 object to nqp, methinks
Augustus i'm not trying to pass a p6 object to nqp, i'm tring to pass fetch an nqp object in p6 and pass it back to nqp 03:41
JimmyZ I don't know why you want to use nqp in perl6 thought
*though 03:42
Augustus i'm just trying to generate QAST and execute it without having to learn NQP
in general, we just be able to create grammars and actions in perl6 not just nqp 03:43
just ==> should
ugexe github.com/tony-o/perl6-slang-sql/...ng/SQL.pm6 03:44
its not *all* nqp
JimmyZ Augustus: Do you mean something like this? github.com/moritz/json/tree/master.../JSON/Tiny 03:45
Slang/SQL.pm6 is a different example
Augustus well right now for testing I'm trying to just manually create QAST and execute it 03:46
I'm doing my $comp_unit = QAST::CompUnit.new(...); etc
03:47 tinyblak_ left
Augustus and then getting the backend and trying to get it to compile and run that 03:47
03:47 tinyblak joined
Augustus while EVAL will happily take source code and run it, it seems oddly difficult to EVAL starting from QAST 03:48
JimmyZ I would suggest use NQP, since NQP is Not Quite Perl 6 ;) 03:49
Augustus I understand that may get me over my current hump but it obviously not correct 03:50
it is possible to pass objects back and forth with Java or C, so it must be possible to round trip objects with NQP 03:51
JimmyZ AFAIK, there is some reason why rakudo is not written in rakudo
03:53 adu left
ugexe have you looked at qast.t? 03:53
Augustus i don't know what a .t file even is, so no
ugexe github.com/perl6/nqp/blob/00b94e41.../01-qast.t
Augustus ah .t is a test file and it appears that the nqp compiler has a :from('ast') option 03:55
that may solve my problem without having to roundtrip an object
03:55 jack_rabbit left
Mouq Augustus: Are you trying to create a Slang or a new language? 03:57
i.e, are you just trying to a "simple" augementation of the Perl 6 grammar, or are you doing something else entirely? 03:58
Augustus right now I'm just testing QAST, what I do with later is secondary 03:59
So I'm trying to manually build up a QAST structure and then execute it
the test case ugexe showed me might get me where I need to go except now nqp::getcomp('nqp') is returning null 04:00
Mouq Augustus: Ah, yeah, I imagine that would be a pain in the butt
do nqp::getcomp('perl6') or whatever it is..
ugexe m: say nqp::getcomp('nqp'); 04:01
camelia rakudo-moar 93c2b4: OUTPUT«(Mu)␤»
Mouq m: say nqp::getcomp('perl6');
camelia rakudo-moar 93c2b4: OUTPUT«No such method 'gist' for invocant of type 'Perl6::Compiler'␤ in sub say at src/gen/m-CORE.setting:16539␤ in block <unit> at /tmp/jaNNTba0XW:1␤␤»
Mouq ^^
ugexe nqp: say(nqp::getcomp('nqp')); 04:02
camelia nqp-parrot: OUTPUT«NQP::Compiler<-1070294649291487057>␤»
..nqp-moarvm: OUTPUT«cannot stringify this␤ at gen/moar/stage2/NQPCORE.setting:682 (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPCORE.setting.moarvm:print:13)␤ from gen/moar/stage2/NQPCORE.setting:688 (/home/camelia/rakudo-inst-2/languages/nqp/lib/NQPCORE.setting.moarvm:sa…»
..nqp-jvm: OUTPUT«(signal ABRT)»
Mouq m: say nqp::getcomp('perl6').^name;
camelia rakudo-moar 93c2b4: OUTPUT«Perl6::Compiler␤»
Mouq nqp: my $c := nqp::getcomp('perl6'); say($c.HOW.name($c));
camelia nqp-parrot: OUTPUT«Can only use get_how on a SixModelObject␤current instr.: '<mainline>' pc 46 ((file unknown):41) (/tmp/tmpfile:1)␤»
..nqp-moarvm: OUTPUT«VMNull␤»
..nqp-jvm: OUTPUT«(signal ABRT)»
Mouq oop
nqp: my $c := nqp::getcomp('nqp'); say($c.HOW.name($c)); 04:03
camelia nqp-jvm: OUTPUT«(signal ABRT)»
..nqp-{moarvm,parrot}: OUTPUT«NQP::Compiler␤»
04:04 rmgk is now known as Guest55570, rmgk_ joined, Guest55570 left, rmgk_ is now known as rmgk
Augustus it looks like you can't get the nqp compiler from inside perl6 code 04:04
ugexe nqp: my $c := nqp::getcomp('QAST'); say($c.HOW.name($c));
camelia nqp-jvm: OUTPUT«(signal ABRT)»
..nqp-moarvm: OUTPUT«QAST::MASTCompiler␤»
..nqp-parrot: OUTPUT«QAST::Compiler␤»
Augustus i wonder if the perl6 compiler supports the :from('ast') command
04:06 kurahaupo joined
Mouq Augustus: I'm fairly certain it does. That's implemented in HLL::Compiler, which both NQP::Compiler and Perl6::Compiler inherit from 04:06
Augustus hmm, still getting the "type does not support positional operations" error
Mouq Can you gist/nopaste what you're doing? 04:07
Augustus sure. also I just changed the = back to := and now I get "Optimizer could not find UNIT" 04:08
Here's a gist: gist.github.com/anonymous/82bed5ca4d38288dbd1b 04:10
it's pretty simple
it does seem like when I switch everything to nqp it stops complaining 04:12
Mouq You're breaking assumptions the optimizer has about about Perl 6... getcomp('anything') probably isn't the way to go if you're just evaling random QAST::Ops, since they're agnostic to language... 04:13
Augustus i don't really want to
but when I tried going to the backend to execute directly it was giving me the other error from earlier 04:14
it won't recognize the [] notation
for accessing QAST child nodes
also there doesn't seem to be a way to get executable code from AST in a backend agnostic way 04:16
04:16 Mso150 left
Mouq m: use QAST:from<NQP>; say nqp::atpos(QAST::Op.new( :op<call>, :name<say>, QAST::IVal.new(42) ), 0).^name 04:17
camelia rakudo-moar 93c2b4: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤ in any new at gen/moar/stage2/QASTNode.nqp:275␤ in block <unit> at /tmp/ukBqIutY5r:1␤␤»
Mouq m: use QAST:from<NQP>; say nqp::atpos(QAST::Op.new( :op<call>, :name<say>, QAST::IVal.new(:value(42)) ), 0).^name
camelia rakudo-moar 93c2b4: OUTPUT«QAST::IVal␤»
Mouq That's the best we have at the moment
Augustus I'm not trying to access the children, the compiler is 04:18
and the compiler is written in NQP trying to access children of an NQP object 04:19
but somehow by passing it through a p6 variable in between, this breaks
how do you tell p6 to treat an object as a foreign, opaque object and not mess with it?
04:19 kurahaupo left
Augustus i'm guessing it's perl6-ifying the object when I assign to a variable in p6 code 04:20
which breaks it when I pass it back to nqp code
ugexe maybe you mean unboxing? 04:25
github.com/perl6/nqp/blob/master/d...down#unbox 04:26
04:27 kurahaupo joined
Augustus hmm that only applies to integers, floats and strings 04:27
i don't know what kind of a thing an NQP object is
Mouq Augustus: Can I see what you're talking about? 04:30
Mouq is very confused
04:31 kaare_ joined 04:34 kurahaupo left
Mouq Well, maybe some other time :P 04:34
04:34 Mouq left
Augustus Sorry I missed you Mouq. If anybody else is willing to take a look, I have made another gist. It runs fine if you use the nqp runtime but errors out if you use perl6 04:38
gist.github.com/anonymous/5c9be05d7e2ac123ccb0
in order to run from nqp you of course have to remove the :from<NQP> on the use QAST statement 04:39
I think this should illustrate the problem in a very simple way
04:40 kurahaupo joined
ugexe nqp: my $x := CompUnit.new; $x[0]; $x[0][0] 04:44
camelia nqp-jvm: OUTPUT«(signal ABRT)»
( no output )
ugexe m: my $x := CompUnit.new; $x[0]; $x[0][0] 04:45
camelia rakudo-moar 93c2b4: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in method new at src/gen/m-CORE.setting:23663␤ in block <unit> at /tmp/jI0slltWDA:1␤␤»
Augustus maybe try with a different node than comp unit which requires children 04:46
or actually pass the required params
but obviously with no children [0] will probably fail, but perhaps a different error
ugexe m: my $x = 1; say $x[0]; 04:49
camelia rakudo-moar 93c2b4: OUTPUT«1␤»
Augustus m: use QAST:from<NQP>; my $x := QAST.Block.new(QAST::IVal.new( :value(42) )); say $x[0]; 04:50
camelia rakudo-moar 93c2b4: OUTPUT«===SORRY!===␤Object of type QAST in QAST::WVal, but not in SC␤»
04:51 Mouq joined
Mouq o/, sorry, but I had to run off real quick 04:51
Augustus: like I said, you have to use nqp::atpos 04:52
It's not a matter of the object being p6-ified as it is that [] translates into something different in NQP and Perl 6
Augustus well there must be a way to force nqp code to use nqp semantics 04:53
Mouq However, if you want to get around that, (and I don't guarantee that this won't break things), you can try defining `multi postcircumfix:<[ ]> (Mu \k, $v) { nqp::atpos(k, $v) }`
Augustus it's obviously a problem if nqp code breaks when called from perl6 code 04:54
Mouq NQP wasn't designed to be used in Perl 6 code :P 04:56
ugexe you can use nqp::atpos in perl6 04:57
Augustus ugexe: the objective is for nqp code to preserve nqp semantics regardless of whether it is invoked by a perl6 runtime or an nqp runtime 04:58
in other words we want semantics baked in at compile time
having the runtime choose between atpos and operator<[]> means that code compiled with nqp is still breaking when invoked by the perl6 runtime 04:59
05:00 dj_goku joined, BenGoldberg left
Augustus either nqp compiled code should work when called from perl6 100% or it should be prohibited 05:01
gtodd is there an Inline::NQP ? :-) 05:02
05:03 chenryn left
Mouq In Perl 6, calling {foo bar}[baz] is always going to call &postcircumfix:<[ ]>. We don't really have the semantics in place for dealing with NQP objects because NQP is a compiler-detail -- it's my understanding that NQP is allowed for those who wish to muck about with internals within Perl 6, but it is never the ideal in Perl 6 code itself 05:03
05:04 tinyblak_ joined
Mouq In this case, "slangs," and ast-building still need a massive overhaul that's expected to have something to do with the macro one. You're right, a user shouldn't have to do contortions to create an AST or Slang, but there isn't really a high-level way around it implemented right now, unfortunately 05:06
Augustus again, I just want to reiterate that we are talking about the perl6 runtime messing up precompiled nqp code compiled by the nqp compiler
Mouq Sorry, I'm a very rant-y mood
05:06 tinyblak left
Augustus no please, rant away, I just want to make sure you understand the issue at hand 05:07
everybody keeps thinking I want to mess with NQP internals from p6 05:08
I do not
the point here is that the compiler should dictate semantics that are stable regardless of runtime 05:09
just like it doesn't matter if you run on MOAR or JVM
once you compile your NQP code it should have stable semantics
Mouq It does
Augustus that's the point it doesn't
Mouq The object itself doesn't change
Well
okay
Augustus invoking nqp code from perl6 is breaking
because nqp is not getting the atpos behavior 05:10
Mouq The syntax changes
Because you're writing in a different language
Augustus PRECOMPILED CODE!!!!
Mouq so?
Augustus once I compile C code its semantics don't change if I invoke it from C++, java, python, or anything 05:11
Mouq The code from NQP isn't changing.
Augustus exactly
but the perl6 runtime is messing up the nqp runtime 05:12
ugexe are you saying nqp::atpos does not work as expected in p6 runtime? or something else specifically
Augustus well nqp's operator<[]> does not work from the p6 runtime 05:13
the nqp code is not calling atpos directly
Mouq How? What I get is that it's messing it up because you expect [] to automatically mean nqp::atpos even though it means &postcircumfix<[ ]>. Just like `:=` in NQP and Perl 6, they share the same symbols but mean different things
Augustus but from what you guys are saying that's going on behind the scenes 05:14
Mouq Currently, we don't have a candidate for &postcircumfix:<[ ]> defined for NQP objects, however I think it would be very convenient if we did. `multi postcircumfix:<[ ]> (Mu \k, $v) { nqp::atpos(k, $v) }` fixes that, although it might break other things so I'd be weary using it. 05:16
Augustus let me be more specific. I'm not sure how you guys link to source code but take a look at nqp/gen/moar/stage2/QAST.nqp line 4433
if +@($cu) != 1 || !nqp::istype($cu[0], QAST::Block) { 05:17
where $cu is a QAST::CompUnit
05:17 tinyblak_ left
Augustus the $cu[0] fails when you are using the p6 runtime 05:17
05:18 tinyblak joined
TimToady yes, because .[] is a different operator in a different language 05:18
it's not a method
Augustus yes so what I'm saying is the p6 runtime shouldn't stomp all over the nqp runtime
TimToady it's not the runtime, it's the language definition, so it's lexically determined, not determined by runtime dispatch 05:19
Augustus it is the runtime
it works fine when using the nqp runtime
TimToady it works fine when using the nqp *languge*
*uage 05:20
Augustus no i mean when I use perl6-m it breaks
and when I use nqp-m it works
TimToady because now you're using a different language
which dispatches to a different place
Mouq If you took an object from Perl 6 into C and tried to do foo[123] on it, it would fail
TimToady same deal
Augustus right so you're saying that the p6 runtime is stomping on the nqp runtime
TimToady no 05:21
that's like saying my German is stomping on my French
Augustus Mouq: but if you took a C pointer into perl and passed it back to to C code it would not break
because perl doesn't stomp on the C runtime
of course in C there's no dynamic dispatch but you understand
Mouq Augustus: And if you take a NQP object and pass it back to NQP code it does not break
Augustus indeed it does 05:22
TimToady but you aren't passing $cu back to nqp
Augustus that is the whole point of this conversation
TimToady so the argument is oot
*moot
05:22 kaare_ left
Augustus no, I am writing my $x = QAST.CompUnit.new(...); then passing $x into precompiled code written in NQP 05:22
TimToady you're passing it to the P6 .[] operator and expecting it to make sense
Augustus not unless the nqp compiler called the p6 .[] 05:23
the code was compiled by the nqp compiler
TimToady nqp knows nothing about p6
Augustus it is an nqp file after all
I think you guys are having a very difficult time understanding what's going on 05:24
Mouq I really don't
Augustus there is an nqp file
nqp/gen/moar/stage2/QAST.nqp
it has been compiled by the nqp compiler
it now exists as precompiled bytecode
hmmm wait a second 05:25
when I use a module it's loading the precompiled bytecode right?
the problem may be the use ...:from<NQP>
05:26 chenryn joined
Augustus when you use ...:from<NQP> is it recompiling it with p6 semantics? 05:26
i am taking it as a given that using a module is using the precompiled version just like in Java
Mouq Regardless, that module is parsed and executed correctly. The error doesn't come from the module. 05:27
Augustus well that is where the error occurs
TimToady how are you creating the $cu object on the p6 end?
Augustus there's only 1 way
QAST::CompUnit.new
TimToady how are you adding bits to it?
Augustus Just passing stuff to new 05:28
Mouq (from earlier: gist.github.com/ano​nymous/5c9be05d7e2ac123ccb0 )
Oi, bad link. gist.github.com/anonymous/5c9be05d7e2ac123ccb0 05:29
Augustus well and you need the earlier one
in that example I am indeed using p6 .[]
i was trying to simplify for you
gist.github.com/anonymous/82bed5ca4d38288dbd1b 05:30
Mouq That one fails for a completely different reason though, I though. That one fails because you're constructing an AST tree the Perl 6 optimizer doesn't see as valid and saying it comes from Perl 6... 05:31
Augustus hmm and that's still not a good example because it runs into the optimizer error, which is a different problem
Mouq *I thought
Augustus yes
TimToady going the other way, it would be really easy to call P6's comma operator by accident, which is going to make a P6 list or parcel rather than an nqp::list, which would prevent subscripting in nqp 05:33
Augustus Ok, one more time, this demonstrates the original error I had 05:34
gist.github.com/anonymous/8f471e531cb4b5f4d05a
05:35 kurahaupo left
Augustus so you're suggesting that passing parameters from p6 to nqp is tricky in some way? 05:35
this could make sense, if nqp can't unpack the parameters then everything will break 05:36
TimToady it's also possible you're getting your nqp objects wrapped in containers by using = rather than :=
nqp won't know what to do with scalar containers
(P6 automatically derefs them for you most of the time) 05:37
Augustus well if I use := instead (I tried this) then NQP doesn't recognize the object as being a CompUnit at all
Mouq would like to note he's been frustrated and stressed recently, and it likely a tad more argumentative than he should be
Augustus :)
or well I guess :(
TimToady NO YOU're NOT!!!
:)
Augustus what is the sympathy emoticon lol
when I use := I get "Top-level MAST node must be a CompUnit" 05:38
TimToady hugme: hug Mouq and Augustus
hugme hugs Mouq and
TimToady hugme: hug Mouq and Augustus
hugme hugs Mouq and Augustus
TimToady there we go
Augustus nice
hugme: Mouq
hmm did I do it wrong?
TimToady this sentence no verb
Augustus hugme: hug Mouq 05:39
hugme hugs Mouq
Augustus there we go lol
TimToady you have to use an unbreakable space to get more than one word hugged though 05:40
Augustus lol
TimToady well, perhaps $comp_unit needs to be = but $qast needs to be raw 05:41
Augustus hmm I'm guessing then I'm mistaken thinking that the = sign worked better
TimToady or something like that
Augustus i like your idea of messing up the parameter passing
Mouq :) thanks. It seems pretty strange that you'd be using .mast: on a QAST...
TimToady nqp and qast are just very, very picky, without being terribly informative
Augustus .mast converts qast to mast 05:42
i would like a backend agnostic way of doing that of course
TimToady they were originally just a tool for the original implementors to get rakudo implemented in, not something that has been productized at all
Augustus but from the compiler stages theres no real way to tell where to jump in
and I think people get that, I'm happy to dig through source :)
TimToady that's just how nqp is currently, somewhere on the other side of the bleeding edge 05:43
it's just a matter of how anemic you're willing to end up :)
Augustus for right now I'm fine hard coding for MOAR because that's a side issue
if i can just pass ASTs in and successfully compile them I'll be happy 05:44
TimToady eventually we'd like to have a better higher level AST interface, but it's just not there yet
well, it's possible, but it's just a complete pain in the butt to get right currently 05:45
Augustus hmm, there's probably a much fafster way to get to the bottom of this, but I've never used the p6 debugger
it should be possible to just trace in to the nqp code
and see whether the parameters got passed correcty right?
05:46 kaare_ joined
TimToady doesn't know how well the debugger does with nqp, having seen only p6-level demos 05:46
05:46 kurahaupo joined
TimToady but both languages are based on 6model, which helps 05:46
05:46 kurahaupo left
Augustus cuz otherwise I'd have to modify and recompile nqp which seems a dubious undertaking 05:47
TimToady what you don't have in nqp is a lot of introspective methods directly accessible
so most of the reflection must be done through 6model 05:48
Augustus is there anything I can do to be extra, extra careful that my parameters are being passed in the appropriate nqp format?
is there any way to eliminate that as a possible source of the problem?
like create an nqp parcel by hand or something 05:49
TimToady is not an expert on those bits of it
Augustus hmm d'oh I should just create a simple package that takes an AST 05:50
i don't need to modify the compiler just make my own package
what's the command line switch to output a compiled module?
05:51 kjs_ joined
TimToady I dunno, my current make is spitting out too much debug info, and the command scrolled away... 05:51
but however the standard make does it 05:52
for like Test.pm or so
05:53 kurahaupo joined, kurahaupo left
Mouq Augustus: The problem, after you either bind to $comp_unit or use \comp_unit, is that $mast needs to be either bound to or be \mast 05:55
05:57 kjs_ left
Augustus maybe i didn't understand correctly, i tried changing my $mast = $backend.mast($comp_unit); to my $mast := $backend.mast($comp_unit); and I also tried replacing $mast with \mast 05:58
neither made a difference 05:59
oh but I need to do the same with comp_unit you're suggesting
hmm now I'm just getting "Cannot invoke comp unit object" when I try and run the compiled code 06:01
Mouq Because it's not a code object, so you can't just () it 06:02
06:02 smls joined
Augustus the problem apparently that the compiling function is just passing back the comp unit rather than the compiled code 06:03
I was basing this off of how EVAL works
maybe I do need to invoke the moar stage even though it appeared to be a non-op 06:04
no difference 06:05
Mouq Oh, that's ... curious 06:06
Try $backend.compunit_mainline($compiled)() 06:07
That's the missing peice
piece?
06:08 kjs_ joined
smls good morning perl 6 06:09
Augustus well no errors!
now i just have to change the ast to actually print hello world or whatever
to see that it actually works
smls I know I can convert a decimal number to base 16 using «.base(16)» or «.fmt("%02x")», but how can I do the reverse? 06:11
...i.e. get the decimal representation *from* a base-16 number that is stored as a string
Mouq :16<foo>
06:12 Mouq left
smls thanks! 06:13
06:14 chenryn left
moritz \o 06:14
or :16($variable)
smls m: <00 aa ff>.map({:16($_)}).say 06:16
camelia rakudo-moar 93c2b4: OUTPUT«0 170 255␤»
smls ^^ the bracket density is getting a little high there for my taste 06:17
moritz m: say :16(*) 06:18
camelia rakudo-moar 93c2b4: OUTPUT«Cannot call 'UNBASE'; none of these signatures match:␤:(Int:D $base, Cool:D $num)␤:(Int:D $base, Str:D $str)␤ in block <unit> at /tmp/uGSpL2tjpR:1␤␤»
smls can the :16() construct be hypere'd like a method call to avoid the map?
06:18 anaeem1 joined
moritz smls: I don't think so 06:18
smls: but we could think about giving it list input in the first place
m: say :16( <00 aa ff> ) 06:19
camelia rakudo-moar 93c2b4: OUTPUT«You have confused the number 00 aa ff with the textual representation "00 aa ff";␤if you wanted to render the number in the given base, use $number.base($radix)␤ in block <unit> at /tmp/w80JIAa6hT:1␤␤»
Augustus ok, finally, it does appear to be working! So it was an issue with = vs := 06:21
You have to be meticulous to use := everywhere. I guess earlier I did something else wrong and convinced myself to go with = 06:22
JimmyZ moritz: irclog.perlgeek.de/perl6/2014-11-18#i_9680184 # in case you missed it 06:24
moritz JimmyZ: I didn't miss it, thanks 06:25
JimmyZ: I'm just not thrilled to learn two technologies :-) 06:26
06:26 tinyblak left, chenryn joined, smls left
JimmyZ :) 06:26
Augustus ok new question. I can :op('say') hello world, but it breaks if I try :op('call'), :name('&say') it breaks 06:28
06:28 smls joined
JimmyZ I can help build kvm virtual machine, but the network between host and guest sometimes misses after the host reboot 06:28
and needs a shell or something to re-create the network 06:29
moritz Augustus: you have to do a lookup
Augustus: so :op<call>, QAST::Var.new(:name<&say>)
possibly with a scope too, let me look that up 06:30
yes, the QAST::Var needs a :scope<lexical> too
Augustus ok let me try that 06:31
06:31 kurahaupo1 left
Augustus hmm that's still not working, can you see what I'm doing wrong here: 06:34
my $qast := QAST::Block.new(QAST::Op.new( :op<call>, QAST::Var.new(:name<&say>, :scope<lexical>), QAST::SVal.new(:value('Hello World'))));
moritz Augustus: what error do you get? 06:35
06:35 anaeem1 left
Augustus it accepts that but when I run "cannot invoke null object" 06:35
so the QAST::Block constructs ok but fails during compilation to byte code I guess
with no indication of what failed 06:36
06:36 anaeem1 joined
moritz presumably the QAST::Var returned a null 06:36
Augustus: I haven't backlogged yet; where is your code? is it somewhere in rakudo? 06:37
Augustus ok here's one that essentially works 06:38
gist.github.com/anonymous/c77f22162dda98efc968
the previous stuff all had other problems 06:39
ugexe nqp: my $qast := QAST::Block.new(QAST::Op.new( :op<call>,:name<&say>,QAST::SVal.new(:value('Hello World')))); 06:42
camelia ( no output )
..nqp-jvm: OUTPUT«(signal ABRT)»
Augustus oh and if you switch the op to say and get rid of name, it does in fact print out Hello World
so the other parts do seem to work 06:43
moritz Augustus: what I don't see in this code is anything that connects it the setting, in which &say is defined 06:44
or the current scope, for that matter
which would explain why the QAST::Var lookup fails
whereas ops are available everywhere 06:45
Augustus well say is a global function to it is essentially available everywhere, right? 06:47
or do I have to import it 06:48
because you're right I haven't set up any kind of scope
and obviously upon further reflection it would make no sense 06:49
since other languages don't have a global say function
and since I'm not really looking to try and import a bunch of p6 stuff (trying to keep it simple) 06:50
I should stick to built in ops and functions I actually write
a better test then would be for me to make my own say function that invokes the say op 06:51
and see if I can call that
Ok thanks for all your help everyone, it's late here so I'm gonna call it a night 06:52
you've all been super helpful! :)
TimToady 'night
06:53 Augustus left
moritz Augustus: built-ins are not global in Perl 6 06:53
good night :-)
smls S19:159 say that «-i» (for one-liners that want to do in-place file editing) is still under "review" 06:54
synopsebot Link: perlcabal.org/syn/S19.html#line_159
smls What's athe argument against it?
I would find it useful... :)
TimToady maybe the kind of review it needs is someone trying to implement it and seeing what happens :) 06:56
smls Hm. Would that be junior job material? 06:57
On a similar note, while trying to further golf down some of the one-liners at github.com/sillymoose/Perl6-One-Liners, 06:59
it struck me that it would be cool to have a command-line switch that flattens the result of the «-e» expression and prints out the elements one per line
(or however the shell in question usually represents lists; i.e. possibly a native list in Powershell) 07:00
TimToady so a .say for ... basically 07:01
smls i.e. basically wrap the expression in «print "$_\n" for do { ... }»
yeah
07:02 Util_ is now known as Util
smls maybe «-l» since the P5 meaning of the switch has not been carried over 07:02
perl6 -le '2, 4, ... 100' # print even numbers up to 100
short and sweet :) 07:03
JimmyZ m: say (2, 6, 7 ... 100) 07:05
camelia rakudo-moar 93c2b4: OUTPUT«===SORRY!===␤Cannot assign to a readonly variable or a value␤»
smls because working with 1-element-per-line lists is such a common thing in the shell, that the «.say for ( ... )» or «.Str.say for ( ... )» feels like boilerplate 07:06
07:07 kaleem joined
smls JimmyZ: Hm, locally I get the more sensible error message "Unable to deduce arithmetic or geometric sequence from 2,6,7" 07:10
JimmyZ locally I get the same error message ' 07:12
Cannot assign to a readonly variable or a value' 07:13
07:15 perturbation left
TimToady so do I 07:16
looks like it's failing to produce the error message somehjow 07:19
m: say (1,2,42 ... )
camelia rakudo-moar 93c2b4: OUTPUT«===SORRY!=== Error while compiling /tmp/g948ClqJR8␤Bogus statement␤at /tmp/g948ClqJR8:1␤------> say (1,2,42 ... ⏏)␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix…»
TimToady m: say (1,2,42 ... *)
camelia rakudo-moar 93c2b4: OUTPUT«===SORRY!===␤Cannot assign to a readonly variable or a value␤»
TimToady m: say (1,2,4 ... *) 07:20
camelia rakudo-moar 93c2b4: OUTPUT«1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736…»
07:21 kurahaupo joined, anaeem___ joined
TimToady m: say (1,2,3 ... *) 07:21
camelia rakudo-moar 93c2b4: OUTPUT«1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 8…»
TimToady m: sink (1,2,3 ... *) 07:22
camelia ( no output )
07:23 anaeem1 left
TimToady m: sink (1,2,33 ... *) 07:23
camelia ( no output )
TimToady m: eager (1,2,33 ... *)
camelia ( no output )
07:23 JimmyZ left 07:24 JimmyZ joined 07:27 dj_goku left 07:30 dj_goku joined, dj_goku left, dj_goku joined
smls TimToady: Another idea: Change «-p» to print the result of the last statement rather than $_, but print the original line when that result is Nil 07:32
07:32 jluis joined
smls It might be a better fit for the more 'functional' way of doing things in P6 07:32
things like «perl6 -pe 's:g/foo/far' file.txt» would still work the same 07:33
but we'd no longer have to go through contortions to to mutate $_ in cases like «perl6 -pe '$_ = .uc if /foo/' example.txt» 07:34
07:36 espadrine_ joined 07:50 FROGGS joined
moritz .=uc if /foo/ doesn't look too bad to me 07:53
m: $_ = 'ab'; .=uc; .say
camelia rakudo-moar 93c2b4: OUTPUT«AB␤»
07:56 Isp-sec joined 07:57 jluis left
smls moritz: Well it may only be one character longer, but takes me two or three times as long to write due to having to stop and think where the dot goes 08:01
it adds an extra level of complexity 08:02
the current behavior made sense in P5 where things like s/// could only be used for mutating and not functionally 08:03
but in P6, functional expressions are not only possible for pretty much everything, but also feel more natural and elegant
s/feel/often feel/
moritz smls: that's a good point
smls: but I wonder if return value OR $_ might be a bit too magical 08:04
08:04 jfredett left
smls I think it would look quite nice in practice 08:13
«cat input.txt | perl6 -pe '.uc'»
«cat input.txt | perl6 -pe '.uc if /foo/'»
moritz smls: how would one filter out lines with -pe then? 08:15
smls 'next'
moritz fairy nuff
smls or use -ne with manual say
FROGGS next does already work, right? 08:16
smls FROGGS: yes 08:17
moritz $ echo -e "a\nb" |perl6-m -pe 'next if /a/' 08:18
b
08:18 anaeem___ left
FROGGS proper compiler design++ 08:18
08:18 anaeem1 joined 08:19 anaeem1 left, darutoko joined, anaeem1 joined 08:23 Mso150 joined 08:28 brrt joined
brrt \o 08:28
i wanted to point out that my static perl6 thingy is slowly moving ahead
moritz \o/ 08:29
08:29 virtualsue joined
smls static perl6 thingy? 08:31
brrt :-) i can use it to statically embed perl6.moarvm yet
yes
basically, you know how perl6 (on moar) is just a moarvm binary coupled with a runner script?
that runner script is annoying
and frankly, having perl6 depend on consistent structure of 3 library directories isn't ideal, either 08:32
08:32 anaeem___ joined
smls so you're putting it all in a single binary? 08:33
brrt trying to
i'm not sure if i'm correct in doing so
whether it makes sense.. i'm doubting that now 08:34
08:34 anaeem1 left
brrt especially as libmoar.so is dynamically linked.. hmm 08:35
08:35 pdcawley joined
JimmyZ you can build static moar.exe though 08:35
brrt probably, but more importantly i'd need a static libmoar :-) 08:36
JimmyZ how does parrot do that? 08:37
FROGGS pbc2exe? I guess this will still link against the libparrot.so
ldd /home/froggs/dev/nqp/install/bin/perl6-p 08:38
linux-vdso.so.1 => (0x00007fff65ffe000)
libparrot.so.6.9.0 => /home/froggs/dev/nqp/install/lib/libparrot.so.6.9.0 (0x00007f2643b90000)
[...]
brrt making a static libmoar should be only a bit of work... but still 08:39
and i'd need to know which .moarvm files are actually needed by perl6 08:40
08:40 bjz left, bjz_ joined
JimmyZ wonders why we can't steal the idea from parrot :) 08:40
moritz ALL OF THEM
JimmyZ: we can, but parrot doesn't generate static, fully-contained executables (afaict) 08:41
JimmyZ oh, that's right
brrt so, cause ambition
moritz JimmyZ: they still load the ops DLL/.so
brrt would argue that since at build time we still have the .o from them, we can do that ahead-of-time too 08:42
08:42 kurahaupo left 08:46 kjs_ left 08:49 grondilu joined
FROGGS m: say EXPORT::<DEFAULT>.WHO 08:49
camelia rakudo-moar 93c2b4: OUTPUT«␤»
08:52 molaf_ joined 08:53 rindolf joined 08:56 molaf__ left
FROGGS m: sub a is export { "a" }; say &EXPORT::ALL::a ~~ Callable 08:57
camelia rakudo-moar 93c2b4: OUTPUT«True␤»
FROGGS m: sub a is export { "a" }; say &EXPORT::ALL:: 08:58
camelia rakudo-moar 93c2b4: OUTPUT«(Any)␤»
FROGGS m: sub a is export { "a" }; say EXPORT::ALL::
camelia rakudo-moar 93c2b4: OUTPUT«===SORRY!===␤Object of type ALL in QAST::WVal, but not in SC␤»
09:02 pdcawley left 09:08 exixt is now known as exixt_, pdcawley joined 09:09 exixt_ is now known as exixt 09:10 espadrine_ left 09:14 abraxxa joined
timotimo i seem to be having a lot of trouble backlogging ... the backlogs keep piling up and i can't get terribly much read 09:15
09:18 ptc_p6 joined
smls maybe perl6/rakudo as a project has grown beyond the size where IRC can efficiently be used as the main communication channel 09:20
in fact I was surprised that it does; most other mid-sized open-source projects tend to use mailing lists
09:23 ptc_p6 left 09:24 ptc_p6 joined, zakharyas left
lizmat Public Service Announcement: tomorrow I will be doing the 2014.11 release of Rakudo 09:26
virtualsue \o/ 09:27
09:28 rurban joined
lizmat I will be naming the release "Helsinki" in honour of the Nordic Perl Workshop (1st in Helsinki ever, afaik) 09:28
JimmyZ What about the release of MoarVM :)
lizmat well, that would be up to jnthn or FROGGS or timotimo perhaps?
09:28 zakharyas joined
lizmat today I will be de-commuting most of the day 09:29
09:29 Isp-sec left
osfameron lizmat: are you both in Helsinki? 09:29
lizmat no, in Copenhagen at the moment 09:30
osfameron really wanted to go to NPW this year :-( (will probably make 2015 Oslo)
brrt \o/
osfameron ah, still nice
brrt npw = nordic perl workshop? hadn't really imagined that
oh hopefully we'll have a static perl6 by christmas then
for the 2014.12 release :-) 09:31
lizmat osfameron: yes, we went to the Tivoli Gardens yesterday evening
brrt: that would be nice!
brrt: yes, Nordic Perl workshop
09:31 dakkar joined
woolfy brrt: it's not confusing at all: NPW = Nordic Perl Workshop, NLPW = Netherlands Perl Workshop 09:31
brrt and LPW? 09:32
osfameron London
woolfy London
:-)
brrt ah
osfameron hugs woolfy
brrt logic
tadzik logic perl workshop
woolfy hugs osfameron
osfameron considers Nordic London Perl Workshop
brrt is hugely excited for perl6-in-2015 :-D
lizmat DPW = Dutch Perl Workshop, or Deutscher Perl Workshop ?
brrt is not alone :-)
brrt i think it should be deutscher
woolfy PPW = Pittsburgh Perl Workshop, PLPW = Polish Perl Workshop, PTPW = Portuguese Perl Workshop 09:33
brrt although that isn't actually consistent with the 'workshop' part
woolfy GPW = German Perl Workshop
09:33 kurahaupo joined, Mso150 left
woolfy We've got several t-shirts with enormous characters GPW for the workshop! 09:33
osfameron should organise a Nordic London Perl Workshop and not call it NLPW! 09:34
brrt that settles it
osfameron the Scandiwegian Perl Workshop = SPW 09:36
FROGGS lizmat: I can only prepare the release, but jnthn has to upload it
osfameron me and ilmari can meet and talk in Finnish (I'd have to give a very short talk)
lizmat I guess jnthn will be done $working for the day in a few hours...
I guess we only picked up 1 important word in Finnish: Alco 09:37
(or was it Alko?)
osfameron Alko is the beer shop
lizmat alko, yes, the finnish version of the swedish systembolaget 09:38
osfameron: more like wine / liquor / whisky, at least the Alko we've been to :-)
osfameron yes, true, "alcoholic beverages" by metonymy :D 09:39
09:40 sqirrel_ joined
lizmat brrt: last year, some visitors thought the NLPW was the Neuro-Linguistic Programming Workshop 09:40
FROGGS and then they came and wiped your branes? 09:41
lizmat no, the *expected* to have their branes wiped :-)
*they
brrt seriously.. wow
virtualsue they hadn't actually signed up, had they?
lizmat no, they were accidental passers by at the University of Humanistics, where the NLPW was held 09:42
virtualsue that's ok then
lizmat :-) 09:43
09:44 zakharyas left 09:45 zakharyas joined 09:47 woolfy left
lizmat decommute& 09:48
09:48 lizmat left 09:53 JimmyZ left 09:55 exixt is now known as exixt_, JimmyZ joined 09:56 KCL_ joined 09:57 pecastro joined 09:58 espadrine_ joined, KCL left 09:59 virtualsue left 10:14 fhelmberger joined 10:17 zakharyas left 10:21 pdcawley left 10:27 pdcawley joined 10:28 bjz_ left 10:29 bjz joined
masak evening, #perl6 10:31
yoleaux 17 Nov 2014 14:16Z <Ven> masak: typo on your last blog post "Macro paramters/"
masak vendethiel: fixed, thanks. 10:33
10:35 JimmyZ left
masak 3 replacements s/\.slurp/\.slurp-rest/ in my blogging software. 10:35
lizmat++ # most probably
10:38 kaleem left 10:42 lucas___ joined
lucas___ I'm sorry to be picky about it, but last specs commit accidentally removes some line breaks from S17. 10:43
10:45 lucas___ left 10:47 virtualsue joined
masak I can revert it, but that doesn't fix the fact that blame won't give much info on that file next time. 10:50
10:50 kaleem joined 10:52 bjz left 10:53 Ugator joined 10:56 kaleem left 10:57 kaleem joined 11:02 eLtJgTM joined 11:05 regreg joined 11:07 rindolf left 11:08 rindolf joined 11:12 eLtJgTM left 11:15 eLtJgTM joined 11:19 eLtJgTM left, sqirrel_ left 11:22 jluis joined 11:26 pdcawley left 11:29 sqirrel_ joined 11:32 prevost joined 11:41 chenryn left, vendethiel left 11:43 telex left, exixt_ is now known as exixt 11:44 vendethiel joined, telex joined 11:45 exixt is now known as exixt_, chenryn joined 11:50 bjz joined 11:53 sunnavy left 11:54 Woodi left 11:55 Woodi joined 12:04 sqirrel_ left 12:12 chenryn left 12:19 kurahaupo left 12:23 darutoko left, darutoko joined 12:40 clkao_ is now known as clkao 13:08 PZt joined 13:12 zakharyas joined 13:16 guru joined, guru is now known as Guest58052 13:17 Guest58052 is now known as ajr_ 13:21 firefish5000 joined
daxim planetsix.perlfoundation.org/ # daed? 13:28
masak seems so. I just get domain spam here. 13:29
13:32 vendethiel left 13:33 vendethiel joined
moritz daxim: pl6anet.org/ has the current feed 13:36
daxim cool. who's the hostmaster or webmaster for perlfoundation.org? needs a redirect 13:37
nwc10 daxim: strictly, needs its redirect updating 13:38
13:39 chenryn joined
nwc10 www.perlfoundation.org/contact_us says Casey West - webmaster(at)perlfoundation.org 13:40
13:40 jluis left
nwc10 but given that the CNAME for planetsix.perlfoundation.org points to develooper.org 13:40
er
develooper.com
I'd suggest this contact:
Admin Email: [email@hidden.address]
ie ask Ask
moritz but the destination admin can't do much about the wrong redirect, can he? 13:43
nwc10 I am inferring that the redirect is in the varnish config on a machine that Ask adminsters 13:44
13:45 FROGGS left 13:49 prevost left 13:59 kaare_ left
masak .oO( Perl 6 for Morpheusphytes ) 14:00
arnsholt Any 6model experts around? Method lookups can be customised in a HOW via find_method, but is there something similar to customise attribute handling?
14:01 virtualsue left
arnsholt (Because everything in Python is an attribute. Methods are just magical subs created on attribute lookup in a class object) 14:01
jnthn Attribute access is all about representation. 14:02
yoleaux 18 Nov 2014 23:36Z <bronco_creek> jnthn: When I try to use panda to install JSON::Path with my 2014/9 rakudo* on moarvm it fails a test.
jnthn For a Python object, isnt it really just a hash?
*isn't
arnsholt Yeah, basically
But there's a bit of magic on top
14:03 jfredett joined
jnthn So probably you want the meta-object to use the representation that provides a hash-based attribute storage 14:03
arnsholt Yeah, I'm starting to realize that now
jnthn You'll need to do the clever stuff in high level code I guess...
But inlining and spesh could make it not too costly. 14:04
arnsholt Attribute lookups need to invoke attribute-getting code in the meta-object that does the correct stuff behind the scenes
jnthn Attribute access doesn't go via the meta-object in stuff we have so far...
arnsholt Yeah, I'll have to generate that code whenever I see an attribute access 14:05
jnthn Tjough there's no reason you can't compile them thta way.
Well, it'd be nice if there was a fast path/slow path thing though
arnsholt The thing is that when an attribute doesn't exist in an instance, you have to search the class object for an attribute of that same name 14:06
If the class object (or one of its parents) has that member return that. And if it's a callable, you return (more or less) sub(*args) { $meth($invocant, |@args) } 14:07
jnthn I'd probably code-gen a simple getattr
arnsholt Probably wise, yeah 14:08
jnthn Followed by a if not null goto fo ; if not invokable goto foo ; call slow path
*foo
And then spesh can probably too those checks for guards
arnsholt Troo, troo
jnthn And so eliminate the branches.
masak arnsholt: methods in Python are descriptors.
arnsholt: which is how you bind an unbound method, for example. you call __get__ on it. 14:09
arnsholt Yeah, there's that stuff too 14:10
masak .oO( yer a wizard, @arry[2] )
arnsholt But the stuff above is more or less verbatim from the spec 14:11
14:14 cognominal left
masak arnsholt: gist.github.com/masak/864795f3af67359d9a9f 14:15
arnsholt Oh, blerg. There's an implementation of those by default of course
The description of descriptors in the spec starts like this: "The following methods only apply when an instance of the class containing the method [...]" =) 14:16
14:17 chenryn left
masak lizmat++ # www.liz.nl/Perl6ForNeophytesNPW2014.pdf 14:17
14:17 rurban left
masak arnsholt: you're building an object system, and complaining about circularity? :P 14:18
arnsholt I know, I know!
14:18 chenryn joined
arnsholt Objects are hard =) 14:18
jnthn
.oO( Circularity in object systems? I saw it all before... )
14:19
14:22 onebitboy joined
masak arnsholt: jnthn and I had a nice discussion of 2-categories over dinner. (still quite jetlagged.) :) 14:23
14:23 jluis joined
masak in a 2-category, even the arrows have arrows! 14:23
arnsholt Gah! =D 14:24
14:25 sunnavy joined, rurban joined
arnsholt masak: Oh, it's actually not a problem 14:26
It's the unbound method `C.foo` that has a __get__, not C
masak yep.
the bound methods don't. I don't think there's a way to rebind a method. 14:27
arnsholt Yeah, you can read the invocant member (name is __self__ IIRC), but it's RO
Anyways, I'm gonna ignore descriptors for the time being =)
masak probably wise. 14:29
arnsholt++ # tinkering with snake
arnsholt It's fun, so far 14:35
14:35 virtualsue joined
arnsholt Making me want to put stuff into the dormant NQP book too 14:35
masak \o/ 14:36
14:38 ghostlines joined
arnsholt Also, having a GitHub project is a good idea 14:40
All of the notes about how to implement stuff can be stuffed into issues for later reference
14:43 KCL joined 14:45 cognominal joined 14:46 KCL_ left 14:51 rindolf left
[Coke] is very confused at what augustus is trying to do. 14:57
14:59 spider-mario joined
BinGOs found an empire. 14:59
masak name a month after himself.
jnthn ceaser the day 15:00
15:01 firefish5000 left
masak or the month. 15:02
15:04 kaare_ joined 15:05 regreg left 15:06 abraxxa left, zakharyas left 15:07 rindolf joined 15:08 ptc_p6 left
[Coke] sees the discussion has been over for a while, nevermind he said anything. 15:10
15:10 kaleem left
masak [Coke]: I'll say. Augustus died 2000 years ago. :P 15:11
15:11 raiph joined
timotimo he died for our sins, didn't he? 15:13
15:17 kaleem joined 15:18 FROGGS joined
raydiak \o 15:19
15:19 pecastro left
FROGGS o\ 15:20
15:20 adu joined 15:21 pecastro joined 15:28 ajr_ left 15:29 chenryn left 15:30 guru joined, guru is now known as ajr_ 15:32 chenryn joined
[Coke] man, I wish I timed the daily runs. :P 15:34
15:40 kaleem left 15:41 chenryn left
FROGGS jnthn: you know about release day tomorrow? 15:44
15:44 firefish5000 joined
jnthn FROGGS: Uh...not really :/ 15:45
$dayjob is nomming all the time :( 15:46
Until the weekend or so, then it may get a bit better.
FROGGS jnthn: can you (re)upload a moarvm tarball tomorrow?
I'd prepare All The Things like last time 15:47
jnthn FROGGS: That would be awesome
FROGGS cool
jnthn FROGGS: I can, though please note I'm currently 7 timezones ahead of you.
FROGGS ahead...
uhh
jnthn (So now it's about to be midnight.)
FROGGS ahh, alright
jnthn I could also swing by on Friday morning if that's too rushed, before I head out for teaching. 15:48
Which'd be about midnight your time
Anyways, please /msg me the url
FROGGS then it might make sense that I prepare it tonight (within seven hours), then you've time tomorrow while the shines on your place of the earth :o)
the sun*
k 15:49
jnthn The sun shines, but the smog layer was making a good effort of hiding the fact today...
FROGGS hehe
(Berlin suburbs)++ I'd say
PerlJam jnthn: would it be possible to share the love with FROGGS (or someone else) so that they can do the upload?
15:49 chenryn joined 15:50 exixt_ is now known as exixt
jnthn That's the right way to fix it medium term, but it'll take me more effort to set up than to do a wget tomorrow... But yeah, will look into it once I've time again. :) 15:51
Sleep time now...'night
colomon o/
FROGGS gnight jnthn
brrt lizmat++ for the presentation. stuff i didn't know :-) 15:54
15:55 adu left
timotimo m: say 10 + 3i % 2 + 2i 15:59
camelia rakudo-moar 93c2b4: OUTPUT«Cannot call 'Real'; none of these signatures match:␤:(Mu:U \v: *%_)␤ in sub infix:<%> at src/gen/m-CORE.setting:4588␤ in sub infix:<%> at src/gen/m-CORE.setting:4588␤ in block <unit> at /tmp/98S_RX1orG:1␤␤»
timotimo is it a dumb idea to want to have a component-wise % operation on complex numbers?
15:59 KCL left 16:02 treehug88 joined
brrt modulus for complex numbers? 16:03
Util timotimo: Do you have a use case (instead of just an example)? Does this come up in math that you have seen, or is it a clever idea of your own?
brrt i'm not sure that makes sense
timotimo Util: i have not seen it in math. i want to use it to warp the player's position (represented as a Complex) into a rectangular game field 16:04
brrt well... that's wrong 16:05
:-)
unless you want a players (0,1) position multiplied to become (1,0)
eh (-1,0)
represent it as something else instead :-)
Util timotimo: OK, then I would implement it as a <%> operator on (Complex,Complex), with the operator defined in your program or library, not in the language itself. 16:06
You are semi-abusing Complex, to exploit the fact that it has 2 (paired) component Reals, so just extend the operator on Complex to extend this use. 16:07
IMHO, you would want to keep the core language Complex pure to the behaviour that Math people would expect. 16:08
Otherwise, if you dif add it to the core language, I would make it a method instead of an op, like Slurp is added to Quaternions, 16:09
timotimo has implemented Snake
Util because lots of people who use Quaternions are exploiting their 3-D rotations for Game programming, and they all need Slerp, even though Slerp is not actually a part of Quaternion nature. 16:10
timotimo fair enough :)
69.5% time spent in sleep ... well ... %) 16:11
FROGGS O.o 16:12
FROGGS .oO( students.... )
arnsholt I was under the impression that 3D rotation is basically the only thing people use quaternions for
Apparently it's a bit marginal in mathematics =)
16:23 nanis joined
Util arnsholt: Not nearly as marginal as Octonions and Sedenions :^) 16:23
The pure research (I think) is in the *full* Cayley–Dickson algebras, not restricted to 4|8|16 elements. 16:24
Dr. John Bales (who is in my LUG), and has written papers on Quaternions.
I think that the C-D calculator he wrote goes up to 256 elements. jwbales.us/
Disclosure: /me is just an "armchair mathematician", but is responsible for github.com/Util/Perl6-Math-Quaternion/ and rosettacode.org/wiki/Quaternion_type#Perl_6 .
masak heathens! quaternions are not "used" -- they are appreciated for their intrinsic beauty (and lack of commutativity). 16:25
timotimo :)
the GC pauses in my snake implementation take at least 9ms each time 16:26
16:26 regreg joined
Util :) 16:27
16:28 nanis left
arnsholt timotimo: For a second I thought you were talking about Snake my Python implementation, rather than Snake the game 16:28
=D
timotimo hah. making it force_gc after doing every single frame gives me better worst-case frame-rates, but the time spent in gc goes up to 60% from 13%
arnsholt Yeah, better interactivity through many smaller GCs 16:29
timotimo actually, i wasn't measuring the GC time for the frame counter
16:30 sqirrel_ joined
gtodd am I dreaming or was there a page somewhere that had per release set of benchmarks with pretty graphs and such ? 16:30
timotimo t.h8.lv/p6bench/ 16:31
gtodd :-) 16:32
timotimo if you want to build something way cool that generates very helpful overview pages for bunches of outputs ... that'd be greatly appreciated :)
16:33 brrt left
gtodd you mean jnthn is not working on that in secret ? :-D 16:34
timotimo perl6-bench isn't jnthn's area of expertise 16:36
16:37 bjz left, bjz joined 16:45 chenryn left
gtodd timotimo: well if the pages are autogenerated (I assume they are .... with App::Dapper or something like it) and the data automatically captured and jsonified onto the page for jqplot then that would exhaust my areas of knowledge 16:46
timotimo i autogenerated the index.html by piping the output of ls into a .html file and running a vi macro over it ... 16:49
i don't perl5. ever.
TimToady m: (1,2,3)[*-5] 16:51
camelia rakudo-moar 93c2b4: OUTPUT«Unhandled exception: Effective index [-2] is out of range for a Parcel of 3 elements (*1)␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13812 (/home/camelia/r…»
16:51 rurban left
TimToady that's still kinda LTA 16:52
16:53 kst` joined
flussence
.oO( I get worried every time I see a new Parrot release... they're going to run out of bird names eventually. )
16:54
16:54 kst left
TimToady m: (1,2,3)[-> $i { $i - 42 }] 16:55
camelia rakudo-moar 93c2b4: OUTPUT«Unhandled exception: Effective index [-39] is out of range for a Parcel of 3 elements (*-36)␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13812 (/home/cameli…»
TimToady m: (1,2,3)[-> $i { $i / 2 - 20 }] 16:56
camelia rakudo-moar 93c2b4: OUTPUT«Unhandled exception: Effective index [-18.5] is out of range for a Parcel of 3 elements (*-15.5)␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:13812 (/home/ca…»
16:57 ghostlines left, rurban joined
gtodd flussence: work to preserve wildlife and biodiversity 16:59
TimToady m: (1,2,3)[0-1]
camelia rakudo-moar 93c2b4: OUTPUT«Unhandled exception: Unsupported use of [-1] subscript to access from end of Parcel; in Perl 6 please use [*-1]␤ at <unknown>:1 (/home/camelia/rakudo-inst-2/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:1…»
TimToady m: my $x = -1; say (1,2,3)[$x] 17:00
camelia rakudo-moar 93c2b4: OUTPUT«Unsupported use of [-1] subscript to access from end of Parcel; in Perl 6 please use [*-1]␤ in method gist at src/gen/m-CORE.setting:13804␤ in sub say at src/gen/m-CORE.setting:16535␤ in block <unit> at /tmp/lptxgA2NtO:1␤␤»
TimToady m: my $x = -3; say (1,2,3)[$x]
camelia rakudo-moar 93c2b4: OUTPUT«Unsupported use of [-3] subscript to access from end of Parcel; in Perl 6 please use [*-3]␤ in method gist at src/gen/m-CORE.setting:13804␤ in sub say at src/gen/m-CORE.setting:16535␤ in block <unit> at /tmp/msNYi9U0xN:1␤␤»
TimToady that's also LTA
it should not be assuming that relative addressing was intended 17:01
timotimo one week left to get GLR up in time for thanksgiving ... 17:02
17:02 kjs_ joined
timotimo 25% of run time of my snake game is GC (because i force GC with a probability of 20% or something each frame) and 25% of the execution time itself is spent inside NativeCall's postcircumfix:<( )> 17:06
TimToady obviously you need a 4 core machine or so :) 17:07
17:10 sqirrel_ left
gtodd timotimo: there's a thing in north american consumerism ... was mostly US but now big in Canada too called "Black Friday" 17:13
Ulti what's the most efficient way to match and replace a fixed substring in Rakudo on moarvm atm? I'm doing $str ~~ s:g/this/that/
timotimo gtodd: is that the thing where sometimes people die because they get trampled? 17:14
gtodd timotimo: :-| argh ... yeah ... and it is destroying Thanksgiving traditions ! 17:16
so I think GLR should aim for post Thanksgiving but it would be nice if some elements of GLR were ready for Perl6 Advent :-) 17:17
17:17 ajr_ left
timotimo oh no, the sanctity of thanksgiving! 17:17
gtodd heheh
17:17 guru joined
gtodd m: ( super => "perl5" , fantastic => "perl6" ).hash.reverse.say 17:18
camelia rakudo-moar 93c2b4: OUTPUT«"fantastic" => "perl6" "super" => "perl5"␤»
17:18 guru is now known as Guest24173
gtodd ( super => "perl5" , fantastic => "perl6" ).hash.invert.say 17:18
m: ( super => "perl5" , fantastic => "perl6" ).hash.invert.say
camelia rakudo-moar 93c2b4: OUTPUT«"perl5" => "super" "perl6" => "fantastic"␤»
17:18 cognominal left 17:19 cognominal joined, cognominal left, Guest24173 is now known as ajr_
gtodd «Useless use of reverse on hash ... to invert a hash; in Perl 6 please use invert␤ 17:19
17:22 [Sno] joined 17:23 kaleem joined 17:32 dagurval left, sjn left
ugexe perl6: nqp::say("hi"); say("second"); say("third"); 17:33
camelia rakudo-moar 93c2b4: OUTPUT«second␤third␤hi␤»
..rakudo-parrot 93c2b4: OUTPUT«hi␤second␤third␤»
timotimo gist.github.com/timo/326205e041d3c184a5c7
try and comment plox :)
gtodd timotimo: cool :) .... are you using waterfall or whirlpool approach to developing Snake ? :-) 17:34
17:34 rurban left 17:36 kaleem left, pecastro left
ugexe any idea what that output order is wrong? from the command line the output is correct 17:36
(for moar) 17:37
TimToady nqp does better buffering? 17:40
gtodd better than moar but worse than parrot or ... ? 17:41
TimToady or worse?
17:42 exixt is now known as exixt_, anaeem1_ joined
TimToady anyway, it would seem that nqp is doing block buffering on moarvm, while p6 is doing one of: no buffering, line buffering, or autoflushing 17:43
17:43 anaeem___ left
TimToady so the nqp output waits until the final flush 17:43
ugexe i see. and that somehow is affected by the facts its an eval server? 17:44
TimToady could be
line buffering is usually not turned on unless the output is a terminal
ugexe ah 17:45
also, re -1 index: my @a; @a[@a.end]; It does the proper thing, but seems wrong?
TimToady so my guess is nqp/moar is just defaulting to what stdio supplies while p6 is autoflushing
the current error messages are making unwarranted assumptions about how the index was calculated 17:46
m: my @a; say @a[@a.end] 17:47
camelia rakudo-moar 93c2b4: OUTPUT«Unsupported use of [-1] subscript to access from end of Array; in Perl 6 please use [*-1]␤ in method gist at src/gen/m-CORE.setting:13804␤ in sub say at src/gen/m-CORE.setting:16535␤ in block <unit> at /tmp/8TmC83f_h9:1␤␤»
TimToady it should say something more like: Negative calculated subscript (-1) is not allowed because Array is always 0-based 17:48
it should not guess that you said *-1
it should not assume that you wrote [-1] 17:49
it should not guess that you meant *-1, I should say
17:50 virtualsue left 17:51 kjs_ left
TimToady and we *still* don't detect a -1 subscript at compile time, which is the correct time to tell them about *-1 17:51
17:51 FROGGS_ joined
vendethiel masak: (.tell :p) 17:51
TimToady m: sub foo { @_[-1] } 17:52
camelia ( no output )
TimToady std: sub foo { @_[-1] }
17:52 camelia left
TimToady oops 17:52
I successfully created a snap directory yesterday, but that's not enoughj
ugexe i tried hack it to detect at compile time but i think i just wasted my time randomly changing crap with gimmie and reify lol
FROGGS_ TimToady: in the repo or on that machine?
TimToady on that machine 17:53
17:53 camelia joined
TimToady when it rebrews it goes away again 17:53
17:53 Sqirrel left
FROGGS_ so it should live in the repo too? 17:53
TimToady so something needs fixing in the build process
build.pl std calls make snap, which should create it, but it doesn't, so the make is failing somehow, probably a missing dep 17:54
camelia std : OUTPUT«Can't chdir to '/home/camelia/std/snap': No such file or directory at lib/EvalbotExecuter.pm line 166.␤ EvalbotExecuter::_auto_execute(HASH(0x1c009c8), "sub foo { \@_[-1] }", GLOB(0xada3d68), "/tmp/wfuVBD9hmT", "std") called at lib/EvalbotExecuter.pm line 114␤ Evalb…»
17:54 ChanServ sets mode: +v camelia
TimToady there's a build.pl std entry in crontab, but the output goes to /dev/null 17:55
17:55 dakkar left, FROGGS left
TimToady can't do anything much about it currently; trying to look through migraine auras makes it really hard to read 17:57
fortunately my migraines tend not to be very painful
17:58 ptc_p6 joined
moritz "Can't locate YAML/XS.pm in @INC" 18:03
moritz installs it 18:04
TimToady lesse, next will be Moose, or Try::Tiny 18:05
seems like there was one other I often ran into 18:06
moritz is now installing Moose 18:07
wasn't there a time when Moose had only a handful of non-core deps?
Text::Glob, Number::Compare, Test::CleanNamespaces 18:08
TimToady wasn't there a time when Perl 6 was much more like Perl 5?
moritz gotcha :-)
TimToady are you doing this on nine's machine? 18:10
or changing the brewery? 18:11
18:12 kjs_ joined 18:14 kjs_ left
moritz TimToady: on nine's machine 18:15
TimToady: and logs are in log/std.log
File::ShareDir missing... 18:16
TimToady that was the other one :)
moritz now it takes much longer 18:17
that's a good sign
moritz hopes TimToady++'s migraine retreats quickly
18:18 kurahaupo joined
TimToady the auras are now far enough away from my macula that I can read again :) 18:19
timotimo gtodd: i didn't follow a particular development strategy ... which i suppose is similar to what whirlpool means?
TimToady I still get the "mean" feeling you get with migraines, but I probably burned out the pain nerves with shingles long ago, so that part isn't a problem 18:20
moritz std: 42 18:21
camelia std 76ccee1: OUTPUT«ok 00:00 135m␤»
TimToady \o/
moritz that looks fairly recent.
18:21 telex left
timotimo wow, std can parse integer literals now? 18:21
TimToady std: sub foo { @_[-1] }
camelia std 76ccee1: OUTPUT«===SORRY!===␤Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/IixH2BAjik line 1:␤------> sub foo { @_[-1]⏏ }␤Parse failed␤FAILED 00:00 140m␤»
timotimo we're really getting somewhere here!
TimToady std: sub foo { @_[-2] }
camelia std 76ccee1: OUTPUT«===SORRY!===␤Unsupported use of [-2] subscript to access from end of array; in Perl 6 please use [*-2] at /tmp/NueXthJ1SE line 1:␤------> sub foo { @_[-2]⏏ }␤Parse failed␤FAILED 00:00 140m␤»
TimToady std: sub foo { @_[0;-2] } 18:22
camelia std 76ccee1: OUTPUT«ok 00:00 140m␤»
TimToady didn't think so
18:22 telex joined
gtodd timotimo: sorry OT :-) I just read a book I think it was called "Implementation by Example" ... which was sort of a downer ... it made me think of "whirlpool" 18:26
(which I think TimToady gave a name to)
timotimo it was a downer in what sense? you were disappointed with its quality/helpfulness? 18:34
18:37 ennio joined 18:38 ajr_ left 18:39 [Sno] left 18:40 [Sno] joined, Mso150 joined
timotimo i have lots of ideas for more features in that game, fwiw 18:41
PerlJam in retrospect, "whirlpool" is kind of an unfortunate name as they go round and round without ever making progress in a particular direction
timotimo mostly graphical
arnsholt can haz objects o/ 18:44
Objects without attributes or methods, but still =D
FROGGS_ I... object 18:45
TimToady PerlJam: no, eventually the whirlpool sucks you down the middle 18:48
18:52 espadrine_ left 18:55 ennio left
PerlJam TimToady: I dunno. Most whirlpools that I've run across don't have much of a downward pull; they just lazily go round and round 18:58
18:59 Sqirrel joined
PerlJam wikipedia also seems to make a distinction: "Vortex is the proper term for any whirlpool that has a downdraft." from en.wikipedia.org/wiki/Whirlpool 19:02
TimToady obviously a tornado is not a vortex then :P 19:03
19:03 fhelmberger left
TimToady and Captain Nemo was scared of nothin' 19:03
PerlJam also, from that page: "In popular imagination, but only rarely in reality, whirlpools can have the dangerous effect of destroying boats." ;) 19:04
TimToady so a process that may or may not converge is certainly well described by "whirlpool" :)
19:05 regreg left
TimToady and "eddy" generally describes the non-convergent whirlpool, so we don't need to force "whirlpool" to mean that 19:06
TimToady hates it when so-called experts try to make general terms mean specific things, except when the expert is him, of course... 19:07
19:07 regreg joined
PerlJam Isn't that what language design is all about? ;-) 19:08
19:09 ennnio joined
PerlJam ennnio: I must be projecting my inner state out into the world a little bit as I read your nick as "ennuio" (that is ennui-o) 19:11
19:16 molaf_ left 19:17 guru joined, guru is now known as Guest19336, Guest19336 is now known as ajr_ 19:21 kurahaupo1 joined
ennnio PerlJam, may be I'll change my nick to improve your inner state? 19:23
raiph lucas++, masak++ thanks for notes about my S 17 commit; lesson learned 19:24
sorry it broke stuff and revert won't fix it /o\
19:25 Mso150 left 19:26 virtualsue joined 19:27 Mso150 joined, sjn_ joined, dagurval joined 19:30 smls left 19:31 KCL_ joined 19:35 ghostlines joined 19:37 rurban joined 19:41 grondilu left, adu joined 19:42 rurban left 19:43 Ven joined
Ven dammit, I always type "perl6weekly.wordpress.com" :( 19:44
19:46 kurahaupo1 left 19:49 sjn_ is now known as sjn 19:52 darutoko left 19:55 ptc_p6 left, adu left 19:56 travis-ci joined
travis-ci NQP build failed. Tobias Leich 'bump parrot and moar revision to current release' 19:56
travis-ci.org/perl6/nqp/builds/41520148 github.com/perl6/nqp/compare/54ee6...d274e13454
19:56 travis-ci left 19:58 travis-ci joined
travis-ci Rakudo build failed. Tobias Leich 'bump nqp/moar/parrot revision' 19:58
travis-ci.org/rakudo/rakudo/builds/41520304 github.com/rakudo/rakudo/compare/9...1e8af114e2
19:58 travis-ci left
[Coke] parrot the only clean rakudo implementation. Release is RSN. 20:12
jvm failing 30 tests; moar-jit 103, moar-nojit 21. 20:14
FROGGS_ that much? unbelievable
20:14 anaeem1_ left
FROGGS_ I've got a clean spectest run on moar+jit 20:15
[Coke] every day. haven't had a clean moar run in weeks.
you're not on OS X, then.
20:15 rindolf left
[Coke] I am regularly getting segfaults and memory corruption errors. 20:15
none of the jit, no-jit failures coincide, btw. 20:16
bartolin [Coke]: after your last fudge for parrot I had clean runs for parrot, moar and moar-jit. jvm failed 23 tests (all data from last night on FreeBSD) 20:18
[Coke] I assume the jvm failures are non-controversial: github.com/coke/perl6-roast-data/b....out#L1712
the roll failures may be pointing at bad tests, or bad rand stuff on jvm. I unno, those flap a bit. 20:19
bartolin++
bartolin I have not seen any flappers there for a while. also I had less failures: github.com/usev6/perl6-roast-data/....out#L1710
20:19 travis-ci joined
travis-ci NQP build passed. Tobias Leich 'adopt to new MAST::Ops/MAST::Nodes location' 20:19
travis-ci.org/perl6/nqp/builds/41522573 github.com/perl6/nqp/compare/d0d27...f18410156b
20:19 travis-ci left
bartolin [Coke]++ ;-) 20:19
[Coke] so, might be the rolls 20:20
bartolin yes, it seems so
[Coke] if you dig through the java history on my site, you'll those come and go, I think (even before the switch to OS X) 20:23
FROGGS_ valgrind does not report anything for the failing moar tests :/
[Coke] bartolin: if you're using my stuff, have you re-synced lately? some changes to at least get the builds going in parallel when possible. 20:24
FROGGS_: there's a moarvm ticket I opened for one of the tests (now passing, of course) that might have some useful detail.
github.com/MoarVM/MoarVM/issues/154 20:25
looks like moar-nojit has 3 memory errors which i assume are related to #154, and one segfault. 20:26
looks like jit is all segfaults. 20:27
bartolin [Coke]: no, I'm haven't pulled in your changes. if I find some time, I'll do that, thanks! (since the spectests run over night, I don't care too much if it takes a bit longer)
20:27 Ven left 20:30 adu joined
bartolin btw, I started a new job this month, so atm I've only occasionally some free time for Perl 6 20:33
(in case someone wondered what happened after my burst of activity in october ;-) 20:34
20:35 ghostlines left
[Coke] I have an old job, and I have similar issues. :) 20:35
20:35 travis-ci joined
travis-ci Rakudo build passed. Tobias Leich 'pull in a build fix for nqp' 20:35
travis-ci.org/rakudo/rakudo/builds/41523730 github.com/rakudo/rakudo/compare/0...2dd43e8eef
20:35 travis-ci left
PerlJam too 20:35
felher r: my (\x) = 3; say x; 20:36
camelia rakudo-{parrot,moar} 031e8a: OUTPUT«(Any)␤»
FROGGS_ bartolin: I still see that you are quite active :o)
felher Shoudn't that say "3" or am I mistaken?
FROGGS_ [Coke]: either I don't understand how unions work or Apple doesnt...
r: my (\x = 3); say x; 20:37
camelia rakudo-{parrot,moar} 031e8a: OUTPUT«(Any)␤»
FROGGS_ r: my \x = 3; say x;
camelia rakudo-{parrot,moar} 031e8a: OUTPUT«3␤»
FROGGS_ I guess it does not see the initializer with parens
TimToady it's not an initializer; it's a parameter with a default 20:39
m: my (\x = 3) ::= (); say x;
camelia rakudo-moar 031e8a: OUTPUT«(Any)␤»
TimToady that one should be 3
felher But "my (\x, \y) = 1, 2" should work too, right? Or is that only supposed to work with normal variables? 20:40
20:41 kaare_ left, kurahaupo left 20:42 ghostlines joined
felher r: my (\a, \b) = 1,2; my ($x, $y) = 3, 4; say a, b, $x, $y; 20:42
camelia rakudo-{parrot,moar} 031e8a: OUTPUT«(Any)(Any)34␤»
felher I did expect to get 1234 :) 20:46
bartolin FROGGS_: did you intend to close RT #118501 or was that by mistake? 20:47
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=118501
FROGGS_ ups
20:48 travis-ci joined
travis-ci Rakudo build passed. TimToady 'unify the Negative exceptions 20:48
travis-ci.org/rakudo/rakudo/builds/41523915 github.com/rakudo/rakudo/compare/2...aa8bf41c81
20:48 travis-ci left
FROGGS_ bartolin: I reopened it, thanks 20:48
bartolin FROGGS_++ 20:49
FROGGS_ ohh, then let me close+reopen another bunch :P 20:50
bartolin *g*
FROGGS_ such karma, much happy /o/
bartolin felher: afaik there are some issues with parsing things like 'my ( ... ) = $foo', because ( ... ) is parsed as a signature. in an old ticket I found an short explanation from jnthn++: rt.perl.org/Ticket/Display.html?id...txn-686876 20:54
felher bartolin: thanks :) 20:55
bartolin m: my Int (Str $x); say $x.WHAT # RT #73102
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=73102
camelia rakudo-moar 031e8a: OUTPUT«(Int)␤»
FROGGS_ [Coke]: this might fix it: github.com/MoarVM/MoarVM/commit/33...e8f09185d0 20:56
bartolin m: my (Str $a) = 3; say $a # RT #115916
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=115916
camelia rakudo-moar 031e8a: OUTPUT«3␤»
20:56 exixt_ is now known as exixt
FROGGS_ [Coke]: is there a chance to test that commit? it is >2014.11, and therefore I cannot bump the revision in nqp 20:56
20:58 raiph left, eclipse joined 20:59 exixt is now known as exixt_
FROGGS_ m: say join '', ('' xx 64) 21:01
camelia rakudo-moar 031e8a: OUTPUT«␤»
TimToady
.oO(Much Ado About Nothing)
FROGGS_ [Coke]: I dunno if something like the above might blow up on OSX
and there are certainly many kinds of nothing 21:02
21:04 colomon left 21:05 ghostlines left, Mso150 left, Mso150 joined 21:06 gtodd1 joined, gtodd left 21:07 ghostlines joined, ghostlines left 21:08 ghostlines joined
netstar Is there an IO::Socket implemented? 21:09
FROGGS_ m: say IO::Socket
camelia rakudo-moar 031e8a: OUTPUT«IO::Socket is disallowed in restricted setting␤ in sub restricted at src/RESTRICTED.setting:1␤ in method gist at src/RESTRICTED.setting:22␤ in sub say at src/gen/m-CORE.setting:16539␤ in block <unit> at /tmp/AE1vl051QD:1␤␤»
FROGGS_ netstar: yes, but not here in IRC as you can see :o)
netstar lol 21:10
FROGGS_ also, and IO::Socket::INET
netstar where can i find her??
FROGGS_ her?
21:10 firefish5000 left
netstar IO::Socket* modules 21:10
tadzik they're not modules 21:11
except IO::Socket::SSL
FROGGS_ here is the source if you are interested: github.com/rakudo/rakudo/tree/nom/src/core/IO
netstar thanks
Hmm I have Debian's rakudo installed 21:13
use IO::Socket::INET ... cant be found 21:14
[Coke] FROGGS_: doing a fresh build with master... 21:15
moritz netstar: you don't need to 'use' it; it's already there 21:16
netstar ahar! 21:17
:)
21:17 ghostlines left
FROGGS_ [Coke]: nice, please ping me when you've got results :o) 21:20
[Coke] . tell lizmat - if we're doing a 6.0 release in 2015, we might want to pull the trigger on any pending deprecations before then. (right now some of them are scheduled in Q3 of 2015) 21:23
.tell lizmat - if we're doing a 6.0 release in 2015, we might want to pull the trigger on any pending deprecations before then. (right now some of them are scheduled in Q3 of 2015)
yoleaux [Coke]: I'll pass your message to lizmat.
[Coke] .tell lizmat - this might mean updating the info in the release before we cut the release this week. (Not sure if any of these dates have gone out in a release yet.) 21:24
yoleaux [Coke]: I'll pass your message to lizmat.
moritz t/spec/S02-types/array.rakudo.moar fails three tests for me, and t/spec/S02-types/lists.rakudo.moar fails 5 tests 21:28
both repeatable
and TimToady++ touch both today 21:29
netstar okay sorry for the newbieness. Why is my perl6 program sticking on old behaviours whereas the source code is modified
TimToady moritz: testing with an old rakudo? 21:30
ugexe netstar: youll have to be more specific. is it a module from a script you are running?
TimToady or happened to hit the gap between updating rakudo vs roast? 21:31
21:31 firefish5000 joined, Guest39179 joined
TimToady moritz: fresh download here is All Tests Successful, at least under mora 21:32
*moar
21:37 colomon joined
TimToady m: sub foo { @_[-1] } 21:38
camelia rakudo-moar 10aa8b: OUTPUT«===SORRY!=== Error while compiling /tmp/0APWFlNlUY␤Unsupported use of a negative -1 subscript to index from the end; in Perl 6 please use a function such as *-1␤at /tmp/0APWFlNlUY:1␤------> sub foo { @_[-1]⏏ }␤»
[Coke] netstar: perhaps gist the source?
TimToady m: say (1,2,3)[-5]
camelia rakudo-moar 10aa8b: OUTPUT«===SORRY!=== Error while compiling /tmp/iHQlCnqvir␤Unsupported use of a negative -5 subscript to index from the end; in Perl 6 please use a function such as *-5␤at /tmp/iHQlCnqvir:1␤------> say (1,2,3)[-5]⏏<EOL>␤»
TimToady m: say (1,2,3)[*-5] 21:39
camelia rakudo-moar 10aa8b: OUTPUT«Calculated index (-2) is negative, but Parcel allows only 0-based indexing␤ in method gist at src/gen/m-CORE.setting:13776␤ in sub say at src/gen/m-CORE.setting:16507␤ in block <unit> at /tmp/AcpKhHxCuF:1␤␤»
21:39 raiph joined
TimToady m: my @a; say @a[@a.end] 21:40
camelia rakudo-moar 10aa8b: OUTPUT«Calculated index (-1) is negative, but Array allows only 0-based indexing␤ in method gist at src/gen/m-CORE.setting:13776␤ in sub say at src/gen/m-CORE.setting:16507␤ in block <unit> at /tmp/CsI5Ydt6jo:1␤␤»
21:40 ennnio left
TimToady m: my @a; say @a[ 10 .. -20 ] 21:41
camelia rakudo-moar 10aa8b: OUTPUT«===SORRY!=== Error while compiling /tmp/eTTf1nkK5C␤Unsupported use of a negative -20 subscript to index from the end; in Perl 6 please use a function such as *-20␤at /tmp/eTTf1nkK5C:1␤------> my @a; say @a[ 10 .. -20 ]⏏…»
21:42 spider-mario left, KCL_ left, adu left 21:43 ghostlines joined, ghostlines left 21:44 lizmat joined
[Coke] "function"? 21:45
FROGGS_ m: say 42[*-2] # :P
camelia rakudo-moar 10aa8b: OUTPUT«Calculated index (-1) is negative, but Int allows only 0-based indexing␤ in method gist at src/gen/m-CORE.setting:13776␤ in sub say at src/gen/m-CORE.setting:16507␤ in block <unit> at /tmp/5d1DfgMniC:1␤␤»
FROGGS_ m: say 42[*-1]
camelia rakudo-moar 10aa8b: OUTPUT«42␤»
21:46 bjz left, bjz_ joined
TimToady m: say (*-2).arity 21:47
camelia rakudo-moar 10aa8b: OUTPUT«WhateverCode.new()␤»
TimToady heh
21:47 gtodd1 left
TimToady m: say .arity given *-2 21:48
camelia rakudo-moar 10aa8b: OUTPUT«1␤»
TimToady sure looks like a function to me
21:48 gtodd joined
colomon m: say (*-2).signature.arity 21:49
camelia rakudo-moar 10aa8b: OUTPUT«WhateverCode.new()␤»
colomon m: (*-2).signature.arity.say
camelia ( no output )
TimToady methods are subject to autopriming
colomon has no idea what that means
TimToady *.foo doesn't call foo on the * 21:50
m: say (*.abs.floor.sqrt)(-123) 21:51
camelia rakudo-moar 10aa8b: OUTPUT«11.0905365064094␤»
colomon ah!
FROGGS_ it is like a placeholder parameter
TimToady m: say (my $ = *-2).arity
camelia rakudo-moar 10aa8b: OUTPUT«1␤»
21:51 woolfy joined
FROGGS_ m: say (* * *)(21, 2) 21:51
camelia rakudo-moar 10aa8b: OUTPUT«42␤»
FROGGS_ :D 21:52
TimToady basically * autocurries only with prefixes/infixes/postfixes, but method calls are considered postfixes
21:53 ghostlines joined
[Coke] Yes, I know that whatevercode is a function, but it doesn't seem like the most helpful word there for a n00b. 21:56
FROGGS_ .oO( "Nah, Don't Do *That*!" ) 21:57
TimToady it tells them precisely what to say, and teaches them it's really a function. what's not t olike 21:58
it was 'closure', but I decided that was worse, especially since this one isn't closing over anything 21:59
[Coke] FROGGS_: aborted even more tests. sorry.
TimToady: ok. 22:00
22:04 ghostlines left
FROGGS_ ewww 22:05
22:05 Ugator left 22:07 FROGGS_ left
[Coke] (did a default build with jit) 22:08
22:11 martinjungblut joined 22:14 colomon left 22:15 regreg left 22:20 bloonix joined 22:22 rurban joined, Mso150 left 22:38 ajr_ left 22:42 colomon joined 22:43 bronco_creek joined
bronco_creek I have a beginner-ish syntax question. 22:44
22:44 regreg joined
bronco_creek In a program $obj.WHAT.say says "(list)" and $obj.Int.say says "4". But for $obj -> $item { $item.say } says all four items concatenated into one string. Not what I expected. 22:47
timotimo it's because it is in a $ container
that forces it into item context
and thus the for loop will only iterate once and have the whole $obj in the single iteration
you can write @$obj or $obj.list to get the individual items 22:48
timotimo goes to bed
oh, i should mention:
22:48 cognominal joined
timotimo the good thing about this is that you can always tell that "for $obj" will only give a single iteration, whatever the value of $obj is 22:49
whereas "for @something" will give as many iterations as are in @something
o/
netstar what is the preferred method of writing to a socket? 22:51
I come from a C background 22:52
lizmat computer, messages 22:53
yoleaux 21:23Z <[Coke]> lizmat: - if we're doing a 6.0 release in 2015, we might want to pull the trigger on any pending deprecations before then. (right now some of them are scheduled in Q3 of 2015)
21:24Z <[Coke]> lizmat: - this might mean updating the info in the release before we cut the release this week. (Not sure if any of these dates have gone out in a release yet.)
lizmat [Coke]: last months release had the first dates in them 22:54
but I will change the wording to something like "or when Perl 6.0.0 comes out"
[Coke]: I also see unclean spectests for weeks now (on OS X) 22:55
there is no pattern in the failing test-files that I could determine :-(
bronco_creek timotimo: Thank you.
lizmat when run by themselves, they're 99.5% of the time ok :-(
Timbus netstar, IO::Socket i would imagine 22:56
22:59 firefish5000 left
Timbus it needs work =/ 23:00
personally, with async implemented as well as it is, I'd go so far as to recommend making it the only (core) way to work with sockets 23:02
23:02 exixt_ is now known as exixt 23:03 exixt is now known as exixt_ 23:04 martinjungblut left 23:05 kurahaupo joined
bronco_creek Perl6 just told me to "Please contact the author to have these calls to deprecated code adapted..." I wonder how. 23:06
23:06 Guest39179 left
lizmat bronco_creek: could you tell me the exact message ? 23:10
bronco_creek lizmat: %ANON_VAR__2 = itemized hash called at: src/gen/m-CORE.setting, line 1634 Please use %ANON_VAR__2 = %(itemizedd hash) instead. 23:13
lizmat hmmm... I guess I need more info :-( 23:17
netstar this is fun 23:19
bronco_creek I guess there is a way from me to cut and past the code, but I don't know how. 23:21
Bumbling n00bs are at least good at breaking stuff... 23:22
raydiak bronco_creek: if you're using the windows command line, I believe you right-click and select "Mark" to highlight, then 'Copy' in the same menu to copy, or something along those lines
might have to right-click in the titlebar, i dunno, been a while since I used windows more than required 23:23
bronco_creek Yah, but won't that creat havoc if I just paste it into my irc client?
raydiak if you highlight a big block, yes, but at least even if you only highlight one line at a time, you don't have to manually re-type
23:24 rurban left
raydiak for big blocks sometimes I paste the whole block into notepad to clean it up and re-copy 23:24
bronco_creek Rough outline:
23:27 gfldex left
bronco_creek use v6; use JSON::Path; my $data = {...largish JSON data structure omitted...} my $path = JSON::Path.new('$.store.*'); my $obj = $path.values($data); for %$obj.keys -> $key { $key.say } 23:27
I guess it is late for EU folks. I'll need to start playing with Perl6 in my morning. 23:30
lizmat bronco_creek: yeah, sorry, was distracted 23:32
and about to go to bed... 23:33
sleep&
23:33 raiph left
bronco_creek In case someone backlogs, here is the whole compiler message: 23:34
Saw 1 call to deprecated code during execution. ================================================================================ %ANON_VAR__2 = itemized hash called at: src/gen/m-CORE.setting, line 1643 Please use %ANON_VAR__2 = %(itemized hash) instead. -------------------------------------------------------------------------------- Please contact the author to have these calls to deprecated code adapted, so that this messa
ugexe i looked at that the other day, i think its from my &condition = EVAL '-> $_ { my $/; ' ~ ~$<code> ~ ' }'; 23:37
you can do --notests if you dont plan on turning off safe mode (which i dont think is documented) 23:38
it passes all tests except for 2 safemode tests
bronco_creek In installed the module with --notests after it failed one test on my initial attempt. 23:40
ugexe ah i think i see the problem 23:43
its in the test so it should still function fine 23:44
23:48 virtualsue left
bronco_creek Yes, it ran. I would not have bothered the channel with this except that the comiler messages asked for follow-up. 23:49
23:49 exixt_ is now known as exixt
ugexe i sent a PR to the author bronco_creek thanks for letting us know 23:50
bronco_creek ugexe: Thank you. 23:51
23:51 jack_rabbit joined 23:53 Alina-malina left, Alina-malina joined, BenGoldberg joined
netstar okay sorry to keep interrupting. I'm trying to use a scalar as a key for a hash, it seems to escape the $ sign each time 23:55
23:55 telex left 23:56 telex joined