Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-08-14

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 Vico_Wu1 joined #perl6
00:06 berekuk joined #perl6
00:06 xenoterracide_ joined #perl6
00:11 timotimo it seems like inspecting lexical variables for native-int-ness is somehow not working the same way on jvm as it is on parrot
00:11 BenGoldberg rn: (^Inf).infinite.say
00:11 camelia niecza v24-88-g1f87209: OUTPUT«Unhandled exception: Unable to resolve method infinite in type Range␤  at /tmp/8Uh2jGLaxf line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @ 576) ␤  at /…
00:11 camelia ..rakudo 59f060: OUTPUT«True␤»
00:11 timotimo nqp-jvm: say(nqp::objprimspec(int))
00:11 camelia nqp-jvm: OUTPUT«1␤»
00:12 BenGoldberg Is there (will there be) an official way to test if a list is infinite?
00:12 timotimo hm, is .infinite not official?
00:13 timotimo http://perlcabal.org/syn/S07.html#The_.infinite_method - it's specced at least.
00:14 BenGoldberg Oh
00:14 nugged joined #perl6
00:14 BenGoldberg nevermind, then :)
00:15 BenGoldberg r: say Mu
00:15 camelia rakudo 59f060: OUTPUT«(Mu)␤»
00:15 BenGoldberg r: say gather { }.infinite
00:15 camelia rakudo 59f060: OUTPUT«Nil␤»
00:15 timotimo oh. nope, it was just lines that should have been removed still being there
00:16 BenGoldberg The spec says it should return Mu if it's unknown whether the list is infinite
00:16 timotimo the lists spec is headed for a rewrite by pmichaud
00:16 timotimo but he's pretty swamped with other work :(
00:17 timotimo no, hold on. i think it's S06 instead?
00:17 timotimo no, er ...
00:17 timotimo why is s07 so short? i remember it being much longer!
00:18 colomon joined #perl6
00:18 woolfy joined #perl6
00:18 timotimo i love the way the jvm just parses the core setting 3x as fast as parrot
00:19 colomon it does?
00:19 timotimo just 40 seconds for stage parse on my computer
00:19 segomos are sockets good to go in jvm?
00:19 timotimo (and 4 seconds for the optimizer)
00:19 timotimo not yet, but there's a bit of progress
00:27 timotimo oh
00:27 timotimo OH!
00:27 timotimo mega facepalm engage
00:28 timotimo i was changing op.name instead of op.op all the time
00:28 timotimo that would really have 0 effect on performance
00:29 [Coke] updated https://gist.github.com/coke/5879701 , it's been a while
00:29 slavik jnthn: arnsholt: sorry for bugging, but NativeCall can be used in a method, right? (specifically, the declaration of a sub from a library), for example: git_repository_open only makes sense in the constructor.
00:30 slavik also, how can I handle a pointer to a pointer?
00:31 timotimo https://github.com/arnsholt/Net-ZMQ/blob/master/lib/Net/ZMQ/Socket.pm - here's some example usage of nativecall being used together with methods
00:31 dayangkun joined #perl6
00:31 slavik ty
00:31 timotimo i'd try CArray[CArray[something]] but what do i know ;)
00:31 slavik timotimo: I am wondering if I can put the my sub line inside a method
00:31 slavik timotimo: thanks, that gives me something to go on :)
00:31 timotimo i think you should be able to no-prob
00:32 slavik timotimo: I owe you a GOOD beer. :)
00:32 timotimo haha, no way :)
00:32 slavik how come?
00:36 timotimo it's nothing ;)
00:37 slavik :(
00:40 xinming joined #perl6
00:43 BenGoldberg If jvm runs so much faster than parrot... how silly would it be to use jvm-rakudo to cross-compile to parrot-rakudo?
00:43 benabik joined #perl6
00:44 colomon joined #perl6
00:44 colomon timotimo: hmmm, parsing is 72s versus 162s for me, so closer to 2x than 3x faster here.  Still a substantial improvement!
00:44 timotimo i have 40 vs ~110
00:47 slavik BenGoldberg: I don't see the point of something like that
00:47 BenGoldberg Speed?
00:47 timotimo i see no more obvious and dumb mistakes in my nqp optimizer, but i also see no performance change whatsoever :(
00:48 slavik timotimo: give it some drugs :P
00:49 slavik timotimo: do you know what { * } specifically means when importing stuff from libs? {} is a block, but what is * in that context?
00:49 timotimo {*} has something to do with protos
00:49 timotimo if you have a proto method/sub foo() {*} it means that it does no special dispatching
00:49 timotimo it is then also called an "onlystar proto"
00:50 timotimo in other contexts, it can be interpreted in any way
00:50 timotimo r: sub foo() { * }; say &foo.onlystar;
00:50 camelia rakudo 59f060: OUTPUT«False␤»
00:50 timotimo oh?
00:50 timotimo r: proto sub foo() { * }; say &foo.onlystar;
00:50 camelia rakudo 59f060: OUTPUT«True␤»
00:50 timotimo right.
00:50 BenGoldberg r: *.say
00:50 timotimo only for protos you see
00:50 camelia rakudo 59f060:  ( no output )
00:50 benabik r: sub foo() { * }; say foo, foo.WHAT
00:50 camelia rakudo 59f060: OUTPUT«*(Whatever)␤»
00:50 BenGoldberg r: *.gist.say
00:50 camelia rakudo 59f060:  ( no output )
00:51 BenGoldberg r: *.WHAT.say
00:51 camelia rakudo 59f060: OUTPUT«(Whatever)␤»
00:51 benabik BenGoldberg: *.say creates a sub.
00:51 timotimo r: (*.gist.say).gist.say
00:51 camelia rakudo 59f060:  ( no output )
00:51 BenGoldberg my $a = *; $a.say
00:51 BenGoldberg r: my $a = *; $a.say
00:51 camelia rakudo 59f060: OUTPUT«*␤»
00:51 BenGoldberg :)
00:53 timotimo r: my $a := *.gist.say; say $a.WHAT;
00:53 camelia rakudo 59f060: OUTPUT«(WhateverCode)␤»
00:53 timotimo r: my $a := *.gist.say; say $a(<hi there>);
00:53 camelia rakudo 59f060: OUTPUT«hi there␤True␤»
00:53 BenGoldberg So that's like
00:54 BenGoldberg r: say(<hi there>.gist.say)
00:54 camelia rakudo 59f060: OUTPUT«hi there␤True␤»
00:54 timotimo yes
00:54 BenGoldberg :)
00:55 BenGoldberg Learning how dwim-y things work is fun :)
00:57 jeff_s1 joined #perl6
00:57 timotimo does the codegen perhaps still build the coerce ops even though i annotated correct return types everywhere i could figure them out and turned add_n into add_i?
00:57 timotimo having any amount of coerce_n2i(add_n(corece_i2n(foo), coerce_i2n(bar))) in the code should cause performance decreases in my opinion :(
00:57 timotimo maybe i'm chipping away at milisecond differences in the context of a program that runs for a minute
00:57 BenGoldberg Hmm...
01:00 BenGoldberg Maybe you're optimizing the wrong part of the program?
01:02 timotimo i'm optimising any occurence of +, - and * in all stuff that's written in nqp across nqp and rakudo
01:02 timotimo at least if both arguments can be proven to be ints
01:02 timotimo my debug output says i'm transforming quite a bunch of additions, subtractions (hardly any multiplications)
01:02 benabik I wouldn't expect optimizing math to make a big difference for parsing...  I'd expect parse to be dominated by string operations and object creation.
01:03 timotimo it also does a bunch of cursor pushing and such
01:03 BenGoldberg Sure, but if those +, -, and * aren't called very often, or aren't in tight loops, then they're not that important overall... is there a profiler for nqp?
01:03 timotimo and lots of loops are based on an integer loop var that gets +1'd
01:03 timotimo there is one for rakudo, not sure if there's one for nqp
01:04 BenGoldberg I forget, is the parser in rakudo or nqp?
01:04 timotimo nqp
01:04 BenGoldberg There exist jvm parsers...
01:05 BenGoldberg Err, I meant there exist jvm profilers
01:06 BenGoldberg If you use rakudo on jvm, and use a jvm profiler, would it tell you what parts of the parser take the longest to run?
01:06 timotimo good question
01:07 benabik It should, although you might get odd answers like __block_231 or however NQP/JVM names things.
01:08 BenGoldberg On a related note... when rakudo on jvm generates java bytecode, does it put debugging info (file names and line numbers) into that bytecode?
01:08 timotimo i believe it does, otherwise how would we get lines from backtraces?
01:08 timotimo nqp-jvm: sub foo() { die "omg" }; foo();
01:08 camelia nqp-jvm: OUTPUT«Cannot stringify this␤  in FAILGOAL␤  in blockoid␤  in routine_def␤  in routine_declarator:sym<sub>␤  in !protoregex␤  in routine_declarator␤  in term:sym<routine_declarator>␤  in !protoregex␤  in term␤  in termish␤  in EXPR␤  in statement␤  in statementlist␤  in comp_un…
01:09 timotimo oh ... no line number
01:09 BenGoldberg nqp: sub foo() { die "omg" }; foo()
01:09 camelia nqp: OUTPUT«Unable to parse expression in blockoid; couldn't find final '}' at line 2, near "die \"omg\" "␤current instr.: 'panic' pc 14721 (src/stage2/gen/NQPHLL.pir:5232) (src/stage2/gen/NQPHLL.nqp:279)␤»
01:10 timotimo you need () around die in nqp
01:10 BenGoldberg nqp: sub foo() { die("omg") }; foo()
01:10 camelia nqp: OUTPUT«Could not find sub &die␤current instr.: 'foo' pc 71 ((file unknown):54) (/tmp/gRCoZX6JPm:1)␤»
01:10 BenGoldberg nqp-jvm: sub foo() { die("omg") }; foo()
01:10 timotimo oh, and you need nqp::die i think
01:11 camelia nqp-jvm: OUTPUT«Lexical '&die' not found␤  in foo␤  in <anon>␤  in <anon>␤  in eval␤  in evalfiles␤  in command_eval␤  in command_line␤  in MAIN␤  in <anon>␤  in <anon>»
01:11 BenGoldberg nqp-jvm: sub foo() { nqp::die("omg") }; foo()
01:11 camelia nqp-jvm: OUTPUT«omg␤  in foo␤  in <anon>␤  in <anon>␤  in eval␤  in evalfiles␤  in command_eval␤  in command_line␤  in MAIN␤  in <anon>␤  in <anon>»
01:11 BenGoldberg nqp: sub foo() { nqp::die("omg") }; foo()
01:11 camelia nqp: OUTPUT«omg␤current instr.: 'foo' pc 68 ((file unknown):55) (/tmp/Y9bT940XNY:1)␤»
01:11 timotimo i'll run actual nqp microbenchmarks now.
01:13 BenGoldberg r: my @a = gather { .take $_ for ^Inf } but role { sub infinite { True } }; for @a { .say; last }; say 'done';
01:13 camelia rakudo 59f060: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/uNJq2gKht_â�¤Two terms in a rowâ�¤at /tmp/uNJq2gKht_:1â�¤------> [32mmy @a = gather { .take [33mâ��[31m$_ for ^Inf } but role { sub infinite { [0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤ …
01:13 BenGoldberg r: my @a = gather { .take $_ for (^Inf) } but role { sub infinite { True } }; for @a { .say; last }; say 'done';
01:13 camelia rakudo 59f060: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/VpqpW9rLXaâ�¤Two terms in a rowâ�¤at /tmp/VpqpW9rLXa:1â�¤------> [32mmy @a = gather { .take [33mâ��[31m$_ for (^Inf) } but role { sub infinite [0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤ …
01:13 BenGoldberg r: my @a = gather { take $_ for (^Inf) } but role { sub infinite { True } }; for @a { .say; last }; say 'done';
01:14 camelia rakudo 59f060: OUTPUT«(timeout)»
01:14 BenGoldberg r: my @a = gather { take 1; say 'x' } but role { sub infinite { True } }; for @a { .say; last }; say 'done';
01:14 timotimo of course the benchmark framework builds a new parrot each time ... at least it won't try to build a complete jvm :P
01:14 camelia rakudo 59f060: OUTPUT«x␤This type does not support elems␤  in method REIFY at src/gen/CORE.setting:7492␤  in method reify at src/gen/CORE.setting:6718␤  in method reify at src/gen/CORE.setting:6705␤  in method gimme at src/gen/CORE.setting:7138␤  in method eager at src/gen/CORE.setting:…
01:15 timotimo anyway. this'll take quite a while, i shall lay down and get a head start on my bedtimes
01:17 TimK1 joined #perl6
01:17 berekuk joined #perl6
01:18 TimK1 Confused...
01:18 TimK1 > any(1, 2) != 1;
01:18 TimK1 False
01:18 TimK1 Shouldn't that be "any(False, True)"?
01:30 [Coke] r: say any(1,2) != 1;
01:30 camelia rakudo 59f060: OUTPUT«False␤»
01:30 [Coke] r: say 1|2 != 1;
01:30 camelia rakudo 59f060: OUTPUT«False␤»
01:31 lue r: say 1 != any(1,2);
01:31 camelia rakudo 59f060: OUTPUT«False␤»
01:32 lue r: say 1 == any(1,2);
01:32 camelia rakudo 59f060: OUTPUT«any(True, False)␤»
01:32 lue r: say 1 !== any(1,2);
01:32 camelia rakudo 59f060: OUTPUT«False␤»
01:33 TimK1 Exactly what I was getting on my local install.
01:37 colomon joined #perl6
01:39 Mouq joined #perl6
02:16 nugged joined #perl6
02:18 benabik comparisons collapse junctions
02:18 TimK1 Then why...
02:18 TimK1 r: say 1 == any(1,2);
02:18 camelia rakudo 59f060: OUTPUT«any(True, False)␤»
02:18 benabik Or at least I think they're supposed to?
02:19 TimK1 Indeed, this does collapse the junction...
02:19 TimK1 r: say ?(1 == any(1,2));
02:19 camelia rakudo 59f060: OUTPUT«True␤»
02:20 benabik $a !== $b  is the same as not $a == $b
02:20 benabik So the _negation_ collapses the junction.
02:20 benabik S03:3215
02:20 synopsebot Link: http://perlcabal.org/syn/S03.html#line_3215
02:23 TimK1 Ah… It didn't always used to be that way, I gather. Some tutorials note that with junctions, $a != $b might not be the same as !($a == $b). That disturbed me. (See, e.g., http://perlgeek.de/en/article/5-to-6#post_08.)
02:25 TimK1 Thanks for the clarification & spec reference!
02:26 Kiralexis joined #perl6
02:34 BenGoldberg There are a few other ways to collapse a junction... in addition to "!", there are "not", "?", and "so"
02:35 BenGoldberg not is like !, but lower precedence
02:35 BenGoldberg ? coerces it's argument to Bool, and has similar precedence to !
02:35 BenGoldberg so does the same thing as ?, but has lower precedence (similar precedence to not)
02:36 BenGoldberg r: r: say 1 == any(1,2)
02:36 camelia rakudo 59f060: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4Fvsh1D9GOâ�¤Two terms in a rowâ�¤at /tmp/4Fvsh1D9GO:1â�¤------> [32mr[33mâ��[31m: say 1 == any(1,2)[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-inf…
02:36 BenGoldberg r: r: say (1 == any(1,2))
02:36 camelia rakudo 59f060: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/LskHZ1Jj59â�¤Two terms in a rowâ�¤at /tmp/LskHZ1Jj59:1â�¤------> [32mr[33mâ��[31m: say (1 == any(1,2))[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-i…
02:36 BenGoldberg r: (1 == any(1,2)).say
02:36 camelia rakudo 59f060: OUTPUT«any(True, False)␤»
02:36 BenGoldberg r: (1 == any(1,2)).so.say
02:36 camelia rakudo 59f060: OUTPUT«True␤»
02:36 BenGoldberg r: (1 == any(1,2)).not.say
02:36 camelia rakudo 59f060: OUTPUT«False␤»
02:36 BenGoldberg r: (1 == any(1,2)).!.say
02:36 camelia rakudo 59f060: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/MMH69oo7n8â�¤Confusedâ�¤at /tmp/MMH69oo7n8:1â�¤------> [32m(1 == any(1,2)).[33mâ��[31m!.say[0mâ�¤    expecting any of:â�¤        postfixâ�¤        dotty method or postfixâ�¤Â»
02:37 BenGoldberg r: say ?(1 == any(1,2))
02:37 camelia rakudo 59f060: OUTPUT«True␤»
02:37 BenGoldberg r: say !(1 == any(1,2))
02:37 camelia rakudo 59f060: OUTPUT«False␤»
02:39 panchiniak_ joined #perl6
02:41 panchiniak_ left #perl6
03:01 flussence rn: (1 == any(1,2)).&prefix:<!>.say
03:01 camelia rakudo 59f060, niecza v24-88-g1f87209: OUTPUT«False␤»
03:04 colomon joined #perl6
03:12 wtw joined #perl6
03:31 preflex_ joined #perl6
03:32 TimK1 left #perl6
03:43 xenoterracide_ joined #perl6
03:47 araujo joined #perl6
04:19 Khisanth joined #perl6
04:43 crab2313 joined #perl6
04:47 nugged joined #perl6
04:51 birdwindupbird joined #perl6
04:53 xinming joined #perl6
05:13 mdn joined #perl6
05:19 moritz good morning
05:22 diakopter o/
05:23 JimmyZ \o/
05:46 crab2313 joined #perl6
05:46 lizmat joined #perl6
05:57 FROGGS joined #perl6
06:00 sidus joined #perl6
06:05 FROGGS r: say "test" ~~ rx{^ <-[e]>+ $} # segomos, BenGoldberg, I think this was what you meant
06:05 camelia rakudo 59f060: OUTPUT«Nil␤»
06:07 FROGGS the <![e]> timed out because it has no width, so the cursor doesnt move...
06:07 FROGGS r: say "test" ~~ rx{^ . <![e]>+ $}
06:07 camelia rakudo 59f060: OUTPUT«Nil␤»
06:07 FROGGS r: say "test" ~~ rx{^ . <![e]>+}
06:07 camelia rakudo 59f060: OUTPUT«Nil␤»
06:07 FROGGS r: say "test" ~~ rx{. <![e]>+}
06:07 camelia rakudo 59f060: OUTPUT«(timeout)»
06:08 FROGGS hmmm, this could work I think
06:08 FROGGS r: say "test" ~~ rx{<-[e]>+}
06:08 camelia rakudo 59f060: OUTPUT«「t」␤␤»
06:27 cognominal joined #perl6
06:32 grondilu joined #perl6
06:34 slavik I am completely lost at how to create references/pointers in perl6 ... I can't find anything relating to proper syntax
06:34 moritz slavik: well, usually you just don't, because it's all implicit
06:35 moritz slavik: see http://perl6advent.wordpress.com/2011/12/16/where-have-all-the-references-gone/
06:37 slavik is it wrong to think of 'my $t = @a;' as $t being a reference to an array?
06:37 nugged joined #perl6
06:38 slavik moritz: in the off chance you may know, any idea if NativeCall can handle a CPointer to a CPointer (which points to a CStruct)?
06:40 moritz slavik: you can always use a CArray[CArray[YourCstruct]] and only use index 0
06:40 moritz it's a hack, but it usually works
06:41 moritz slavik: the problem with saying that $t is a reference is that @a is also a reference
06:41 moritz slavik: which is why we say "$t is scalar that holds an array" or something like that
06:42 arnsholt A CPointer to a CPointer doesn't really make sense, since the pointer is opaque
06:42 slavik moritz: I see
06:42 slavik arnsholt: this is in the sense of int ** a (in c/c++)
06:42 moritz arnsholt: but for many applications it would help a lot to have transparent pointers
06:43 moritz or maybe s/transparent/dereferncable/
06:43 arnsholt Yeah, I'm mulling over how we could do some kind of non-opaque pointer
06:43 arnsholt Nothing concrete yet, though
06:44 arnsholt slavik: At any rate, what moritz suggested is the only way to do what you want ATM
06:44 arnsholt The syntax is a bit annoying, but the semantics are what you want
06:45 * moritz -> venue
06:46 grondilu r: my $t = my @a = ^10; say @$t
06:46 camelia rakudo 59f060: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
06:46 slavik ok, cool
06:46 slavik thanks
06:49 shachaf joined #perl6
06:50 woolfy left #perl6
06:55 Su-Shee joined #perl6
06:55 Su-Shee good morning everyone.
06:56 moritz oh hai Su-Shee
06:56 kaleem joined #perl6
06:58 masak Su-Shee! \o/
07:00 Khisanth joined #perl6
07:01 Su-Shee how's it going at the yapc? nice outcome of perl 6 interested people? :)
07:02 moritz Su-Shee: so far it's been great
07:03 Su-Shee good. :)
07:04 lizmat joined #perl6
07:05 dmol joined #perl6
07:11 masak yeah, people are enthusiastic about the new threading goodies.
07:11 masak and the presence on the JVM.
07:11 masak moritz: are you going to the txtspeak talk? I'm thinking about it.
07:12 moritz masak: no
07:13 masak ok.
07:13 moritz I'm staying in room 0
07:13 moritz *main room
07:13 masak oh well. if his talk is brilliant, I bet I'll hear about it afterwards.
07:13 masak I liked "room 0" :)
07:17 grondilu still no video of yapc::eu 2013 on youtube :/
07:19 masak grondilu: *during* the conference? hah!
07:26 tadzik hello hello
07:28 dalek rakudo/nom: b581774 | (Elizabeth Mattijsen)++ | src/Perl6/World.nqp:
07:28 dalek rakudo/nom: Make any container named ?*foo dynamic by default
07:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b5817745de
07:28 dalek rakudo/nom: c0814ab | (Elizabeth Mattijsen)++ | src/core/PseudoStash.pm:
07:28 dalek rakudo/nom: No longer need to check name for OUTER:: access
07:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c0814ab9fc
07:33 * tadzik wonders if it's worth to go on the Language Numbering talk
07:35 moritz I'll go (or rather stay) there
07:42 * masak too
07:44 berekuk joined #perl6
07:45 dmol1 joined #perl6
07:47 tadzik well, let me know if it happens to be any constructive :)
07:53 nine_ jnthn: why Promise.anyof/allof and not use the existing any/or in Perl6?
07:54 moritz nine_: because any/all are for junctions, I'd guess
07:55 nine_ moritz: but anyof/allof stroke me as very similiar to junctions. I wonder if they could not have been realised using junctions.
07:56 moritz nine_: it's a dangerous thing to try to unify, I think
07:58 fhelmberger joined #perl6
07:59 nine_ dangerous but probably even more powerful. It just seems strange to have special methods that do almost the same for this. Perl 6 is full exploitation http://lwn.net/Articles/411845/ everywhere else
08:01 nugged joined #perl6
08:05 tadzik I was thinking about this too
08:05 moritz nine_: it feels very perl 5-y to use the same operator for different things
08:06 moritz (I'm not totally against the idea, I just don't think it fits our design philosphy)
08:06 FROGGS joined #perl6
08:06 nine_ moritz: but are they really different? I'm not suggesting using the same operator, I'm asking if allof/anyof could not have been implemented simply using junctions.
08:06 xenoterracide joined #perl6
08:08 moritz nine_: I don't think so, but I'll look at the code to find out
08:08 nine_ Maybe I'm not understanding junctions well enough. I've never even used Perl 6 after all :)
08:38 FROGGS .tell jnthn For a regex like / a | b | c /, we could evaluate the three branches in parallel, right? I think this could speed-up parsing a lot...
08:38 yoleaux FROGGS: I'll pass your message to jnthn.
08:38 preflex yoleaux: you have 2 new messages. '/msg preflex messages' to read them.
08:40 rindolf joined #perl6
08:40 JimmyZ FROGGS: sregex looks like is in parallel
08:41 FROGGS JimmyZ: good to know, even I fear I can't steal the logic from it
08:41 SHODAN joined #perl6
08:42 JimmyZ FROGGS: actually from http://swtch.com/~rsc/regexp/regexp2.html
08:42 JimmyZ JFI.. :)
08:42 JimmyZ FYI
08:43 FROGGS yeah, I remember that article...
08:43 FROGGS this could be a nice project :D
08:43 JimmyZ FROGGS: sregex is the nice project
08:43 JimmyZ and jited
08:44 JimmyZ FROGGS: https://github.com/agentzh/sregex
08:44 FROGGS JimmyZ: yes sure, but I certainly won't be able to rewrite our regex engine
08:45 FROGGS I'm not pmichaud :o)
08:45 JimmyZ FROGGS: yeah, just for you information :P, I won't be able to...
08:46 JimmyZ FROGGS: and I have a nice libuv branch ...
08:46 FROGGS yeah
08:46 FROGGS but I think I might be able to make our regex engine threaded...
08:46 JimmyZ that's great
08:48 berekuk joined #perl6
08:58 mdn joined #perl6
09:03 dmol joined #perl6
09:04 dmol joined #perl6
09:04 PacoAir joined #perl6
09:07 lizmat joined #perl6
09:10 PacoAir joined #perl6
09:11 diakopter FROGGS: did you see the discussion here a while ago about sregex?
09:11 diakopter (for all I remember, you were part of it)
09:11 FROGGS diakopter: I think I remember, yes
09:12 domidumont joined #perl6
09:14 FROGGS diakopter: but my understanding was that we can't use it because of backtracking... is that wrong?
09:14 denis_boyun joined #perl6
09:16 timotimo cannot see any of masaks talks until people put them onto youtube ;_;
09:16 FROGGS yes ó.ò
09:18 * timotimo runs nqp benchmarks, this time with the commit that actually has any optimizations rather than a seemingly random one
09:20 lizmat_ joined #perl6
09:21 denis_boyun_ joined #perl6
09:25 mathw morning o/
09:29 timotimo hello mathw :)
09:40 denis_boyun joined #perl6
09:47 dmol joined #perl6
09:48 denis_boyun joined #perl6
09:52 pmurias joined #perl6
09:55 timotimo http://t.h8.lv/p6bench/nqp-optimization.html - make out of this what you will
09:56 SamuraiJack joined #perl6
09:58 nugged joined #perl6
10:00 birdwindupbird joined #perl6
10:01 timotimo wow, those benchmark graphs really are counterintuitive. this is an improvement of 300% for jvm and 30% for parrot on that one arithmetic-intensive benchmark
10:09 dmol1 joined #perl6
10:18 not_gerd joined #perl6
10:18 not_gerd http://www.youtube.com/watch?v=fUwY3K35yAc # first yapc talk video?!
10:24 denisboyun joined #perl6
10:26 berekuk joined #perl6
10:28 pmurias timotimo: aren't those pointless micro benchmarks?
10:29 pmurias s/pointless/not approximating a real situation/
10:29 timotimo yes, they are :)
10:29 cogno joined #perl6
10:29 timotimo still makes me happy to finally see an improvement :D
10:30 pmurias they do demonstrate that the optimalisation is doing something ;)
10:32 pmurias the benchmarks for dart/javascript seem interesting but the shortest one is 539 lines
10:32 pmurias so it's a lot to port over
10:33 pmurias https://developers.google.com/octane/benchmark
10:34 timotimo yeah :(
10:34 timotimo especially to nqp, where things can be a bit more ... roundabout
10:36 PacoAir joined #perl6
10:36 pmurias they shouldn't be much more roundabout that in the orginal javascript version ;)
10:37 pmurias timotimo: http://code.google.com/p/octane-benchmark/source/browse/trunk/richards.js - the shortest one
10:37 timotimo fortunately has craptons of comment lines
10:39 timotimo nqp has :decl(param), i like that
10:45 mdn joined #perl6
10:45 pmurias re octane benchmark writing a simple js subset -> nqp translator should be possible/fun
10:46 pmurias hmm, maybe if I added some interop to node-js it would be possible to do that using something like http://esprima.org/ ;)
10:46 pmurias s/node-js/nqp-js/
10:54 denisboyun joined #perl6
10:59 timotimo nqp: say(1 / 2)
11:00 camelia nqp: OUTPUT«0.5␤»
11:01 timotimo pmurias: would a var(local foo_bar :decl(var)) be acceptable inside the first stmts of a block if it's wrapped by an op(bind)?
11:01 timotimo or could that lead to the local not being declared correctly?
11:01 berekuk joined #perl6
11:01 timotimo or should i replicate the var :decl(var) and put the bind after that?
11:05 Su-Shee_ joined #perl6
11:06 daxim joined #perl6
11:08 colomon joined #perl6
11:09 iSlug joined #perl6
11:22 denisboyun joined #perl6
11:23 pmurias timotimo: I think it would be acceptable
11:24 pmurias - QAST::Op(bind) $foo
11:24 pmurias - QAST::Var(lexical $foo :decl(var))
11:24 pmurias - QAST::WVal(NQPMu)
11:25 tadzik I got a riddle
11:25 tadzik I have function foo($socket)
11:25 tadzik $socket is created like my Mu $socket := nqp::socket()
11:25 tadzik now imagine foo($socket?)
11:25 tadzik so: how can I tell if $socket was passed there or ont?
11:25 masak in nqp?
11:26 moritz tadzik: nqp::defined($socket) ?
11:26 tadzik oh, $socket =:= Mu seems to work too
11:26 masak r: my $N = 5; my $rx = "a?" x $N ~ "a" x $N; say "a" x $N ~~ /<$rx>/
11:26 camelia rakudo c0814a: OUTPUT«「aaaaa」␤␤»
11:26 masak r: my $N = 32; my $rx = "a?" x $N ~ "a" x $N; say "a" x $N ~~ /<$rx>/
11:26 tadzik moritz: oh yes, that'd work too
11:26 camelia rakudo c0814a: OUTPUT«(timeout)»
11:26 * masak submits rakudobug
11:27 masak TimToady++ # suggesting submitting that as a rakudobug
11:27 pmurias jnthn: ping
11:27 TimToady jnthn++ is setting up to talk in about 3 minutes
11:27 nugged joined #perl6
11:27 * masak throws in http://swtch.com/~rsc/regexp/regexp1.html as a reference
11:27 pmurias ah ok
11:30 lizmat joined #perl6
11:33 dmol joined #perl6
11:33 pdcawley joined #perl6
11:39 timotimo nqp: nqp::istype(QAST::VarWithFallback.new(), QAST::Var)
11:39 camelia nqp:  ( no output )
11:39 timotimo nqp: say(nqp::istype(QAST::VarWithFallback.new(), QAST::Var))
11:39 camelia nqp: OUTPUT«1␤»
11:40 timotimo oh!
11:41 timotimo if you don't descend into VarWithFallback nodes, you're going to have a bad time.
11:42 not_gerd joined #perl6
11:44 * timotimo has a hard time making if statements that span lines look good
11:50 timotimo aaw, i'm getting erroneous code out on the other end :(
11:59 dalek Perlito: 72b2b6d | (Flavio S. Glock)++ | / (3 files):
11:59 dalek Perlito: Perlito5 - XS - emitter stub
11:59 dalek Perlito: review: https://github.com/fglock/Perlito/commit/72b2b6df28
12:03 crab2313 joined #perl6
12:17 dmol joined #perl6
12:18 mdn joined #perl6
12:18 dmol joined #perl6
12:20 lizmat joined #perl6
12:20 daniel-s joined #perl6
12:27 nugged joined #perl6
12:30 rindolf joined #perl6
12:43 PacoAir joined #perl6
12:43 ivanoff joined #perl6
12:47 berekuk joined #perl6
12:49 pmurias timotimo: how does nqp::curlexpad() work with your to local optimalisation? ;)
12:50 tadzik omg lol
12:50 tadzik I just fetched projects.list with JVM :)
12:50 dalek Perlito: d725979 | (Simon Bertrang)++ | / (2 files):
12:50 dalek Perlito: start emitting some xs parts
12:50 dalek Perlito: review: https://github.com/fglock/Perlito/commit/d72597911d
12:51 FROGGS tadzik: lol
12:51 FROGGS :D
12:51 timotimo pmurias: i have no idea! :)
12:52 tadzik FROGGS: even with LWP::Simple :D
12:53 tadzik and it required like 3 hacks
12:53 tadzik mostly removing 'Buf' as a type constraint
12:53 tadzik I'm so excited, I just can't hide it
12:53 FROGGS yeah, must be Blob now, rigth?
12:53 FROGGS right
12:53 tadzik I don't know
12:53 timotimo it's cool :)
12:53 tadzik it's sometimes Blob, sometimes it's... utf8
12:53 moritz pull request it (or push it)
12:54 tadzik that's some implementation of IO::Socket::INET I wrote, which is nothing like the one we have
12:54 tadzik but it seems to read() and write() at least
12:54 timotimo ah, right, in nqp you can just get the lexpad of your caller, too, right? and there's no "is dynamic" trait that you can set
12:55 timotimo in that case, the optimization is never safe :|
12:55 moritz :(
12:55 pmurias timotimo: curlexpad allows you to get the lexpad of yourself, and send it somewhere else
12:55 pmurias s/send it somewhere/show it to a different routine/
12:55 timotimo is that the only problem?
12:56 pmurias with curlexpad?
12:56 timotimo because in that case i can just turn off the optimization if "curlexpad" is used inside the current block
12:56 dalek Perlito: a2a9ed2 | (Simon Bertrang)++ | / (2 files):
12:56 dalek Perlito: Perlito5 - XS - first example xs output compiles
12:56 dalek Perlito: review: https://github.com/fglock/Perlito/commit/a2a9ed2886
12:56 timotimo i think there's things like getlexouter etc?
12:57 pmurias we need to have dynamic variables markerd yes
12:57 pmurias otherwise we would have to turn the optimalization anytime we call a sub or a method
12:57 tadzik fun fact: it takes 25 seconds to load LWP::Simple with URI and fetch a webpage on jvm
12:58 tadzik (without precompilation)
12:58 pmurias :((
12:59 timotimo that's JVM for you ...
12:59 lizmat pmurias: since this morning, all dynamic variables *are* marked, afaik
12:59 timotimo lizmat: not in nqp :)
12:59 pmurias timotimo: is the optimizer you are working on public somewhere?
12:59 lizmat ah, ok, :-(
12:59 timotimo pmurias: i can push my current status to nqp on github
12:59 nugged joined #perl6
13:00 dalek nqp/nqp-optimizer: 271de83 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
13:00 dalek nqp/nqp-optimizer: working build, lots of debug output, more intelligence.
13:00 dalek nqp/nqp-optimizer: review: https://github.com/perl6/nqp/commit/271de83da7
13:00 dalek nqp/nqp-optimizer: a338192 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
13:00 dalek nqp/nqp-optimizer: nqp-jvm doesn't like negative nums in substr
13:00 dalek nqp/nqp-optimizer: review: https://github.com/perl6/nqp/commit/a3381922b5
13:00 dalek nqp/nqp-optimizer: bc1f073 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
13:00 dalek nqp/nqp-optimizer: this should have been gone already.
13:00 dalek nqp/nqp-optimizer: review: https://github.com/perl6/nqp/commit/bc1f073f1b
13:00 dalek nqp/nqp-optimizer: ee4151d | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
13:00 dalek nqp/nqp-optimizer: little improvements. actually finds symbols now.
13:00 dalek nqp/nqp-optimizer: review: https://github.com/perl6/nqp/commit/ee4151d76c
13:00 dalek nqp/nqp-optimizer: 6de1913 | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
13:00 dalek nqp/nqp-optimizer: removed debug output
13:00 dalek nqp/nqp-optimizer: review: https://github.com/perl6/nqp/commit/6de1913159
13:00 dalek nqp/nqp-optimizer: 215ac4c | (Timo Paulssen)++ | src/NQP/Optimizer.nqp:
13:00 dalek nqp/nqp-optimizer: try to turn lexicals into locals.
13:00 dalek nqp/nqp-optimizer: review: https://github.com/perl6/nqp/commit/215ac4cb50
13:00 berekuk joined #perl6
13:00 timotimo everything but the last commit is apparently safe.
13:00 timotimo doesn't change anything in the rakudo build, either
13:00 timotimo as in test failures
13:00 tadzik I must say I don't understand much about our current Buf situation. Some things are Buf, some or Blob, some are utf8 (?!?), and they work alike but are incompatible type-wise
13:00 timotimo the last commit breaks a few, though
13:01 ajr joined #perl6
13:01 FROGGS tadzik: true
13:02 FROGGS maybe jnthn has to draw a map for us :o)
13:03 moritz Buf does Blob
13:03 moritz and Buf is a role
13:04 moritz Buf is a Blob[uint8]
13:05 moritz and utf8 is a class that does Blob[uint8], but not Buf
13:06 dalek Perlito: 21e2693 | (Simon Bertrang)++ | / (2 files):
13:06 dalek Perlito: Perlito5 - XS - handle packages outside CompUnit and adjust semicolon placement
13:06 dalek Perlito: review: https://github.com/fglock/Perlito/commit/21e2693d2c
13:06 FROGGS so, utf8 is about encoding, but Buf is just about a binary stream of octets?
13:06 PerlJam good morning #perl6
13:06 timotimo yeah, utf8 objects must always contain properly encoded utf8
13:06 FROGGS hi PerlJam
13:07 FROGGS right, that is like a Buf + a constraint
13:07 FROGGS makes sense somehow
13:07 FROGGS (not that I expect something else from jnthn :o)
13:07 FROGGS was this specced that way?
13:08 tadzik but Blob is not an acceptable Buf
13:08 tadzik oh, of course
13:08 timotimo right, because blobs are read-only?
13:08 tadzik yes
13:08 dalek nqp: 777fb17 | (Pawel Murias)++ | t/nqp/77-curlexpad.t:
13:08 dalek nqp: Add a test for nqp::curlexpad().
13:08 dalek nqp: review: https://github.com/perl6/nqp/commit/777fb17879
13:10 tadzik I have a feeling that line numbers in errors are off on JVM
13:10 FROGGS tadzik: off by one?
13:10 tadzik usually
13:10 pmurias should the lexpad returned by nqp::curlexpad() be writable?
13:11 pmurias * writeable
13:11 FROGGS pmurias: yes, I think so
13:12 FROGGS I see code like:
13:12 FROGGS my $BLOCK := $*W.cur_lexpad();
13:12 FROGGS $BLOCK[0].push(QAST::Op.new
13:12 FROGGS ...
13:12 * moritz thought the lexpeds were immutable at runtime
13:12 moritz FROGGS: World.cur_lexpad vs. nqp::curlexpad()
13:12 FROGGS ohh, that is in Perl5::Grammar.pm
13:12 fridim_ joined #perl6
13:12 FROGGS ahh, okay, different things then
13:16 dmol joined #perl6
13:17 pmurias moritz: it seems I can't add new lexicals but can bind to existing one on nqp-parrot
13:18 moritz pmurias: sounds sensible
13:22 masak o/
13:22 timotimo hello masak :)
13:23 * masak seems to have survived his two talks :)
13:23 moritz and I liked both!
13:23 masak \o/
13:25 FROGGS \o/
13:25 tadzik yeah, they were cool :)
13:25 pmurias masak: still using your awesome slides software? ;)
13:26 tadzik hrm. Does ./perl6 -e 'my Buf $content .= new()' throw up on jvm for you too?
13:26 timotimo tadzik: fwiw, i think the parrot-based socket implementation needs at least 1 change which is allowing the user to specify how many incoming connections should be able to wait for an accept.
13:27 dmol masac++
13:27 timotimo maybe you can design a better socket api and someone else can port that over to rakudo-parrot?
13:27 tadzik timotimo: I plan to port it over myself once I battle-prove it on JVM :)
13:27 tadzik timotimo: but yes, this backlog thing is one of the things
13:28 iSlug joined #perl6
13:28 masak pmurias: same as PLPW -- Perl 6 converting Markdown to HTML+reveal.js
13:28 timotimo cool :)
13:28 masak it's not perfect, but it's pretty nice.
13:28 dalek rakudo-js: 23d3f5c | (Pawel Murias)++ | nqp-src/nqpmo.pm:
13:28 dalek rakudo-js: Add missing nqpmo.
13:28 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/23d3f5c815
13:28 dalek rakudo-js: c8ff861 | (Pawel Murias)++ | runtime (4 files):
13:28 dalek rakudo-js: Implement nqp::clone().
13:28 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/c8ff861233
13:28 dalek rakudo-js: b3e70ec | (Pawel Murias)++ | / (5 files):
13:28 dalek rakudo-js: Make nqp::clone work on hashes, implement nqp::curlexpad().
13:28 dalek rakudo-js:
13:28 dalek rakudo-js: Pass test 66.
13:28 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/b3e70ec2d9
13:28 dalek rakudo-js: 4d9d90e | (Pawel Murias)++ | run_tests:
13:28 dalek rakudo-js: Add passing test 77 to run_tests.
13:28 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/4d9d90ecca
13:29 tadzik masak: is it published?
13:29 timotimo masak: how long until you use pod6 instead of markdown? :)
13:29 tadzik so, who has rakudo-jvm compiled?
13:30 tadzik relatively recent
13:30 tadzik don't make me compile it myself :P
13:30 daxim joined #perl6
13:30 masak tadzik: previous talks that use that library are published (as in "on github"), yes.
13:30 moritz tadzik: I'm compiling it right now
13:30 tadzik okayo
13:30 masak timotimo: I actaully have one talk that I wrote in Pod. with a custom translator to SVG.
13:30 timotimo oh, to svg, eh?
13:31 masak timotimo: but I think I like Markdown better for talks.
13:31 masak actually, I don't think I've been "sold" on Pod yet, sorry to say.
13:31 dalek Perlito: fd8ea18 | (Simon Bertrang)++ | / (2 files):
13:31 dalek Perlito: Perlito5 - XS - adjust declarations and make return initially functional
13:31 dalek Perlito: review: https://github.com/fglock/Perlito/commit/fd8ea187f3
13:31 dalek Perlito: b7c68a0 | (Simon Bertrang)++ | t5-xs/ (8 files):
13:31 dalek Perlito: Perlito5 - XS - add tests
13:31 dalek Perlito: review: https://github.com/fglock/Perlito/commit/b7c68a06e6
13:31 masak if I made a programming language from scratch, I'd do the Pod equivalent as Markdown.
13:32 pmurias you can always use a perl6 module
13:32 masak *nod*
13:32 timotimo right
13:33 bluescreen10 joined #perl6
13:33 tadzik java.lang.Throwable: Nominal type check failed for parameter '$got'
13:33 tadzik that error message is up-Throwable :P
13:34 * masak .oO( unless you count throwing up your hands in frustration )
13:40 btyler joined #perl6
13:40 berekuk joined #perl6
13:41 Su-Shee masak: nearly everybody wishes today that POD were markdown - i'm pretty sure you can make pod6 markdown and everybody will be happy ;)
13:42 dalek Perlito: 370d1e9 | (Simon Bertrang)++ | t5-xs/Makefile:
13:42 dalek Perlito: Perlito5 - XS - test strings
13:42 dalek Perlito: review: https://github.com/fglock/Perlito/commit/370d1e9eff
13:42 dalek Perlito: 0819178 | (Simon Bertrang)++ | t5-xs/Some-Thing/t/Hello-World.t:
13:42 dalek Perlito: Perlito5 - XS - test for the changed input
13:42 dalek Perlito: review: https://github.com/fglock/Perlito/commit/0819178c11
13:42 dalek Perlito: 599dbd2 | (Simon Bertrang)++ | / (3 files):
13:42 dalek Perlito: Perlito5 - XS - custom implementation of escape_string to get string support initially working
13:42 dalek Perlito: review: https://github.com/fglock/Perlito/commit/599dbd2da6
13:46 tadzik https://gist.github.com/tadzik/6231215 it quite funny
13:46 tadzik jnthn: ^^
13:49 dalek v5: 64d6e01 | (Tobias Leich)++ | / (3 files):
13:49 dalek v5: allow `map EXPR LIST`
13:49 dalek v5: review: https://github.com/rakudo-p5/v5/commit/64d6e01468
13:56 thou joined #perl6
13:56 moritz LHF: make rakudo-jvm compile the restricted setting
13:56 moritz rakudo-jvm can compile it, it's just missing from the Makefile
14:03 kbaker joined #perl6
14:08 cosimo joined #perl6
14:08 timotimo i think i'll try to implement richards in nqp and perl6
14:09 moritz prompt() doesn't work on rakudo-jvm yet
14:09 moritz > my $x = prompt "number"; say uc $x
14:09 moritz numberMethod 'flush' not found
14:11 FROGGS nqp-jvm: say sprintf("%s", [42])
14:11 camelia nqp-jvm: OUTPUT«Confused at line 2, near "say sprint"␤  in panic␤  in comp_unit␤  in TOP␤  in parse␤  in parse␤  in <anon>␤  in compile␤  in eval␤  in evalfiles␤  in command_eval␤  in command_line␤  in MAIN␤  in <anon>␤  in <anon>»
14:11 FROGGS nqp-jvm: say nqp::sprintf("%s", [42])
14:11 camelia nqp-jvm: OUTPUT«Confused at line 2, near "say nqp::s"␤  in panic␤  in comp_unit␤  in TOP␤  in parse␤  in parse␤  in <anon>␤  in compile␤  in eval␤  in evalfiles␤  in command_eval␤  in command_line␤  in MAIN␤  in <anon>␤  in <anon>»
14:11 FROGGS nqp-jvm: say(nqp::sprintf("%s", [42])) # -.-
14:11 camelia nqp-jvm: OUTPUT«No registered operation handler for 'sprintf'␤  in compile_op␤  in as_jast␤  in as_jast␤  in <anon>␤  in process_args␤  in <anon>␤  in <anon>␤  in compile_op␤  in as_jast␤  in as_jast␤  in <anon>␤  in compile_all_the_stmts␤  in as_jast␤  in as_jast␤  in <anon>␤  in compi…
14:11 FROGGS ?
14:12 FROGGS nqp-jvm: say(sprintf("%s", [42])) # -.-
14:12 camelia nqp-jvm: OUTPUT«Lexical '&sprintf' not found␤  in <anon>␤  in <anon>␤  in eval␤  in evalfiles␤  in command_eval␤  in command_line␤  in MAIN␤  in <anon>␤  in <anon>»
14:12 FROGGS hmpf
14:13 FROGGS nqp-jvm: say(nqp::sprintf("%d", [42])) # where is the error??
14:13 camelia nqp-jvm: OUTPUT«No registered operation handler for 'sprintf'␤  in compile_op␤  in as_jast␤  in as_jast␤  in <anon>␤  in process_args␤  in <anon>␤  in <anon>␤  in compile_op␤  in as_jast␤  in as_jast␤  in <anon>␤  in compile_all_the_stmts␤  in as_jast␤  in as_jast␤  in <anon>␤  in compi…
14:14 timotimo nqp: say(+^4)
14:14 camelia nqp: OUTPUT«Confused at line 2, near "say(+^4)"␤current instr.: 'panic' pc 14721 (src/stage2/gen/NQPHLL.pir:5232) (src/stage2/gen/NQPHLL.nqp:279)␤»
14:14 timotimo what's the "bitwise negation" op?
14:14 timotimo in nqp?
14:14 timotimo nqp: say(+!4)
14:15 camelia nqp: OUTPUT«0␤»
14:15 FROGGS nqp-jvm$ ./nqp -e 'say(nqp::sprintf("%d", [42]))'
14:15 FROGGS 42
14:15 timotimo nqp: say(^4)
14:15 camelia nqp: OUTPUT«Confused at line 2, near "say(^4)"␤current instr.: 'panic' pc 14721 (src/stage2/gen/NQPHLL.pir:5232) (src/stage2/gen/NQPHLL.nqp:279)␤»
14:15 FROGGS r: say +^4
14:15 camelia rakudo c0814a: OUTPUT«-5␤»
14:15 FROGGS timotimo: I think nqp has no such op
14:15 timotimo nqp: say(nqp::bitneg_i(4))
14:15 camelia nqp: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I5003')␤ in file '(file unknown)' line 150638363␤␤␤»
14:15 timotimo nqp: say(nqp::bitneg(4))
14:15 camelia nqp: OUTPUT«Error while compiling block : Error while compiling op call (source text: "nqp::bitneg(4)"): Error while compiling op bitneg (source text: "nqp::bitneg(4)"): No registered operation handler for 'bitneg'␤current instr.: '' pc 51451 (src/stage2/QAST.pir:18765) (src/stage2/QAST…
14:15 timotimo mhm
14:16 timotimo bitneg_i does exist, though
14:16 FROGGS but what is wrong with this nqp-jvm here? why is nqp::sprintf not known? is it that old?
14:16 timotimo nqp: say(nqp::bignet_i(5))
14:16 camelia nqp: OUTPUT«Error while compiling block : Error while compiling op call (source text: "nqp::bignet_i(5)"): Error while compiling op bignet_i (source text: "nqp::bignet_i(5)"): No registered operation handler for 'bignet_i'␤current instr.: '' pc 51451 (src/stage2/QAST.pir:18765) (src/sta…
14:16 timotimo nqp: say(nqp::bitneg_i(5))
14:16 camelia nqp: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I5003')␤ in file '(file unknown)' line 145534747␤␤␤»
14:17 FROGGS it wants a PMC
14:17 timotimo ah, is that so?
14:17 FROGGS I think so
14:17 timotimo nqp: say(nqp::bitneg_i(nqp::box_i(5, Int)))
14:17 camelia nqp: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I5003')␤ in file '(file unknown)' line 161157783␤␤␤»
14:17 timotimo how do i do that again?
14:18 FROGGS QAST::Operations.add_core_pirop_mapping('bitneg_i', 'bnot', 'Ii', :inlinable(1));
14:18 timotimo multi prefix:<+^>(int $a) { nqp::bitneg_i($a) } <- this is in rakudo, isn't that a native int?
14:18 FROGGS yes
14:19 Traceur joined #perl6
14:20 Traceur joined #perl6
14:20 timotimo nqp: say(nqp::bitneg_i(nqp::box_i(5, int)))
14:20 camelia nqp: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I5003')␤ in file '(file unknown)' line 42␤␤␤»
14:20 timotimo nqp: say(nqp::bitneg_i(nqp::box_i(5, 'int')))
14:20 camelia nqp: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I5003')␤ in file '(file unknown)' line 42␤␤␤»
14:20 timotimo nqp: say(nqp::bitneg_i(nqp::box_i(5, 'Int')))
14:20 camelia nqp: OUTPUT«error:imcc:syntax error, unexpected IREG, expecting '(' ('$I5003')␤ in file '(file unknown)' line 42␤␤␤»
14:20 timotimo i don't even ...
14:24 * [Coke] wonders if anyone is looking into fixing "is dynamic" for the jvm. that broke a bunch of tests when it went in.
14:32 bearman joined #perl6
14:34 prammer joined #perl6
14:34 timotimo what's the syntax for an int constant in nqp? :o
14:34 timotimo neither my int constant $foo nor my constant int $foo seem to work
14:35 timotimo apparently there isn't even constant in nqp
14:36 ssutch joined #perl6
14:38 Psyche^_ joined #perl6
14:39 lizmat joined #perl6
14:39 timotimo nqp: my @l; @l[1] := 1;
14:39 camelia nqp:  ( no output )
14:41 dmol joined #perl6
14:43 bbkr joined #perl6
14:48 dalek Perlito: 14d237e | (Simon Bertrang)++ | src5/lib/Perlito5/XS/Emitter.pm:
14:48 dalek Perlito: Perlito5 - XS - fix escape_string escape handling
14:48 dalek Perlito: review: https://github.com/fglock/Perlito/commit/14d237e213
14:48 dalek Perlito: c1ac75d | (Simon Bertrang)++ | / (4 files):
14:48 dalek Perlito: Perlito5 - XS - implement some parts of print
14:48 dalek Perlito: review: https://github.com/fglock/Perlito/commit/c1ac75dd82
14:50 timotimo nqp: say(4 +> 1)
14:50 camelia nqp: OUTPUT«Confused at line 2, near "say(4 +> 1"␤current instr.: 'panic' pc 14721 (src/stage2/gen/NQPHLL.pir:5232) (src/stage2/gen/NQPHLL.nqp:279)␤»
14:50 timotimo nqp: say(nqp::bitshift_r(4, 1))
14:50 camelia nqp: OUTPUT«Error while compiling block : Error while compiling op call (source text: "nqp::bitshift_r(4, 1)"): Error while compiling op bitshift_r (source text: "nqp::bitshift_r(4, 1)"): No registered operation handler for 'bitshift_r'␤current instr.: '' pc 51451 (src/stage2/QAST.pir:1…
14:50 timotimo nqp: say(nqp::bitshiftr_i(4, 1))
14:50 camelia nqp: OUTPUT«2␤»
14:51 pmurias timotimo: are you porting the octane benchmarks? ;)
14:52 timotimo only the richards one so far
14:53 dalek Perlito: 4ed2c2a | (Simon Bertrang)++ | / (4 files):
14:53 dalek Perlito: Perlito5 - XS - add a warn implementation
14:53 dalek Perlito: review: https://github.com/fglock/Perlito/commit/4ed2c2a70f
14:53 Traceur joined #perl6
14:58 moritz are the folks here at YAPC::EU planning to have dinner together? I'd join you this time :-)
15:01 timotimo nqp: class Foo { has $.a }; my $a := Foo.new(); $a.a := 100; say($a.a)
15:01 camelia nqp: OUTPUT«Unable to parse expression in blockoid; couldn't find final '}' at line 2, near "has $.a };"␤current instr.: 'panic' pc 14721 (src/stage2/gen/NQPHLL.pir:5232) (src/stage2/gen/NQPHLL.nqp:279)␤»
15:01 timotimo have to create custom accessors, yes?
15:02 moritz yes
15:02 timotimo how do i create a nqp::list prepopulated with $num 0s?
15:02 ajr joined #perl6
15:04 timotimo nqp: my @a; nqp::setelems(@a, 1000); say(+@a);
15:04 camelia nqp: OUTPUT«1000␤»
15:04 timotimo oh, neato
15:04 timotimo nqp: my @a := nqp::list_i(); nqp::setelems(@a, 1000); say(+@a); say(@a[0]);
15:04 camelia nqp: OUTPUT«get_number() not implemented in class 'ResizableIntegerArray'␤current instr.: '' pc 55 ((file unknown):46) (/tmp/VIlG8Kt7WR:1)␤»
15:04 timotimo nqp: my @a := nqp::list_i(); nqp::setelems(@a, 1000); say(@a[0]);
15:04 camelia nqp: OUTPUT«0␤»
15:04 timotimo nqp: my @a := nqp::list_i(); nqp::setelems(@a, 1000); say(@a[50]);
15:04 camelia nqp: OUTPUT«0␤»
15:04 timotimo that's neat :)
15:04 timotimo nqp: my @a := nqp::list_i(); nqp::setelems(@a, 1000); say(@a[500000]);
15:04 camelia nqp: OUTPUT«0␤»
15:04 timotimo oh, that's how it is.
15:06 timotimo how performant are these accessors that have a *@ argument and decide based upon +@foo wether to set or return? :|
15:07 pmurias +
15:08 pmurias timotimo: compared to what?
15:08 timotimo compared to having two methods
15:11 pmurias a method call seems much more expensive then an if
15:11 pmurias rakudo uses the ones with a *@
15:11 pmurias so the benchmark should use those
15:12 timotimo ok
15:13 berekuk joined #perl6
15:14 btyler_ joined #perl6
15:14 dalek rakudo-js: 58fd0bf | (Pawel Murias)++ | run (3 files):
15:14 dalek rakudo-js: Implement nqp::setcontspec, nqp::assign, nqp::assignunchecked.
15:14 dalek rakudo-js:
15:14 dalek rakudo-js: Pass test 67.
15:14 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/58fd0bfe15
15:15 pmurias down to one failing test in nqp/t/nqp :)
15:16 pmurias (which compiles rules at runtime and so requires bootstraping or tricks I'm not willing to use)
15:16 tadzik nice!
15:17 FROGGS pmurias: so, next big thing is bootstrapping?
15:17 moritz pmurias++
15:17 pmurias nqp/t/qregex
15:18 FROGGS ahh, I see
15:34 SmokeMachine joined #perl6
15:35 egor joined #perl6
15:36 benabik joined #perl6
15:37 ajr_ joined #perl6
15:46 nebuchadnezzar joined #perl6
15:51 timotimo okay, back to work on richards
15:52 denis_boyun joined #perl6
15:52 timotimo does "var peek, next = queue" in js work like "var peek = queue; var next = queue;"?
15:53 PerlJam timotimo: no, only next would be assigned; peek would still be undefined.
15:54 timotimo ah, ok
15:54 FOAD joined #perl6
16:00 p5eval joined #perl6
16:00 p5eval left #perl6
16:01 timotimo i'm getting "error while compiling op bind (source text: ":=") first child of a bind op must be a qast::var"
16:01 timotimo apparently comes from "return self"
16:01 dmol joined #perl6
16:02 timotimo why can't i return self? :|
16:03 slava joined #perl6
16:03 timotimo nqp: class Test { method foo() { return self } }; say(Test.new())
16:04 camelia nqp: OUTPUT«Test<1066528866>␤»
16:04 timotimo huh, i can apparently do that
16:04 timotimo ah, ok, i commented out the return self and it still shows that in the source text
16:05 timotimo oh of course
16:08 timotimo how do i method new in nqp? >_>
16:09 timotimo ah, self.CREATE, then bindattr? hm.
16:09 kaare_ joined #perl6
16:09 dmol joined #perl6
16:12 berekuk joined #perl6
16:14 xinming joined #perl6
16:16 dmol joined #perl6
16:19 p5eval joined #perl6
16:20 rindolf joined #perl6
16:21 silug joined #perl6
16:23 FOAD joined #perl6
16:31 timotimo d'oh. there's some error in my richards translation
16:31 spider-mario joined #perl6
16:34 timotimo somehow a ResizableIntegerArray is making its way to a place where it really shouldn't go
16:34 kbaker joined #perl6
16:34 timotimo ah. it's always good to actually return the object you created from a .new
16:38 colomon joined #perl6
16:38 timotimo can't tell if benchmark wrong or running ...
16:39 timotimo how long is such a richards run supposed to take? well, for nqp probably a few minutes >_>
16:40 timotimo it kind of deadlocks :|
16:43 EvanTeitelman joined #perl6
16:47 timotimo missing methods with 1 passed argument apparently don't err out when they are called
16:49 SamuraiJack joined #perl6
16:49 bbkr_ joined #perl6
16:55 FROGGS joined #perl6
16:56 timotimo ah the classic while loop without incrementing the counter
16:56 genehack joined #perl6
16:59 denisboyun joined #perl6
17:08 skids joined #perl6
17:18 geekosaur joined #perl6
17:20 l30n1du5 joined #perl6
17:26 segomos that is a classic
17:27 timotimo my richards scheduler seems to just throw away the tasks after running them once or something :|
17:30 berekuk joined #perl6
17:34 timotimo ah, my "STATE_SUSPENDED_RUNNABLE" constant was actually more like RUNNING_RUNNABLE
17:34 timotimo >_>
17:34 SmokeMachine joined #perl6
17:40 domidumont joined #perl6
17:41 spider-mario joined #perl6
17:52 spider-mario joined #perl6
17:59 btyler joined #perl6
18:01 timotimo i cannot fathom how the original code is supposed to be right, this just makes no sense to me
18:01 timotimo the scheduler is waiting for a tcb to be "neither suspended nor held" and will skip over them if they are either of those
18:02 timotimo if a tcb has .run called on it and it is "suspended runnable", which three of my tcbs are, it will start running, but it never gets allowed to run because of the "neither suspended nor held" requirement
18:03 timotimo and when a resource is released, it removes the held bit, but that isn't set for any of the tcbs
18:10 Vlavv joined #perl6
18:11 timotimo my implementation of "neither suspended nor held" was incorrect ...
18:16 abnorman joined #perl6
18:23 dalek v5: 1689592 | (Tobias Leich)++ | STATUS.md:
18:23 dalek v5: fudged sprintf2.t and pack.t
18:23 dalek v5: review: https://github.com/rakudo-p5/v5/commit/1689592709
18:29 sqirrel joined #perl6
18:39 timotimo i made it work finally
18:42 slava is it possible to compile perl6 to pbc?
18:43 slava or does it have to be pir and then something else uses pbc
18:43 zwut00 joined #perl6
18:43 FROGGS perl6 --target=pbc -e '1'
18:44 FROGGS ohh no
18:44 PerlJam I don't think that actually works.
18:44 PerlJam (not sure if it ever did)
18:44 FROGGS slava: it looks like nqp/perl6 emits pir, and parrot compiles it to pbc
18:45 slava going to have to play with it :), I wonder if there is any speed up that can be head by having pbc
18:46 PerlJam slava: you'd only save on the "parsing the program" step, which is (generally) small compared to the rest of the execution.
18:46 slava I see
18:46 slava also, grammars are cool. :D
18:47 denis_boyun joined #perl6
18:48 FROGGS PerlJam: I must disagree, when writing the SDL module, the execution speed difference was enormous
18:48 FROGGS (precompiled using ufo <=> normal way)
18:48 FROGGS that was eight months ago though
18:49 FROGGS hmmm, maybe I just remember wrong
18:49 PerlJam slava: Do it and let us know the results :)
18:49 PerlJam (blog about them even!)
18:50 timotimo r: my int $foo = 8; $foo +>= 1; say $foo
18:50 camelia rakudo c0814a: OUTPUT«Cannot modify an immutable value␤  in block  at src/gen/CORE.setting:15312␤  in block  at /tmp/WWFiKPb0UW:1␤␤»
18:50 timotimo r: my Int $foo = 8; $foo +>= 1; say $foo
18:50 camelia rakudo c0814a: OUTPUT«4␤»
18:50 timotimo that's a pretty operator
18:51 FROGGS interesting
18:53 timotimo can i pre-initialise list slots for a perl6-List, too?
18:53 timotimo er, or an array?
18:55 xinming joined #perl6
18:57 FROGGS you can splice elements to it, but I dunno how efficient this is :/
18:57 timotimo these lists are supposed to be very small anyway, so it's no big deal
18:58 not_gerd joined #perl6
18:58 not_gerd slava: you can precompile modules, but not scripts
18:59 FROGGS yeah, I mean parrot offers FixPMCArrays and setting list sizes... but I guess this isn't exposed to perl6 land
18:59 not_gerd slava: it's a two-step process: .pm -> .pir via perl6 and .pir -> .pbc via parrot
18:59 * timotimo is porting the richards benchmark over to perl6
18:59 not_gerd I actually made it work in a single step, but that was never merged
19:01 slava not_gerd: two step is fine (I don't think it's a big deal, since it can be easily scripted)
19:01 slava not_gerd: by precompile, you mean pm to pir?
19:02 not_gerd slava: ultimately, pm to pbc
19:03 timotimo r: constant int foo = 10;
19:03 camelia rakudo c0814a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/cKBCUFjW9yâ�¤Missing initializer on constant declarationâ�¤at /tmp/cKBCUFjW9y:1â�¤------> [32mconstant int [33mâ��[31mfoo = 10;[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        pref…
19:03 timotimo is the "int" wrong here?
19:04 not_gerd timotimo: NYI as far as I know
19:07 telex joined #perl6
19:29 timotimo i'm annoyed that Rakudo::Debugger can't be built
19:29 FROGGS :/
19:30 timotimo "error:imcc:loadlib directive could not find library `perl6_group' in file 'perl6-debug.pir' line 1"
19:30 timotimo i don't even ...
19:32 FROGGS I believe this is due to the jvm refactorings... there was once a perl6_group, but now it is called --vmlibs=perl6_ops, you can see that in the makefiles
19:32 timotimo ....oh?
19:33 frettled joined #perl6
19:34 FROGGS timotimo: https://github.com/rakudo/rakudo/commit/15df62e68f214bb0d4275315373144e0a81eff85#diff-9
19:34 FROGGS so, it broken now for about 3 months
19:35 timotimo that makes it work
19:35 FROGGS cool
19:35 timotimo nobody used to be able to help me fix that
19:35 timotimo for AGES
19:35 FROGGS :o)
19:35 timotimo and then you're just like "ah yeah, just change this bit here in the makefile"
19:35 timotimo couldn't you have done that a bit earlier? :(
19:35 FROGGS I remember because I had to adjust v5's makefile too
19:35 timotimo i've had to cope without the debugger for a loooong time ;_;
19:36 FROGGS ó.ò
19:36 FROGGS poor timotimo
19:36 Mouq joined #perl6
19:36 timotimo huh
19:36 timotimo not work, just build.
19:37 jaffa4 joined #perl6
19:37 FROGGS error message?
19:38 timotimo null pmc access in get_pmc_keyed, method mu not found for invocant of class parcel
19:38 not_gerd left #perl6
19:38 FROGGS --ll-exception?
19:38 FROGGS where does this happen?
19:39 celesta joined #perl6
19:39 celesta ahoi #perl6
19:39 jaffa4 hi all
19:39 jaffa4 What backends are made based on qast?
19:40 FROGGS $ ./p5 'say sprintf "%1.1s", "abc"'
19:40 FROGGS Perl5: a␤
19:40 FROGGS v5:    '1.1s' is not valid in sprintf format sequence '%1.1s'
19:40 FROGGS # another TODO for JVM's nqp::sprintf
19:40 timotimo perl6-debug.nqp lines 445 -> 1 -> 489 -> NQPHLL and compiler, p6d.nqp -> line 445, some more nqphll, qregex, grammar, perl6-debug line 403, ...
19:40 FROGGS jaffa4: nqp and rakudo uses qast
19:41 jaffa4 what else?
19:41 FROGGS v5 as a smaller project
19:41 FROGGS timotimo: might make sense that I try to debug at on my machine
19:42 moritz well, all the backends use QAST, because QAST ist what they get from the frontend
19:47 timotimo when i type 'say "hello"' into the rakudo::debugger shell, i get null pmc access in pmc_get_keyed
19:47 timotimo when i type 1, it says "unable to load setting core maybe it's missing you_are_here?"
19:52 FROGGS timo
19:53 timotimo that's me
19:53 FROGGS timotimo: first you get the NPMC-Access, after that you get the other error
19:53 timotimo rakudo::debugger probably missed to chase some changes in the compiler/grammar/...
19:53 timotimo yeah, in two separate lines
19:54 timotimo when running my richards script through it
19:54 timotimo https://gist.github.com/timo/5a86e4e2df103f401767
19:57 denis_boyun joined #perl6
19:58 FROGGS yeah, I get almost the same for ./perl6-debug --ll-exception -e '1'
19:59 FROGGS I have no idea what to do now
20:01 stevan_ joined #perl6
20:04 denis_boyun_ joined #perl6
20:13 prammer joined #perl6
20:18 jaffa4|2 joined #perl6
20:32 * [Coke] casts a yapc asia jnthn++ to his tv and is surprised at jnthn-voice.
20:34 FROGGS [Coke]: why surprised?
20:35 [Coke] first time I've heard him speak, I think
20:36 FROGGS ahh, okay
20:36 PerlJam [Coke]: what did you expect him to sound like?  :)
20:38 dalek perl6-roast-data: b4246f3 | coke++ | / (5 files):
20:38 dalek perl6-roast-data: today (automated commit)
20:38 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/b4246f3c81
20:43 [Coke] PerlJam: I have no idea. ;)
20:43 [Coke] apparently a different british.
20:46 [Coke] http://stackoverflow.com/questions/18234971/make-perl-script-work-in-both-perl-5-and-6
20:47 PerlJam wow
20:47 PerlJam I wonder why he thinks it "needs" to run on both P5 and P6?
20:48 tadzik boss requires that? :P
20:48 colomon future proofing by making it totally unworkable now?
21:03 masak o/
21:03 celesta \o hej masak
21:04 masak celesta: hi!
21:04 timotimo "I seem to recall that Perl6 originally had a design goal of being able to execute Perl5 code [citation needed], but I don't think that's been done, and I wouldn't count on it ever actually happening." - someone's become cynical over the last 13 years
21:05 masak who are you quoting?
21:06 masak to some extent, that's already "actually happening".
21:06 timotimo the stackoverflow conversation
21:07 * masak looks
21:08 masak yeah, the question seems... ambitious.
21:08 masak std: $]
21:08 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $] variable; in Perl 6 please use $*PERL_VERSION at /tmp/zZkKFxyvyB line 1:�------> [32m$][33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 41m�»
21:09 timotimo catch that exception! :)
21:09 masak it's interesting how "[citation needed]" has come to need "don't take my word for it".
21:10 timotimo it seemed more like "i don't even believe it" or something
21:12 [Coke] ~.
21:12 masak I read it as "this is how I seem to remember it, but an actual source would be a good thing to confirm"
21:13 timotimo right, i'm just cynical sometimes
21:13 [Coke] figured someone here would be motivated to citate.
21:13 [Coke] (yes, I know that isn't a word. :P)
21:14 lue S01 should placate citeless fears
21:14 geekosaur citing sites lest someone be psyched?
21:15 * masak .oO( it's not "citate", it's "tricarboxylic acid cycle" )
21:16 dayangkun joined #perl6
21:17 nugged joined #perl6
21:17 slava would it be safe to assume that the modules that come with rakudo* are part of 'core' ?
21:17 FROGGS no
21:17 masak no
21:18 tadzik on
21:18 FROGGS it is just like strawberryperl bundles useful modules
21:18 tadzik we have 3 core
21:18 masak slava: when dealing with Perl 6, you need to assume a whole lot of "distributedness", and not so much "officialness".
21:18 FROGGS but these arn't core either
21:18 lizmat joined #perl6
21:18 tadzik slava: http://perlgeek.de/blog-en/perl-6/how-core-is-core.html
21:20 lue How existing is the use v5 in rakudo?
21:23 FROGGS I think it is awesome :P
21:24 lue would I be able to suggest its usage to the stackoverflow question, or would that answer be more a "when it's ready..." ?
21:24 FROGGS but if you meant how useful it is, then I re-ask: how useful is Perl 5 without all the cool modules? because I'd think that none of them will work yet
21:25 FROGGS I'd wait before advertising v5
21:27 lue alrighty then. I kinda want to mention v5 as something as planned (too bad I can't leave comments on stackoverflow yet).
21:27 PerlJam lue:  Why?
21:27 PerlJam lue: Why not wait until it's "ready" (whatever that means) then tell people it exists?
21:28 lue quote: "add comment (requires 50 reputation)"
21:28 PerlJam lue: sorry, that was "Why do you want to mention that v5 is something that's planned?"
21:29 lue Because current discussion on the question seems to be saying that "P5 and P6 are completely different, what you want is hopeless" when that is (eventually) not the case.
21:29 lue I won't mention it though, since it's really only appropriate as a comment methinks.
21:29 masak Perl 5 and Perl 6 *are* different in the sense that they are different runloops.
21:30 masak I'm sometime hesitant to go all the way and call them different languages, even though that is the community consensus. there's some sense in which they are and some in which they are not.
21:30 PerlJam lue: even with the existence of v5, I think what he wants is hopeless if only because he seems to be all sorts of confused about what he wants.  :)
21:30 lue It'd just be nice to dispel the implied conclusion that P5 and P6 cannot coexist in the same file.
21:31 slava tadzik: thanks, that makes sense
21:31 masak lue: yes, but if we're not quite there yet (according to the main developer of v5), then it might not be time to tell about it.
21:31 masak yet.
21:31 lue which is why I agreed not to. yet. :)
21:32 FROGGS :o)
21:34 PerlJam I also find it interesting that the guy said "This code works on both versions or perl without error:"
21:34 slava that actually confused me
21:35 lue r: say $]
21:35 camelia rakudo c0814a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/bQ267__iqCâ�¤Non-declarative sigil is missing its nameâ�¤at /tmp/bQ267__iqC:1â�¤------> [32msay [33mâ��[31m$][0mâ�¤    expecting any of:â�¤        argument listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤Â»â€¦
21:35 lue std: say $]
21:35 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $] variable; in Perl 6 please use $*PERL_VERSION at /tmp/30I9vo1peV line 1:�------> [32msay $][33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 42m�»
21:35 PerlJam yes, he clearly did not execute that code on a Perl 6 compiler.  So what were "both" versions?
21:35 masak lue: feel free to submit rakudobug.
21:36 lue oh. I was just testing the most suspicious part of the "Works on Perl 6 too" example in the question.
21:36 * lue files rakudobug
21:37 sorear joined #perl6
21:40 slava lol
21:40 slava shouldn't something like $} have a twigil and a more descriptive name?
21:40 slava wait, nvm, it does say what to use
21:42 masak yeah, we tend to provide "next steps" in the Perl 6 error messages.
21:43 TimK1 joined #perl6
21:44 lue I can't recall the specifics anymore, but I remember a couple times where I wish I could turn off the P5 errors to use otherwise-valid P6 code.
21:44 masak std: say
21:44 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/xYV7ed74t1 line 1:�------> [32msay[33m�[31m<EOL>[0m�Check failed�FAILED 00:00 41m�»
21:44 masak std: say #OK
21:44 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/GsLXHKh1JA line 1:�------> [32msay[33m�[31m #OK[0m�Check failed�FAILED 00:00 41m�»
21:45 masak oh, that one isn't suppressible.
21:46 timotimo std: say()
21:46 camelia std c2215f0: OUTPUT«ok 00:00 41m␤»
21:46 lue r: say <>; # what if I wanted a simple-to-type empty list and I also hate seemingly unnecessary spaces, thus ruling out < > ?
21:46 camelia rakudo c0814a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Tgs7yc74p1�Unsupported use of <>; in Perl 6 please use lines() to read input, ('') to represent a null string or () to represent an empty list�at /tmp/Tgs7yc74p1:1�------> [32msay <[33m�[31m>; # what if I…
21:47 PerlJam lue: () is just as easy to type as <>
21:48 masak what PerlJam said.
21:48 lue [This is definitely not that annoying use case I found a long time ago, but it's the only one I thought of quickly.] But... what if I *want* to use angle brackets for their aesthetics?
21:48 masak timotimo: oh! I ususally go `say ''`, because I usually use `say` as a listop.
21:48 FROGGS but it would be cool to have a pragma that says: hey, I am a Perl 6 dev and I know what I do
21:48 PerlJam lue: then we modify your desires so that you conform to the norm  ;)
21:49 masak lue: then you have to wait until Perl 6.7, when they're de-deprecated again because Perl 5 is going out of production.
21:49 masak FROGGS: there will be modules. :)
21:49 FROGGS a module that changes the grammar? :P
21:49 lue My point is that I think a "no P5 warnings" switch/flag/etc. would exist, simply for people (like me) who are not liable to accidentaly a language they never learned.
21:50 lue s/would/should/
21:50 PerlJam lue: I can see that.
21:50 lue FROGGS: sure. Just use a slang :)
21:52 masak right.
21:54 FROGGS one would just have to know out the special_variables category...
21:54 FROGGS knock out*
21:58 * lue is still waiting to be able to implement use X::Insulting
21:58 FROGGS lue: yeaah! I wanna have that too!
21:58 pmurias joined #perl6
21:59 FROGGS "Redeclaration of variable $x you useless lump!"
21:59 lue r: use MONKEY_TYPING; augment class X::AdHoc { supersede method message() { "Humorous Comment: " ~ $.payload.Str } }; die 42; # :(
21:59 camelia rakudo c0814a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/xkfz1ZdWheâ�¤"supersede" not yet implemented. Sorry. â�¤at /tmp/xkfz1ZdWhe:1â�¤------> [32m "Humorous Comment: " ~ $.payload.Str } [33mâ��[31m}; die 42; # :([0mâ�¤    expecting any of:â�¤        method argumentsâ�¤   …
21:59 pmurias timotimo: what are the results of the richards benchmark?
21:59 FROGGS r: use MONKEY_TYPING; augment class X::AdHoc { method message() { "Humorous Comment: " ~ $.payload.Str } }; die 42;
22:00 camelia rakudo c0814a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ZTFT78KGhX�Package 'X::AdHoc' already has a Method 'message' (did you mean to declare a multi-method?)�at /tmp/ZTFT78KGhX:1�------> �»
22:00 lue My example uses the (likely incorrect) assumption that augment means 'modify object' and supersede means 'replace object'
22:00 FROGGS I think your assumption is correct
22:01 masak yeah, I don't know why that use of 'augment' doesn't work.
22:01 xinming joined #perl6
22:01 timotimo r: use MONKEY_TYPING; augment class X::AdHoc { only method message() { "Humorous Comment: " ~ $.payload.Str } }; die 42;
22:01 camelia rakudo c0814a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/bARLhF4FNr�Package 'X::AdHoc' already has a Method 'message' (did you mean to declare a multi-method?)�at /tmp/bARLhF4FNr:1�------> �»
22:02 timotimo r: use MONKEY_TYPING; augment class X::AdHoc { supercede method message() { "Humorous Comment: " ~ $.payload.Str } }; die 42;
22:02 camelia rakudo c0814a: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KY2yjiarxX�Package 'X::AdHoc' already has a Method 'message' (did you mean to declare a multi-method?)�at /tmp/KY2yjiarxX:1�------> �»
22:02 timotimo who knows.
22:02 pmurias timotimo: you have fully ported over the richards benchmark?
22:02 timotimo to nqp, yes
22:02 timotimo to perl6, no.
22:02 pmurias awesome
22:02 lue I personally like the idea of having to use supersede on the method as well as augment the class, as a reminder to myself that I'm replacing an existing method.
22:02 timotimo could not debug it and it behaves strangely
22:02 timotimo want to have it? :)
22:03 pmurias I could take a look
22:03 * pmurias likes debugging others people code ;)
22:04 pmurias timotimo: if you put in on github I can try to fix it
22:05 timotimo can't seem to gist it right noo
22:05 timotimo probably just the multi-file gist problem
22:05 timotimo i'm pretty certain i missed some changes when porting it over from nqp, i made changes here and there
22:05 timotimo oh, i can't create any gists at alls
22:06 * lue would also like the alternate spelling of "supercede", as he somehow continually tries that spelling first. That's one for the modules though, I would guess.
22:06 timotimo gist.github.com/timo/6236138 is the nqp version
22:06 pmurias re nqp version, is there a different version?
22:07 timotimo has both versions
22:07 timotimo refresh please
22:08 pmurias what's the benefit of gist over a repo?
22:09 pmurias timotimo: the perl6 version behaves strangely? or the nqp one?
22:11 timotimo perl6.
22:11 timotimo a gist is a repo, too
22:12 fridim_ joined #perl6
22:12 evant pmurias: Gists are fast. They're like pastebin.
22:12 masak 'night, #perl6
22:12 segomos FROGGS: still trying to figure out where i can override the 'use' keyword, any hints?
22:14 zwut00 left #perl6
22:15 jeff_s1 joined #perl6
22:16 pmurias timotimo: so now we need a benchmarking harness which runs the test multiple, avarages the results, computes a score etc.?
22:16 timotimo that already exists
22:16 timotimo perl6-bench in japhb's account
22:21 pmurias did you try using it with the richards benchmark?
22:22 timotimo not yet
22:22 timotimo i wasn't able to get the perl6 version up before my frustration ceiling has been reached
22:26 pmurias hmm perl6-bench doesn't seem like what we want
22:27 pmurias it seem to run the benchmark every time in a new process, which would make the startup time heavily dominant
22:28 timotimo no
22:28 timotimo it calculates the startup time
22:28 timotimo you need to take a SCALE argument on the commandline that can go down to 0
22:29 pmurias calculates the startup time?
22:29 pmurias how?
22:29 timotimo run a no-work workload
22:31 btyler_ joined #perl6
22:35 pmurias doesn't seem sane
22:36 timotimo you think so?
22:38 pmurias the startup time of a hello world and a bigger thing doesn't have to be equal
22:38 pmurias the richards benchmark can run like 700 hundred time per second on dart
22:38 timotimo uh ...
22:39 timotimo well of course not.
22:39 timotimo that's why you run the benchmark with zero workload
22:39 timotimo and not a hello world
22:40 pmurias https://github.com/dart-lang/benchmark_harness/blob/master/lib/src/benchmark_base.dart seems simple enough for me to port
22:40 timotimo yeah okay but why?
22:41 pmurias for one it would allow better comparision
22:41 pmurias with dart and js
22:43 timotimo haha, you really think we're going to compete?
22:43 timotimo you cray.
23:07 pmurias timotimo: competing and winning are different things ;)
23:09 Colby` joined #perl6
23:10 pmurias timotimo: with enough effort nqp/rakudo-js should be able to compete with dart-js
23:12 berekuk joined #perl6
23:20 celesta good night #perl6

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

Perl 6 | Reference Documentation | Rakudo