»ö« 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.
[Coke] nqp: say(nqp::radix(12345678901234567890,22)) 00:00
camelia nqp: OUTPUT«Error while compiling block : Error while compiling op call (source text: "nqp::radix(12345678901234567890,22)"): Error while compiling op radix (source text: "nqp::radix(12345678901234567890,22)"): Operation 'radix' requires 4 operands, but got 2␤current instr.: '' pc…»
[Coke] nqp: say(nqp::base_I(12345678901234567890,22)) 00:01
camelia nqp: OUTPUT«Error while compiling block : Error while compiling op call (source text: "nqp::base_I(12345678901234567890,22)"): Error while compiling op base_I (source text: "nqp::base_I(12345678901234567890,22)"): Cannot infer type from '-9223372036854775808'␤current instr.: '' pc…»
diakopter [Coke]: not in nqp?
[Coke] I just did an update of perl6/nqp - no moar stuff in srv/mv
*src/vm
nqp: say(nqp::base_I(123456780,22)) 00:02
camelia nqp: OUTPUT«(signal SEGV)»
diakopter [Coke]: moarvm has its own NQP
but it'll be integrated similar to the parrot backend once it's bootstrapped on there
dalek rlito: 0d9f88e | (Flavio S. Glock)++ | / (3 files):
Perlito5 - perl5 - pretty-printer - declarators, subroutines
[Coke] ok.
.to masak: nqp: say(nqp::base_I(123456780,22)) -- SEGV
yoleaux [Coke]: What kind of a name is "masak:"?!
diakopter nqp-jvm: say(nqp::base_I(123456780,22))
[Coke] .to masak nqp: say(nqp::base_I(123456780,22)) -- SEGV 00:03
yoleaux [Coke]: I'll pass your message to masak.
camelia nqp-jvm: OUTPUT«P6int representation does not support natively typed attributes␤ in (/tmp/dHGcM9J1tu:1)␤ in (src/stage2/gen/NQPHLL.nqp:1091)␤ in eval (src/stage2/gen/NQPHLL.nqp:1077)␤ in evalfiles (src/stage2/gen/NQPHLL.nqp:1283)␤ in command_eval (src/stage2/gen/NQP…»
[Coke] nqp-jvm: say(nqp::base_I(123456780,22))
camelia nqp-jvm: OUTPUT«P6int representation does not support natively typed attributes␤ in (/tmp/usvCPaArms:1)␤ in (src/stage2/gen/NQPHLL.nqp:1091)␤ in eval (src/stage2/gen/NQPHLL.nqp:1077)␤ in evalfiles (src/stage2/gen/NQPHLL.nqp:1283)␤ in command_eval (src/stage2/gen/NQP…»
diakopter nqp-m: say(nqp::base_I(123456780,22))
camelia nqp-moarvm: OUTPUT«This representation (P6int) cannot unbox to other types␤ at /tmp/8qEdI36CYf:2 (<ephemeral file>:frame_name_0:4294967295)␤ from nqp-src/NQPHLL.nqp:1084 (./NQPHLLMoar.moarvm:frame_name_671:97)␤ from nqp-src/NQPHLL.nqp:1070 (./NQPHLLMoar.moarvm:eval:87)␤…»
diakopter heh.
00:03 Mouq left
[Coke] guessing this opcode might be slightly undertested. :) 00:03
diakopter I didn't even know moarvm had a base_I op
00:04 Mouq joined
[Coke] nqp: say(nqp::base_I(1,10)); 00:04
camelia nqp: OUTPUT«(signal SEGV)»
diakopter nqp-m: say(nqp::base_I(1,10)) 00:06
camelia nqp-moarvm: OUTPUT«This representation (P6int) cannot unbox to other types␤ at /tmp/R9pXu7BbWl:2 (<ephemeral file>:frame_name_0:4294967295)␤ from nqp-src/NQPHLL.nqp:1084 (./NQPHLLMoar.moarvm:frame_name_671:97)␤ from nqp-src/NQPHLL.nqp:1070 (./NQPHLLMoar.moarvm:eval:87)␤…»
diakopter [Coke]: you like how quickly nqp-m responds over irc? :)
nqp: say(nqp::time_n - nqp::time_n)
camelia nqp: OUTPUT«-1.19209289550781e-06␤»
[Coke] it exploded right quick!
diakopter nqp-jvm: say(nqp::time_n - nqp::time_n) 00:07
camelia nqp-jvm: OUTPUT«0␤»
[Coke] nqp: say(nqp::base_I(nqp::box_i(1),10));
camelia nqp: OUTPUT«Error while compiling block : Error while compiling op call (source text: "nqp::base_I(nqp::box_i(1),10)"): Error while compiling op base_I (source text: "nqp::base_I(nqp::box_i(1),10)"): Error while compiling op box_i (source text: "nqp::box_i(1)"): Operation 'box_i' re…»
diakopter wow, nqp-jvm auto-parallelized that nicely. ;)
[Coke] nqp: say(nqp::base_I(nqp::box_i(1,Int),10));
camelia nqp: OUTPUT«This type cannot box a native integer␤current instr.: '' pc 93 ((file unknown):37544653) (/tmp/IKBYLkZ8mC:1)␤»
diakopter nqp-m: say(nqp::time_n - nqp::time_n)
camelia nqp-moarvm: OUTPUT«-0␤»
diakopter hahahahaha
that's awesome
nqp: say(nqp::base_I((my $a := 1),(my $b := 10)) 00:09
camelia nqp: OUTPUT«Redeclaration of symbol $a at line 2, near ":= 1),(my "␤current instr.: 'panic' pc 14748 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.nqp:279)␤»
diakopter haha that's even better
nqp-jvm: say(nqp::base_I((my $a := 1),(my $b := 10))
camelia nqp-jvm: OUTPUT«Redeclaration of symbol $a at line 2, near ":= 1),(my "␤ in panic (src/stage2/gen/NQPHLL.nqp:279)␤ in variable_declarator (src/stage2/gen/NQP.nqp:2493)␤ in !reduce (src/stage2/gen/QRegex.nqp:667)␤ in !cursor_pass (src/stage2/gen/QRegex.nqp:631)␤ in var…»
diakopter nqp-m: say(nqp::base_I((my $a := 1),(my $b := 10))
camelia nqp-moarvm: OUTPUT«Redeclaration of symbol $a at line 2, near ":= 1),(my "␤panic»
diakopter <shrug>
00:12 Psyche^ joined 00:13 grondilu left, raiph joined 00:16 Psyche^_ left, Mouq left 00:17 pippo joined
pippo r: my $m = mix <a foo a a a a b foo>; say $m.perl; say $m.kv; 00:18
camelia rakudo 93c627: OUTPUT«Mix.new-fp("a"=>5,"foo"=>2,"b"=>1)␤0 a 1 foo 2 b␤»
pippo r: my $m = mix <a foo a a a a b foo>; say $m.perl; say $m.hash.kv; 00:19
camelia rakudo 93c627: OUTPUT«Mix.new-fp("a"=>5,"foo"=>2,"b"=>1)␤a 5 foo 2 b 1␤»
pippo n: my $m = mix <a foo a a a a b foo>; say $m.perl; say $m.hash.kv; 00:20
camelia niecza v24-98-g473bd20: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'mix' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_un…»
pippo n: my $m = mix <a foo a a a a b foo>; say $m.perl; say $m.hash.kv; say $m.pairs; 00:21
camelia niecza v24-98-g473bd20: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'mix' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_un…»
pippo r: my $m = mix <a foo a a a a b foo>; say $m.perl; say $m.hash.kv; say $m.pairs;
camelia rakudo 93c627: OUTPUT«Mix.new-fp("a"=>5,"foo"=>2,"b"=>1)␤a 5 foo 2 b 1␤"a" => 5 "foo" => 2 "b" => 1␤»
[Coke] nqp: my @arr := 1,2,3; say(nqp::push_i(@arr,3));
camelia nqp: OUTPUT«push_integer() not implemented in class 'Integer'␤current instr.: '' pc 70 ((file unknown):50876626) (/tmp/l5e6JyaL8R:1)␤»
[Coke] nqp: my @arr := 1,2,3; say(nqp::push_i(3, @arr));
camelia nqp: OUTPUT«push_integer() not implemented in class 'Integer'␤current instr.: '' pc 76 ((file unknown):46062836) (/tmp/2dWFLc7f9_:1)␤»
00:22 pippo left
[Coke] nqp: my @arr := nqp::split(' ', 'a b c'); say(nqp::push(@arr,"hi")); 00:22
camelia nqp: OUTPUT«[ "a", "b", "c", "hi" ]␤»
[Coke] nqp-jvm: my @arr := nqp::split(' ', 'a b c'); say(nqp::push(@arr,"hi"));
camelia nqp-jvm: OUTPUT«hi␤»
[Coke] let's pick the sane behavior and fix that 00:23
(both of those are different from p5's behavior) 00:24
Ben_Goldberg r: my @a = 1..3; say push @a, 4 00:33
camelia rakudo 93c627: OUTPUT«1 2 3 4␤»
Ben_Goldberg Is the return value of rakudo's push equal to the return value of nqp::push? 00:34
If not, and if nqp::push's return value is not used anywhere within rakudo, then perhaps it doesn't matter? 00:36
Obviously if nqp::push's return value *is* used, then nevermind :), and it obviously needs to be consistant across VMs. :) 00:37
nqp-m: my @a := 'a','b','c'; say(nqp::push(@a,'d'); 00:40
camelia nqp-moarvm: OUTPUT«Confused at line 2, near "say(nqp::p"␤panic»
Ben_Goldberg nqp-m: my @a := nqp::split(' ', 'a b c'); say(nqp::push(@a,'d'); 00:41
camelia nqp-moarvm: OUTPUT«Confused at line 2, near "say(nqp::p"␤panic»
Ben_Goldberg nqp-m: my @arr := nqp::split(' ', 'a b c'); say(nqp::push(@arr,"hi"));
camelia nqp-moarvm: OUTPUT«hi␤»
00:41 slavik left
Ben_Goldberg nqp-m: my @arr := nqp::split(' ', 'a b c'); my $t1 = npq::time; nqp::push(@arr,"hi")); say( nqp::time - $t1 ); 00:43
camelia nqp-moarvm: OUTPUT«Assignment ("=") not supported in NQP, use ":=" instead at line 2, near " npq::time"␤panic»
Ben_Goldberg nqp-m: my @arr := nqp::split(' ', 'a b c'); my $t1 := npq::time; nqp::push(@arr,"hi")); say( nqp::time - $t1 );
camelia nqp-moarvm: OUTPUT«Confused at line 2, near "nqp::push("␤panic»
Ben_Goldberg is just plain confused. 00:44
nqp-jvm: my @arr := nqp::split(' ', 'a b c'); my $t1 := npq::time; nqp::push(@arr,"hi")); say( nqp::time - $t1 );
camelia nqp-jvm: OUTPUT«Confused at line 2, near "nqp::push("␤ in panic (src/stage2/gen/NQPHLL.nqp:279)␤ in comp_unit (src/stage2/gen/NQP.nqp:766)␤ in TOP (src/stage2/gen/NQP.nqp:663)␤ in parse (src/stage2/gen/QRegex.nqp:1190)␤ in parse (src/stage2/gen/NQPHLL.nqp:1369)␤ in…»
Ben_Goldberg nqp-jvm: my @arr := nqp::split(' ', 'a b c'); my $t1 := npq::time; nqp::push( @arr,"hi" ); say( nqp::time - $t1 );
camelia nqp-jvm: OUTPUT«No registered operation handler for 'time'␤ in compile_op (src/stage2/gen/QAST.nqp:230)␤ in as_jast (src/stage2/gen/QAST.nqp:3682)␤ in as_jast (src/stage2/gen/QAST.nqp:2954)␤ in (src/stage2/gen/QAST.nqp:329)␤ in (src/stage2/gen/QAST.nqp:326)␤ in …»
Ben_Goldberg nqp-jvm: my @arr := nqp::split(' ', 'a b c'); my $t1 := npq::time; nqp::push( @arr,"hi" ); my $t2 := nqp::time; say( $t2 - $t1 ); 00:45
camelia nqp-jvm: OUTPUT«No registered operation handler for 'time'␤ in compile_op (src/stage2/gen/QAST.nqp:230)␤ in as_jast (src/stage2/gen/QAST.nqp:3682)␤ in as_jast (src/stage2/gen/QAST.nqp:2954)␤ in as_jast_clear_bindval (src/stage2/gen/QAST.nqp:3993)␤ in (src/stage2/gen/…»
Ben_Goldberg nqp: my @arr := nqp::split(' ', 'a b c'); my $t1 := npq::time; nqp::push( @arr,"hi" ); my $t2 := nqp::time; say( $t2 - $t1 );
camelia nqp: OUTPUT«Error while compiling block : Error while compiling op bind (source text: ":="): Error while compiling op time (source text: "nqp::time"): No registered operation handler for 'time'␤current instr.: '' pc 55082 (src/stage2/QAST.pir:20123) (src/stage2/QAST.nqp:3316)␤»
00:48 PacoAir left 00:55 slavik joined 00:58 btyler joined 01:12 [particle]1 joined 01:35 stevan_ joined, benabik joined 01:40 FROGGS_ joined
diakopter Ben_Goldberg: it's nqp::time_n 01:42
01:44 FROGGS left
[Coke] some things in nqp return -1 on error; others throw exceptions. 01:48
isfilelink vs. mkdir, e.g. 01:49
01:53 stevan_ left
[Coke] die & die_s have the same sig on jvm. why 2 ops? 02:00
diakopter what is the signature 02:04
oh, it's just because of the type system 6model places on top of the jvm type system
it's only half-integrated 02:05
[Coke] there we go, now have tests failing for ops missing from both jvm & parrot. (why do we even have these ops if they're not being used in nqp or rakudo?) 02:06
diakopter which ops
[Coke] (e.g. list_b is missing from the jvm. list_n is missing from parrot)
diakopter just haven't needed them yet I'm sure 02:07
02:12 colomon joined
dalek p: f9a5c28 | coke++ | docs/ops.markdown:
add moar ops. cleanup array params.
02:21
p: 959d4c6 | coke++ | docs/ops.markdown:
Add moar ops, cleanups.

Add new type _b found in a parrot opcode
02:22 araujo left
JimmyZ moar or more? 02:22
[Coke] more 02:23
JimmyZ :-)
[Coke] I'll test the moar (and js) ops once they migrate to the nqp repo itself.
JimmyZ he
[Coke] updated gist.github.com/coke/6799633 with opcode todos. 02:27
feel free to comment with a blurb about an opcode, and I can use that to throw in the docs if you don't want to have to edit the markdown in the repo. 02:28
x_posixerrno seems to violate our no underscores rule.
as do associative_bind, _get, and a few others. 02:29
02:30 bluescreen10 left
dalek rl6-roast-data: ec9cefc | coke++ | / (3 files):
today (automated commit)
02:31
02:40 xenoterracide left, xenoterracide joined, colomon left
lue wonders if four VMs is enough or if we need MoarVMs 02:42
TimToady well volunteered! 02:43
02:45 xenoterracide left
flussence
.oO( I wonder how mortified the world would be if an nqp-zend appeared )
02:50
lue TimToady: well, I still have a latent idea for LLNQP and llakudo that I may feel like tackling someday :)
TimToady nqp-jvm: my @arr := nqp::split(' ', 'a b c'); nqp::push(@arr,"hi"); say(@arr); # just checking 02:52
camelia nqp-jvm: OUTPUT«Cannot stringify this␤ in (src/stage2/gen/NQPCORE.setting:672)␤ in print (src/stage2/gen/NQPCORE.setting:671)␤ in say (src/stage2/gen/NQPCORE.setting:678)␤ in (/tmp/JBPrl6W6Sl:1)␤ in (src/stage2/gen/NQPHLL.nqp:1091)␤ in eval (src/stage2/gen/NQPHL…»
TimToady nqp-jvm: my @arr := nqp::split(' ', 'a b c'); nqp::push(@arr,"hi"); say($_) for @arr; # just checking 02:57
camelia nqp-jvm: OUTPUT«a␤b␤c␤hi␤»
TimToady okay, so it's not a busted split
03:23 aindilis left 03:24 aindilis joined 03:25 aindilis left, aindilis joined 03:28 japhb left 03:33 japhb joined 03:40 japhb__ left, japhb left 03:43 aindilis left, aindilis joined 03:46 logie left 03:51 japhb joined 03:54 japhb__ joined 03:59 preflex_ joined, ChanServ sets mode: +v preflex_ 04:01 preflex left, preflex_ is now known as preflex
Timbus lue, i support llakudo 110% 04:16
diakopter lue: just remember, LLVM doesn't have a GC (though you can emit hooks for your own), or any native system, so you'd have to duplicate essentially all of MoarVM, except for the interpreter, which is actually quite a small part of the VM/runtime system 04:18
*native object system
04:18 btyler left 04:19 ivanshmakov left
diakopter so if you want an llnqp, I recommend starting with MoarVM, and simply emitting the bytecode segments to LLIR 04:19
I say "simply," because it really would be staggeringly simple 04:20
04:22 [particle]1 left
lue diakopter: I'll look into that whenever I regain interest in this idea. Sounds like it'd save me a bunch of time :) 04:22
diakopter jnthn doesn't want to include C++ code or huge dependencies in moarvm's repo, so probably you'd be building from a fork of moarvm, but if you can get it *stupendously awesome* I'm sure jnthn would be okay with adding the necessary hooks to moarvm to plugin such alternative invocation semantics
04:23 [particle] joined 04:25 ivanshmakov joined
JimmyZ C always got karma from C++ here 04:36
04:36 kay joined, kay is now known as Guest83275
lue diakopter: I was assuming I'd be forking it for such a project anyway. 04:37
lue imagines the compiler stack now: Rakudo -> NQP -> MoarVM -> LLVM -> C backend generated code -> gcc -> binary executable :P 04:39
Timbus i would honestly like that 04:44
minus the C stage 04:45
04:52 raiph left 04:56 darutoko joined 05:00 Ben_Goldberg left
lue Timbus: obviously you can just use LLVM's existing stuff to create the binary, but I figured the C backend and gcc were a couple of extra steps I could throw in. Anything more would be pushing it :) . 05:00
(unless the "to binary executable" bit is purely within clang's domain, in which case it gets trickier.)
lue should update his LLVM sometime. 05:01
05:01 raiph joined 05:04 ponpon left 05:10 ponpon joined, ponpon is now known as Guest96073 05:16 raiph left 05:27 jnap left
moritz \o 05:38
05:48 stephenwan left 06:11 SamuraiJack__ joined 06:15 SamuraiJack__ left 06:42 kaare_ joined, xenoterracide joined 06:48 rs0 left, araujo joined 06:56 araujo left 06:58 araujo joined 06:59 patspam left, patspam joined, PZt left, cotto left 07:00 cotto joined 07:20 SamuraiJack_ joined 07:29 SamuraiJack__ joined 07:31 SamuraiJack_ left 07:32 xenoterracide left
FROGGS_ moarning 07:33
07:34 FROGGS_ is now known as FROGGS
moritz yawns 07:41
FROGGS yeah 07:42
masak MOARNING, lambdaparrotbutterflycamels. 07:51
yoleaux 00:03Z <[Coke]> masak: nqp: say(nqp::base_I(123456780,22)) -- SEGV
masak nqp: say(nqp::base_I(123456780,22))
camelia nqp: OUTPUT«(signal SEGV)»
masak cool.
masak submits nqpissue 07:52
07:56 xinming_ joined 07:59 xinming left
masak today's autopun: "There are two kinds of people in this world: those who can extrapolate from incomplete data." 08:07
08:12 Rotwang joined
lizmat o/ 08:21
did anyone notice that github.com/coke/perl6-roast-data/b..._rates.csv is broken ? 08:25
"Hey, did you know this file could be beautiful and searchable if this error is corrected? It looks like row 6 should actually have 11 columns, instead of 10."
08:26 SamuraiJack__ left
masak yeah. 08:27
'2013-10-03-74.93%' should actually be '2013-10-03,74.93%'
I don't know if it's just a matter of committing a patch that fixes that. probably is. 08:28
lizmat
.oO( the automated committer made a typo ;-)
08:33
lizmat assumes it will be fixed with the next automated run 08:34
masak maybe those early bits were written by hand.
and maybe the file is just being appended at the end. (I find that quite likely.)
&
08:54 denisboyun joined 08:55 ksh joined 08:57 GlitchMr left 09:00 xinming_ left
dalek kudo/nom: 694286b | (Elizabeth Mattijsen)++ | src/core/set_operators.pm:
Rename variables to more reflect what they are (KeyBag -> BagHash leftover)
09:01
09:02 GlitchMr joined 09:06 SamuraiJack__ joined 09:10 GlitchMr left 09:12 xinming joined 09:15 GlitchMr joined 09:19 logie joined 09:21 GlitchMr left 09:27 GlitchMr joined 09:32 GlitchMr left 09:37 darutoko left, GlitchMr joined, GlitchMr left
dalek kudo/nom: 1edf477 | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
Hide .new-fp method from .perl output for Baggys (and Mixys currently)
09:38
lizmat .new-fp is really an internal method in my book
and this is also shorter :-)
jnthn new functional programming? 09:39
lizmat r. <a b b c c c>.Bag.perl.say # becomes "(a=>1,b=>2,c=>3).Bag"
r: <a b b c c c>.Bag.perl.say # becomes "(a=>1,b=>2,c=>3).Bag"
camelia rakudo 694286: OUTPUT«Bag.new-fp("a"=>1,"b"=>2,"c"=>3)␤»
lizmat new from pairs
09:42 GlitchMr joined 09:44 daniel-s__ joined 09:45 grondilu joined
lizmat errands& 09:46
09:47 daniel-s_ left 09:49 rindolf joined 09:50 rindolf left 10:11 GlitchMr left 10:14 pippo joined
pippo r: my $m = mix <a foo a a a a b foo>; say $m.perl; 10:15
camelia rakudo 694286: OUTPUT«Mix.new-fp("a"=>5,"foo"=>2,"b"=>1)␤»
10:17 PacoAir joined, GlitchMr joined 10:18 pippo left 10:20 moukeddar joined 10:47 darutoko joined 10:50 dmol1 joined, dmol left 11:02 logie left
grondilu thinks total should be cached for immutable objects 11:10
grondilu thinks of rosettacode.org/wiki/Entropy#Perl_6 and how it computes the total several times 11:11
like: class Bag { has $total; method total { $total //= [+] self.values } } 11:12
I mean: class Bag { has $.total; method total { $.total //= [+] self.values } }
ahh
class Bag { has $!total; method total { $!total //= [+] self.values } }
11:14 Rotwang left 11:17 rindolf joined 11:18 moukeddar left
grondilu also, why is there no more List.bag? 11:22
r: say (my @ = ^10).bag
camelia rakudo 1edf47: OUTPUT«No such method 'bag' for invocant of type 'Array'␤ in block at /tmp/EZ6EGTQXo3:1␤␤»
grondilu n: say (my @ = ^10).bag 11:23
camelia niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Unable to resolve method bag in type Array␤ at /tmp/xeGG19tUN3 line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576) …»
11:24 rindolf left, rindolf joined
grondilu r: sub talk($msg) { say $msg }; "Hi".talk 11:27
camelia rakudo 1edf47: OUTPUT«No such method 'talk' for invocant of type 'Str'␤ in block at /tmp/kd5Ug5rnXR:1␤␤»
grondilu r: sub talk($msg) { say $msg }; "Hi".&talk
camelia rakudo 1edf47: OUTPUT«Hi␤»
grondilu wasn't the translation to .& automatic before? 11:28
(well, maybe not. It would be kind of too much magic. I must be imagining things) 11:30
grondilu needs to re-read S05
moritz grondilu: back in the days there was some mishmash between subs and methods. That was resolved maybe 5 years ago 11:32
11:33 colomon joined 11:38 rindolf left, rindolf joined 11:48 rindolf left 11:49 sqirrel joined 12:03 GlitchMr left 12:05 rindolf joined 12:09 GlitchMr joined 12:15 rindolf left, rindolf joined 12:24 GlitchMr left 12:25 stevan_ joined 12:28 GlitchMr joined 12:31 rindolf left 12:32 rindolf joined 12:33 stevan_ left 12:36 SamuraiJack__ left 12:38 Lorn left 12:39 sqirrel left, sqirrel joined, Lorn_ joined 12:51 rindolf left, rindolf joined 13:11 rindolf left 13:12 rindolf joined 13:24 rindolf left 13:25 rindolf joined 13:26 raiph joined 13:27 dalek left 13:28 sqirrel left, dalek joined, ChanServ sets mode: +v dalek 13:37 rindolf left, rindolf joined 13:44 sisar joined 13:55 stevan_ joined 13:56 _ilbot joined 14:01 _daniel-s__ joined 14:03 rindolf left 14:04 rindolf joined, daniel-s__ left 14:05 PZt joined 14:10 benabik left 14:13 benabik joined 14:19 rindolf left, colomon left 14:20 rindolf joined 14:21 KroKite joined, KroKite left, KroKite joined 14:27 PacoAir left 14:33 rindolf left 14:34 raiph left 14:37 KroKite left
dalek p: 23985aa | jnthn++ | src/NQP/ (2 files):
Add :moar options to QAST::VM nodes.
14:42
diakopter wat.
the first MoarVM commit on #perl6 ? 14:43
14:43 isBEKaml joined
jnthn It has begun... 14:44
And yeah, this is probably the first directly-for-moar commit in the NQP repo
Everything else is going in a branch for now, though.
14:45 bruges left
timotimo very nice :) 14:45
14:45 bruges joined
isBEKaml nice! How's MoarVM coming along? :) 14:46
TimToady it's moar better
diakopter it has moar sauce
isBEKaml OKMOARPLZ!
jnthn isBEKaml: It can self-host NQP fairly well now, next step is getting it bootstrapped and moving the backend support into the NQP repo
TimToady nqp-m: say("MOAR BOOTSTRAPZ!!") 14:47
camelia nqp-moarvm: OUTPUT«MOAR BOOTSTRAPZ!!␤»
isBEKaml jnthn: that's great! I vaguely recall one of the goals for MoarVM being portability - is that still the case? 14:49
I remember talk of making it more easier to port perl6 to other VMs, MoarVM being a step in the way.
TimToady: I saw nqp-m, but never made the connect to MoarVM. SHDBEMOARACTV! :) 14:50
14:51 rindolf joined
grondilu It seems to me than the main goal of MoarVM is performance. Designing a VM finely tuned for perl6 is the strategy adopted with MoarVM. 14:52
isBEKaml grondilu: ah, parrot's last hurrah - yes, that too. I know I should not say 'last' - but heck, it's the only VM that can support perl6. :) 14:54
jnthn isBEKaml: I guess you missed Niecza, and Rakudo's JVM port? ;-)
isBEKaml jnthn: No, I did not :) Niecza and Rakudo JVM were later players. I should have stated it better as early support. 14:56
jnthn: I was more thinking of Allison's parrot-devel mail. 14:57
dalek rl6-roast-data: 5656a3b | coke++ | perl6_pass_rates.csv:
fix date fix
14:59
15:02 stevan_ left 15:06 stevan_ joined 15:07 arnsholt left, xenoterracide joined
[Coke] nqp: my @a:=nqp::split(' ','a b c d'); say(nqp::existspos(@a,2)); 15:08
camelia nqp: OUTPUT«exists_keyed() not implemented in class 'ResizableStringArray'␤current instr.: '' pc 53 ((file unknown):57574396) (/tmp/8eRMqSQNHK:1)␤»
[Coke] nqp-jvm: my @a:=nqp::split(' ','a b c d'); say(nqp::existspos(@a,2));
camelia nqp-jvm: OUTPUT«1␤»
15:08 [Sno] left
[Coke] is that a bug? 15:08
TimToady looks kinda copy/pastey to me 15:09
15:11 xenoterracide left 15:15 rindolf left, rindolf joined
JimmyZ nqp-m: say(nqp::base_I(123456780,22)) 15:16
camelia nqp-moarvm: OUTPUT«This representation (P6int) cannot unbox to other types␤ at /tmp/COZcsz3rRr:2 (<ephemeral file>:frame_name_0:4294967295)␤ from nqp-src/NQPHLL.nqp:1084 (./NQPHLLMoar.moarvm:frame_name_671:97)␤ from nqp-src/NQPHLL.nqp:1070 (./NQPHLLMoar.moarvm:eval:87)␤…»
diakopter moritz: how to get npq-m in #moarvm 15:17
nah, nm, here is good. :)
[Coke] nqp's splice doesn't insert new elements, just removes old ones, yes? 15:18
diakopter should insert 15:19
if it doesn't it's broken
dalek p/moarboot: 7399e16 | jnthn++ | src/vm/moar/HLL/Backend.nqp:
Add a HLL::Backend file for MoarVM.
p/moarboot: 0eda38b | jnthn++ | src/NQP/Compiler.nqp:
We'll likely need a --bootstrap for MoarVM too.
15:21 stevan_ left, stevan_ joined 15:22 xenoterracide joined
[Coke] ah, the args are not in the fiveish order. 15:23
15:25 arnsholt joined 15:26 bruges left
felher really sees forward to a moar-vm powered rakudo. 15:26
I hope it will be especially good in the startup-time department. 15:27
15:27 bruges joined
diakopter it was my understanding that rakudo-parrot's startup time was at least acceptable 15:29
15:29 ksh left
felher diakopter: at may be for most people, and it is for me for a lot of tasks. But I currently don't write my below 50 lines little tiny commandline scripts in Perl6, because it takes a few seconds to start them. 15:32
It's like waiting a few seconds after every 'cd', 'll', or whatever command :)
Little scripts that update my commandline-prompt are totaly out of reach. :) 15:33
I'm not complaining, btw. I think that Perl6 is great and a lot of people have done some really great work. So thanks for that :) 15:34
diakopter felher: okay; you're referring to compile time of the input
felher diakopter: yeah, I have included that. But even if I compile most parts of the programm down to pir it has a long way to go until it can be used to update my prompt :) 15:36
Currently I use perl for a lot of that stuff. :) 15:37
(And ZSH-Shellscripts) 15:38
15:40 denisboyun left 15:42 rindolf left 15:47 isBEKaml left 15:52 moukeddar joined 15:54 [Sno] joined 16:00 zakharyas joined
[Coke] jnthn: Can you describe what, say "nqp::bootint" does? 16:02
is it: return the type object for a native int? 16:03
jnthn [Coke]: Returns a type object provide by the VM that knows how to box a native int.
[Coke] Danke.
and bootnumarray is the same for an array of native ints? 16:05
er, nums
16:07 kaare__ joined, benabik left
[Coke] or is it a native array of native ints? 16:07
:)
FROGGS since there is a bootintarray the num one must be about nums :o) 16:08
[Coke] yes, I keep saying ints there when I mean nums. 16:09
16:09 kaare_ left
FROGGS dunno about the nativeness of the array though, I just can guess that it is about native arrays... 16:10
jnthn [Coke]: Well, if it's storing native ints directly it's by definition a native array I guess ;)
[Coke]: Unless we're using the word differently :)
Anyway, the native is referring to the fact there's no boxing
16:11 stevan_ left 16:12 stevan_ joined 16:13 xenoterracide left 16:14 ssutch left 16:15 ssutch joined
[Coke] for the arrays/hashs, is it about boxing still? or are you just returning the type of a native array (that is potentially just for ints) 16:21
jnthn The type object for a native array 16:24
16:24 xenoterracide joined, PacoAir joined, rindolf joined 16:30 stevan_ left 16:31 KroKite joined 16:36 fridim_ joined 16:37 KroKite left
dalek p/moarboot: f90f0ae | jnthn++ | src/vm/moar/ModuleLoader.nqp:
Pull in a ModuleLoader from Moar's nqp-cc.
16:38
p/moarboot: c47fee1 | jnthn++ | / (2 files):
Stub ConfigureMoar.pl and Makefile-Moar.in.
arnsholt Holy docs, Batman! 16:40
[Coke]++ # docs/ops.markdown 16:41
16:42 rindolf left, rindolf joined
[Coke] arnsholt: got a bit queued up, still. :) 16:43
arnsholt jnthn: Should base_I throw an exception on a non-SMO argument, or convert it to something it can handle? 16:45
jnthn exception 16:46
16:48 SamuraiJack__ joined
JimmyZ nqp-m: say(nqp::base_I(123456780,22)) 16:48
camelia nqp-moarvm: OUTPUT«This representation (P6int) cannot unbox to other types␤ at /tmp/Wfb5Kx_zBK:2 (<ephemeral file>:frame_name_0:4294967295)␤ from nqp-src/NQPHLL.nqp:1084 (./NQPHLLMoar.moarvm:frame_name_671:97)␤ from nqp-src/NQPHLL.nqp:1070 (./NQPHLLMoar.moarvm:eval:87)␤…»
JimmyZ like this?
jnthn The error condition can't occur on MoarVM 16:49
'cus everything is a 6model object
JimmyZ good night 16:50
16:50 logie joined
jnthn o/ 16:50
16:50 xenoterracide left
[Coke] jnthn: your notes for the workshop have a page on Conditional opcodes - where are those defined in the jvm? they're not showing up on my list of missing opcodes. 16:53
(if, unless) 16:54
nevermind, found it. it's programmatic, not a literal. 16:55
jnthn [Coke]: Maybe 'cus if and unless (also some looping ones) are added pro...yes. :)
16:55 logie left 17:01 xenoterracide joined
japhb__ OK, I think I've come up with a new personal definition of "production ready" -- when I don't have to spend time yak-shaving around bugs, and can just write synopses-compliant code and know it will Just Work. 17:05
*grumble*
timotimo mind sharing with us?
japhb__ Type constraint issues. 17:06
timotimo :(
japhb__ (That's today's annoyance, at least)
17:06 xenoterracide left
timotimo at the moment, type constraints almost make your code slower, because it spends so much time checking things over and over again, even if it could prove it doesn't need a typecheck 17:06
but it does seem like typechecks are very cheap 17:07
jnthn They're cheap
For the common cases, anyway
(a class, a role, etc.)
[Coke] weird. the ice cream truck just drove by.
jnthn For subset types it depends what you do int he subset
timotimo of course
and if we have subset types, we may not even be allowed to skip testing
jnthn native types lead to better code-gen so are a win, also
japhb__ In this particular code, I think the original author would happily take a little performance loss, and wants the handcuffs. 17:08
timotimo i understand that sentiment.
jnthn japhb__: So what is the issue, ooc? 17:09
japhb__ sub test(Int $a, Str :$b!, Int :@c) { .WHAT.say for $a, $b, @c }; test(1, :b("bar"), :c(["foo"]))
r: sub test(Int $a, Str :$b!, Int :@c) { .WHAT.say for $a, $b, @c }; test(1, :b("bar"), :c(["foo"]))
camelia rakudo 1edf47: OUTPUT«Nominal type check failed for parameter '@c'; expected Positional but got Array instead␤ in sub test at /tmp/RiNVs6amZd:1␤ in block at /tmp/RiNVs6amZd:1␤␤»
timotimo ah, of course
17:10 stevan_ joined
timotimo there's a problem with type-constraining arrays for parameters like that 17:10
it won't work with lazyness etc, because in that case it would have to reify the whole array before calling
japhb__ (Obviously, that's a snapshot from me being midway through nailing down the borders of the problem.)
timotimo you'll have to pass it already-typed
like this:
17:11 stevan_ left
timotimo r: sub test(Int :@c) { say @c.WHAT }; test(:c(my Int @a = 1, 2, 3)) 17:11
camelia rakudo 1edf47: OUTPUT«(Array[Int])␤»
timotimo it will not infer "this array is full of ints, therefor it must be an Array[Int]!"
17:12 moukeddar left
timotimo japhb__: does that help at all? 17:12
jnthn Array[Int].new(1,2,3) # should also work 17:13
japhb__ timotimo: I think I would have been OK with "Cannot infer type of untyped array" or "expected Positional[Int] but got Array instead", but the error message as written is incorrect.
jnthn yes, the error reporting is unhelpful
timotimo yes, it really should tell you the type constraint there
not sure where to even start for a fix :(
jnthn r: say Positional[Int]
camelia rakudo 1edf47: OUTPUT«(Positional)␤»
jnthn I think that golfs the issue 17:14
timotimo r: given Positional[Int] { say .perl; say .Str; say .gist }
camelia rakudo 1edf47: OUTPUT«Positional␤use of uninitialized value of type Positional in string context in any at src/gen/Metamodel.nqp:1469␤␤␤(Positional)␤»
timotimo so the .perl of Positional should grow a bit of code to output its type, eh?
i can try that
jnthn no, it's the method name in CurriedRoleHOW I think 17:15
17:15 rindolf left
timotimo ... oh 17:15
17:15 rindolf joined
timotimo i'm not sure i follow; it seems to defer its work to the "actual HOW of the thing", so is that a ConcreteRoleHOW? 17:17
japhb__ r: sub test(Int :@c) { say @c.WHAT }; test(:c(my Int @ = 1, 2, 3)) # Can the array be anon?
camelia rakudo 1edf47: OUTPUT«(Array[Int])␤»
17:17 xenoterracide joined
timotimo yes, it can 17:17
jnthn: would i have to add output for @!pos_args and %!named_args into the method name of CurriedRoleHOW? 17:18
dalek p: 28bf31b | coke++ | t/docs/opcodes.t:
Manually add these opcodes to the test
17:20
p: bea2f3b | coke++ | docs/ops.markdown:
Add many more docs.

  jnthn++ for some clarifications.
timotimo is not sure how nameds work in CurriedRoleHOW 17:21
jnthn timotimo: Well, or just take the @pos_args in the new_type method and construct the name at that point. 17:23
timotimo: Can ignore nameds for now
timotimo i've got some code ready now. 17:24
doing a quick commute first, though 17:27
japhb__ r: Array[Int].new(1, 2, "three") 17:30
camelia ( no output )
japhb__ r: my Int @ = 1, 2, "three";
camelia rakudo 1edf47: OUTPUT«Type check failed in assignment to '@'; expected 'Int' but got 'Str'␤current instr.: 'throw' pc 401346 (src/gen/CORE.setting.pir:168706) (src/gen/CORE.setting:10470)␤called from Sub '' pc 138241 (src/gen/CORE.setting.pir:58818) (src/gen/CORE.setting:11793)…»
japhb__ OK, so that's the checked route
jnthn is kinda bothered the other way isn't... 17:31
r: say Array[Int].new(1, 2, "three")
camelia rakudo 1edf47: OUTPUT«1 2 three␤»
jnthn bug
japhb__ Ditto, but trying desperately to avoid further yak shaving right now. :-/
lizmat grondilu: you're confusing bag() object creator function, with the .Bag coercion method
dalek p: 2699523 | coke++ | docs/ops.markdown:
Add more control/loop opcodes
17:32
lizmat r: <a b b c c c>.Bag.perl.say
[Coke] lizmat: fixed the cvs bug, thanks.
camelia rakudo 1edf47: OUTPUT«("a"=>1,"b"=>2,"c"=>3).Bag␤»
jnthn lizmat: The above Array[Int].new bug may be one you know how to fix... :)
lizmat sorry, must have missed that while backlogging: what is the problem again?
17:32 slavik left
jnthn r: say Array[Int].new(1, 2, "three") 17:32
camelia rakudo 1edf47: OUTPUT«1 2 three␤» 17:33
jnthn lizmat: That "three" arg
lizmat r> say Array[Int].new(1, 2, "three").perl
r: say Array[Int].new(1, 2, "three").perl
camelia rakudo 1edf47: OUTPUT«Array[Int].new(1, 2, "three")␤»
lizmat since when is a gist supposed to be producing valid perl code ?
[Coke] anyone want to write up "handle" opcode? it's going to be the one opcode missing from the workshop op notes, i think. 17:34
jnthn [Coke]: Is there not some text from the workshop op notes that explains it? :)
japhb__ lizmat: the problem is that "three" should be failing the type check
lizmat r: <a b b c c c>.Bag.gist.say
jnthn But anyway, something like...
camelia rakudo 1edf47: OUTPUT«bag(a, b(2), c(3))␤»
lizmat ah, ok, 17:35
it's not the gist output you're worried about :-)
japhb__ right. :-)
Ulti r: <a b b c c c>.Bag.perl.say
camelia rakudo 1edf47: OUTPUT«("a"=>1,"b"=>2,"c"=>3).Bag␤»
jnthn The first child of 'handle' is the code to protect with an exception handler. Remaining children come in pairs, the first naming the type of exception to handle and the second being a QAST node specifiying the handler. Valid names include CATCH, CONTROL, LAST, NEXT and REDO.
grondilu lizmat: oh I can use .Bag ? Didn't know. That will do. 17:36
jnthn dinner & 17:37
TimToady grondilu: why are you avoiding .total?
grondilu TimToady: because it's not cache. But really I first meant that I should not redeclare it. 17:38
*cached
TimToady that's up to the implementation whether it caches it, but using [+] yourself is sort of guaranteed pessimization, so I don't see the point 17:39
grondilu and also because it has been recently been added, so not sure it's here to stay.
TimToady well, that's why it's a wiki :)
[Coke] jnthn: I mean, "missing from my conversion of the workshop notes to the docs", sloppy englishing. 17:40
grondilu so you think I should put .total back?
[Coke] why are 'ctx' and 'curlexpad' the same thing on the jvm?
(in nqp) 17:41
grondilu r: say <1 2 2>.Bag.Int 17:42
camelia rakudo 1edf47: OUTPUT«No such method 'Int' for invocant of type 'Bag'␤ in block at /tmp/WBYo8KhadA:1␤␤»
dalek kudo/nom: ae27d10 | (Elizabeth Mattijsen)++ | src/core/ (3 files):
Make Set|Bag|Mix.total caching, as suggested by grondilu++
grondilu wonders if Bag could not cast to Int with the total of its values
lizmat r: say +(<1 2 2>.Bag) 17:43
camelia rakudo 1edf47: OUTPUT«3␤»
17:43 ajr joined
lizmat r: say <1 2 2>.Bag.Num 17:43
camelia rakudo 1edf47: OUTPUT«No such method 'Num' for invocant of type 'Bag'␤ in block at /tmp/6zO1ltZFUh:1␤␤»
timotimo japhb__: i will have a fix for the lta error for the array thing in at most an hour :)
lizmat hmmm…. odd
17:43 ajr is now known as Guest67756, Guest67756 is now known as ajr_
lue hello world o/ 17:43
lizmat r: say <1 2 2>.Bag.Numeric 17:44
camelia rakudo 1edf47: OUTPUT«3␤»
timotimo maybe today i will also look at giving p6bench a setup for the crosscompiled mvmnqp
though if that goes into the main nqp repo soon, i should wait. 17:45
grondilu maybe +Bag should answer the question "How many things are there in the bag?" Though I'm not sure if this means "How many kinds of things are there in the bag?" or "How many things are there in total in the bag?" 17:46
timotimo if it is hard to figure it which one it should be maybe we should do it like strings and give two specific methods 17:48
as in we don't have strlen
17:48 denisboyun joined
grondilu though I tend to think +@a and +@a.Bag should return the same result 17:49
you dont lose stuff when putting them in a bag :)
dalek p: 928285d | coke++ | docs/ops.markdown:
doc Context opcodes
17:50
TimToady well, that means returning .total
grondilu indeed, that would have my preference
TimToady r: my @a = <a a b>; say +@a; say +@a.Bag; say @a.Bag.total
camelia rakudo 1edf47: OUTPUT«3␤3␤3␤»
TimToady looks kinda like it is already doing that, but maybe by accident 17:51
grondilu is confused
TimToady r: my @a = <a a b>; say +@a; say @a.Bag.perl
grondilu oh yeah, I misinterpreted r: say <1 2 2>.Bag.Num earlier
camelia rakudo 1edf47: OUTPUT«3␤("a"=>2,"b"=>1).Bag␤»
japhb__ timotimo: Excellent re: LTA fix. As for perl6-bench, just throw me a pull request if you decide to do it; otherwise I was going to wait for the merge into the NQP repo. 17:52
grondilu r: my @a = (^10).roll(20); say +@a, +@a.Bag
camelia rakudo 1edf47: OUTPUT«2020␤»
grondilu r: my @a = (^2).roll(100); say +@a.Bag 17:53
camelia rakudo 1edf47: OUTPUT«100␤»
TimToady my @a = :a(3), :b(0.14159625); say +@a.Mix
r: my @a = :a(3), :b(0.14159625); say +@a.Mix
camelia rakudo 1edf47: OUTPUT«3.1415963␤»
TimToady \o/
grondilu ok so that's fine
TimToady
.oO(Add supporting detail)
17:54 rindolf left, rindolf joined
sisar r: for (1,2,3).Parcel { $_.WHAT.say; } # Why is the output not just a single "(Parcel)" ? 17:56
camelia rakudo 1edf47: OUTPUT«(Int)␤(Int)␤(Int)␤»
lizmat r: for ((1,2,3).Parcel) { $_.WHAT.say; } 17:57
camelia rakudo 1edf47: OUTPUT«(Int)␤(Int)␤(Int)␤»
lizmat hmmmm
r: for (1,2,3).item { $_.WHAT.say; } 17:58
camelia rakudo 1edf47: OUTPUT«(Parcel)␤»
lizmat r: (1,2,3).WHAT.say
camelia rakudo 1edf47: OUTPUT«(Parcel)␤»
timotimo Nominal type check failed for parameter '@a'; expected Positional,[,Int,[ but got Parcel instead <- not quite m)
lizmat (1,2,3) is already a Parcel, which apparently for {} is flattening ?
TimToady yes, parens flatten in list context 17:59
sisar lizmat: What does .item do ? And shouldn't an explicit .Parcel force it to pass a Parcel ? 18:00
timotimo i'll try to fix the Array[Int].new typecheck thing, too, if you don't mind
jnthn [Coke]: There's no separate context and lexpad objects on the JVM impl, or Moar. On Parrot there are. 18:02
lizmat timotimo: please do :-)
18:04 benabik joined
TimToady r: my $m = Mix(:a(1.5), :b(-1.5)); say $m.elems; say $m.total; say +$m; say ?$m 18:04
camelia rakudo 1edf47: OUTPUT«0␤0␤0␤False␤»
TimToady wonders whether a balanced mix should suddenly turn False like that
I suppose it's useful as is, and you can always do .elems to get the the other 18:05
18:06 stevan_ joined, zakharyas left
grondilu rn: say <foo bar bar>.Bag.elems 18:06
camelia rakudo 1edf47: OUTPUT«2␤»
..niecza v24-98-g473bd20: OUTPUT«3␤»
grondilu ahah
TimToady r: my $budget = Mix(:credits(1.5), :debits(-1.5)); sub balanced($m) { not $m }; say balanced $budget 18:07
camelia rakudo 1edf47: OUTPUT«True␤»
grondilu here I could have expected 2
TimToady that's probably the old autoflatten in list semantics
so .elems implies .flat.elems 18:08
18:08 rindolf left
lizmat yup, elems is just that 18:09
TimToady but bags don't flatten anymore
lizmat because for Mixes, elems would otherwise become a non-Int value
18:09 rindolf joined
TimToady part of the reason for switching to .total is so that .elems could go back to integral 18:10
so niecza++ is just a little behind the times there
r: my $m = Mix(:a(1.5), :b(-1.5)); say $m.elems; # shouldnt' this say 2? 18:12
camelia rakudo 1edf47: OUTPUT«0␤»
lizmat TimToady: checking why that happens
TimToady and if we fix that, do we break ?$m 18:13
well, arguably ?$m could be based on either elems or total
FROGGS +1 for elems 18:15
18:15 rindolf left
lizmat hmmm… there is no "sub Mix" in the core 18:15
how could that work?
TimToady is it more useful for the Mix to go false when the last entry autodeletes, or when the Mix gets into balance?
it's a type, so gets a coercion
lizmat r: my $m = (:a(1.5), :b(-1.5)).Mix; say $m.elems
camelia rakudo 1edf47: OUTPUT«2␤»
TimToady arguable the elems-based approach is more intuitive
lizmat the Mix() creates an empty Mix (silently)
TimToady very interesting, but shtupid 18:17
lizmat hmmm… intriguing
so, Mix() is short for Mix.new() somehow ?
TimToady maybe it thinks they're named args?
r: my $m = Mix((:a(1.5), :b(-1.5))); say $m.elems; 18:18
camelia rakudo ae27d1: OUTPUT«2␤»
lizmat yup, that's it
TimToady yeah
TimToady is not sure coercions should take named args
lizmat
.oO( good to see TimToady bitten by that one )
TimToady thinks coercions should just take a parcel, not a capture 18:19
lizmat a few months back I was suggesting a lexical pragma for complaining about superfluous named parameters to .new
TimToady we've been thinking about that in general for all methods, but it's a lot of overhead to track in the general case
unless a capture provides a way to mark each arg as it's used 18:20
you can't just delete them as you bind them, because some args want to bind multiple times
I can assure you the topic has been on our minds for about ten years already :) 18:22
18:22 stevan_ left
moritz and I kinda fear that lexical scoping will interact weirdly with methods, because method lookup isn't lexical 18:22
dalek kudo/nom: 9f94b8c | (Elizabeth Mattijsen)++ | src/core/ (3 files):
Make sure Int/Num/Numeric/Real work on QuantHashes
TimToady but arguments don't come with last access dates :)
dalek albot/host07: 2105dc2 | moritz++ | freenode.org.conf:
send camelia to #moarvm
18:23
TimToady we can do some analysis on finalized classes to say "no method binds an argument of this name"
that would catch some typos and accidental named args 18:24
18:24 camelia left, camelia joined
TimToady but obviously Mix() is being treated with method semantics on some level to ignore :a(),:b() 18:24
18:25 ChanServ sets mode: +v camelia
timotimo r: my @a := 0, 1 ... *; @a[20]:delete; say @a[20]; 18:30
camelia rakudo ae27d1: OUTPUT«Invocant requires a type object, but an object instance was passed␤ in method delete_pos at src/gen/CORE.setting:1430␤ in block at src/gen/CORE.setting:1818␤ in sub postcircumfix:<[ ]> at src/gen/CORE.setting:2269␤ in sub postcircumfix:<[ ]> at src…»
timotimo what am i doing wrong? 18:31
lizmat feels like a rakudobug to me
18:32 stevan_ joined
arnsholt is really happy he learnt how to force ssh to disconnect 18:32
moritz note that @a isn't an Array
and hence might not support :delete 18:33
may it's just an LTA error
afk
jnthn No, deleting from a sequence doesn't make much sense.
arnsholt masak: Incidentally "Can SEGV the thing [...]" is quite possibly the bestest subject ever =D 18:34
jnthn hah 18:35
lizmat ok, I guess I have a learning moment: Foo(bar) is the same as (bar).Foo ? 18:36
assuming Any.Foo exists ?
is that right ?
jnthn lizmat: Yeah
lizmat some indirect object syntax or something ?
jnthn lizmat: I think the thingy that handles it lives in BOOTSTRAP.nqp 18:37
lizmat: No, just invocation on a type object iirc
lizmat aha, so there must be a class Foo in that case as well 18:38
r: method Foo ( say "Foo" }; Foo(1)
camelia rakudo ae27d1: OUTPUT«===SORRY!=== Error while compiling /tmp/9YXiOFo8qO␤Invalid typename 'say' in parameter declaration.␤at /tmp/9YXiOFo8qO:1␤------> method Foo ( say⏏ "Foo" }; Foo(1)␤»
lizmat r: method Foo { say "Foo" }; Foo(1)
camelia rakudo ae27d1: OUTPUT«Useless declaration of a has-scoped method in mainline␤===SORRY!=== Error while compiling /tmp/Ao45Vp_5X4␤Undeclared name:␤ Foo used at line 1␤␤»
jnthn s/method/class ? :) 18:39
timotimo r: my @a := gather { say "hi"; take 1; say "blubb"; take 2; say "trololo"; take 4; }; map { .say; say "--"; }, @a;
camelia rakudo ae27d1: OUTPUT«hi␤blubb␤trololo␤1␤--␤2␤--␤4␤--␤»
lizmat r: class Foo { say "Foo" }; Foo(1)
camelia rakudo ae27d1: OUTPUT«Foo␤No such method 'Foo' for invocant of type 'Int'␤ in block at /tmp/yoKwC70aBo:1␤␤»
timotimo shouldn't this interleave hi, blubb and trololo between --'s?
i thought map was supposed to be lazy?
18:40 denisboyun left
lizmat r: sub Foo { say "sub Foo" }; class Foo { say "Foo" }; Foo(1) 18:40
camelia rakudo ae27d1: OUTPUT«Foo␤No such method 'Foo' for invocant of type 'Int'␤ in block at /tmp/daF2nCZfG4:1␤␤»
lizmat hmmm.... 18:41
timotimo r: my &b = (* + *); say b(1, 2); 18:43
camelia rakudo ae27d1: OUTPUT«3␤»
timotimo r: my &b = (* + *); say b(1);
camelia rakudo ae27d1: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in block at /tmp/0r1B1g3zXN:1␤␤»
timotimo r: my &b = (* + *); say &b(1);
camelia rakudo ae27d1: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in block at /tmp/Rg8sSeyOYR:1␤␤»
timotimo in the repl this is b0rked
jnthn ? 18:44
lue jnthn: any quick reason [i.e. without gisting any code :)] why my PHPish REPL can't echo variables, but using -e can? Just normal REPL weirdness?
dalek p: 7d58a1e | (Arne Skjærholt)++ | src/vm/parrot/ops/nqp_bigint.ops:
Throw exception in bigint ops if we get passed something that isn't an SMO.
18:45
lizmat timotimo: re @a[20], the @a is a List, not an Array 18:46
r: my @a := 0, 1 ... *; say @a.WHAT
camelia rakudo ae27d1: OUTPUT«(List)␤»
jnthn lue: Does it make a difference if the echo is on the same line or a different line?
lizmat I guess a proper "List.delete_pos" that will create a better error message, would be in order
jnthn lizmat: Well, or just make the one in Any better :) 18:47
lizmat ah, good point
lue jnthn: hey, whaddya know, I should be more thorough in my testing :) . So it's just a result of me not doing the extra work to persist between REPL lines, ja? 18:48
jnthn lue: Yeah, but I don't think it's terribly much work to make it happen 18:50
lue: I think it's just calling a couple of different methods inherited from HLL::Actions and inserting the QAST they return into the right places
lue I don't need it though, so don't feel obligated to write up a how-to on the matter at the moment :) . I just need to remember that the REPL is not always the most trustworthy execution method. 18:52
18:56 darutoko left, sisar left
lizmat $ perl6 -e 'my @a := 0, 1 ... *; @a[20]:delete' 18:56
Can not remove elements from a List
timotimo: that better ? 18:57
GlitchMr rn: (invert bag 1, 2, 3, 2, 1).perl.say
camelia niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Unable to resolve method invert in type Bag␤ at /home/p6eval/niecza/lib/CORE.setting line 2644 (invert @ 4) ␤ at /tmp/iqL7y9i_PF line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at …»
..rakudo ae27d1: OUTPUT«===SORRY!=== Error while compiling /tmp/cLDL7snpZ1␤Undeclared routine:␤ invert used at line 1␤␤»
GlitchMr rn: (bag(1, 2, 3, 2, 1)).invert.perl.say
camelia niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Unable to resolve method invert in type Bag␤ at /tmp/FWjFeVVPSD line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576) …»
..rakudo ae27d1: OUTPUT«(2 => 1, 2 => 2, 1 => 3).list␤»
lizmat r: (1=>2,2=>2,3=>1).hash.invert.perl.say # not different from inverting a hash 18:59
camelia rakudo ae27d1: OUTPUT«(2 => "1", 2 => "2", 1 => "3").list␤»
lizmat S32/Containers:978 Produces a backmapping of values to keys, expanding list values into multiple pairs. 19:01
timotimo where can i find masak's slides on the perl6 regexes? 19:05
19:05 btyler joined
dalek kudo/nom: 11bada4 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
Make :delete give a better error message if not supported on the object
19:10
arnsholt jnthn: Any objections to closing NQP #7? PAST is a bit irrelevant these days, now that we have QAST 19:14
moritz www.gnuplotting.org/klein-bottle/ # I want a Klein bottle 3D printed with Perl 6! 19:22
19:23 logie joined, stevan_ left
TimToady www.bathsheba.com/math/klein/ 19:25
that's a 3D printed klein bottle (opener), but not with Perl 6, I don't think, but maybe I can ask her at the next Hackers Conference... 19:28
moritz adds it to his ever-growing wishlist 19:29
TimToady got one for his mathematician/physicist son a couple years ago for Christmans
*mas 19:30
arnsholt moritz: Ooooh, gnuplotting is very relevant to some of my $dayjobby things. Cheers! 19:31
moritz :-) 19:33
19:34 SamuraiJack__ left 19:45 stevan_ joined 19:47 japhb_ left 19:48 logie left
lizmat jnthn: still trying to grok the code path that "Mix(:a(5)).perl.say" takes 19:49
afaics, it is *not* calling .new on the type object
jnthn lizmat: No
moritz it calls postcircumfix:<( )> on the type object 19:50
jnthn lizmat: It's what I said, it invokes the type object, which is handled by some code in BOOTSTRAP.nqp that turns it into a .Mix method call on the thing inside
moritz aka invocation
lizmat aha, ok
moritz ignore me, listen to jnthn++ :-)
lizmat ok, I see it now
jnthn Well, moritz++ did give the method name to look for in BOOTSTRAP :)
I think thre's some logic in one of the action methods that makes this happen too 19:51
If it spots it's a type name
19:54 atta_ is now known as atta
timotimo github.com/rakudo/rakudo/pull/214 - finally finalised that pull request 19:54
dalek kudo/nom: 4f828fc | (Timo Paulssen)++ | src/Perl6/Metamodel/CurriedRoleHOW.nqp:
for parametric roles, output the parameters, too
19:57
kudo/nom: 0f0eba1 | lizmat++ | src/Perl6/Metamodel/CurriedRoleHOW.nqp:
Merge pull request #214 from timo/parameter_output_for_roles

for parametric roles, output the parameters, too
19:59 japhb_ joined
arnsholt jnthn: NQP has a multi-dispatch cache these days, no? 20:01
jnthn yeah
arnsholt++ # ticket cleanup 20:02
arnsholt 15 more and we're down to a single page =) 20:03
timotimo \o/
20:05 colomon joined, colomon left
arnsholt jnthn: Oldest I've seen so far still relevant is #15 20:05
20:05 hummeleB1 joined
arnsholt nqp: sub foo() { my $old := $*VAR; my $*VAR := "new"; say($old); } my $*VAR := "old"; say("pre"); foo(); say("post"); # NQP #15 20:06
camelia nqp: OUTPUT«Confused at line 2, near "sub foo() "␤current instr.: 'panic' pc 14748 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.nqp:279)␤»
jnthn May be worth doing that
arnsholt nqp: sub foo() { my $old := $*VAR; my $*VAR := "new"; say($old); }; my $*VAR := "old"; say("pre"); foo(); say("post"); # NQP #15
camelia nqp: OUTPUT«pre␤␤post␤»
arnsholt Presumably since all variable declarations happen first in a block
jnthn yeah 20:07
arnsholt Also, are submethods on the map for NQP? 20:08
If they're not, we can close #3 too
japhb__ ssutch: ping 20:09
jnthn Hadn't planned on submethods unless somebody has a good reason to add them...
timotimo is now building typechecks for List.new 20:12
arnsholt Right, I'll close #3 for now then 20:13
20:19 kaare__ left
timotimo r: Array[Int].new(1, 2, "foo"); 20:19
camelia ( no output )
timotimo r: List[Int].new(1, 2, "foo");
camelia rakudo 0f0eba: OUTPUT«===SORRY!===␤Type List cannot accept type arguments␤»
timotimo er ... huh?
jnthn It's Array that is parametric, not List 20:24
timotimo righto 20:25
jnthn (for the time being, at least...)
timotimo so, don't need that for List, yes?
anyway, i moved the code to Array instead, and now i'll build and spectest that.
jnthn right
k
timotimo oh. make spectest is a bad idea on jvm ... it is faster, but real/new failures are harder to spot :( 20:26
moritz timotimo: last I did rakudo-jvm spectest, there was just one failure
dalek p: 4bdbd01 | util++ | docs/serialization_format.markdown:
Fix unescaped special characters in Markdown text (GH #109)
20:27
jnthn CurriedRoleHOW looks good, by the way
20:27 hummeleB1 left
dalek ast: 6a456ab | (Elizabeth Mattijsen)++ | integration/advent2009-day18.t:
Unfudge 3 now passing tests, thanks to timotimo++
20:28
timotimo uh, i can't just move my code over, it's not as simple as i had hoped ;_;
it seems i'll have to look at the descriptor stuff 20:30
dalek p/moarboot: 6a251d9 | jnthn++ | src/vm/moar/stage0/ (9 files):
Add selfhost output as stage0.
20:31
p/moarboot: 3aac7cb | jnthn++ | src/vm/moar/ModuleLoader.nqp:
Some uncommenting/tweaks in Moar module loader.
p/moarboot: 386b361 | jnthn++ | tools/build/Makefile-Moar.in:
Start fleshing out the bootstrap stage1 build.

The --stagestats on the last two mask a segfault, which annoyingly does not segfault under the debugger; maybe other platforms may offer more insight.
tadzik aww yiss
timotimo moar fucking bootcrumps
tadzik :D 20:32
arnsholt Oooooh 20:33
arnsholt is excited
lue feels an urge to update his MoarVM repo and start installin' :D :D :D 20:35
jnthn Well, there's not much to do yet besides build the bootstrap to the half way point I've reached so far :)
20:36 PacoAir left
lue Well, it's about time I updated my MoarVM anyway :) 20:38
by "the debugger", do you mean a general debugger (like gdb) or some MoarVM-specific thing?
jnthn gdb 20:39
lue OK. I actually just want to play around with moarboot so far, and see if I get the same segfault-masking and such in your last commit there. 20:41
timotimo can a role give a class a different .new? 20:47
lizmat I wouldn't know why not
timotimo ok 20:48
that makes the type checking for Array[Foo].new easier
jnthn it's just a method
lizmat Setty / Baggy / do it :-)
timotimo right.
lue jnthn: Am I supposed to be seeing lines like "Stage start: 0.000021Stage start : 0.000" at the moment? 20:49
20:49 colomon joined
lue (no changes to the moarboot branch's stuff, yet) 20:49
FROGGS lue: we are hunting a heisenbug in #moamrvm atm 20:50
lue So yes then. Just checking to make sure I didn't somehow blow things up on my own :) .
jnthn lue: Yeah, the problem Ihave is that if I pull those out of my Makefile, I get a segfault. 20:51
FROGGS and on my box it blows up with them, but not without :o) 20:52
jnthn yeah, but blows up at exit
here it blows up in the middle somewhere
lue I was actually talking more about the duplicate "Stage start" (and duplicate other lines) rather than the appearance of stagestats, in case there's confusion.
jnthn lue: yeah, that's broken but not the thing I'm hunting here 20:53
lue Good. Again, just making sure I didn't discover a unique issue or anything.
lizmat are we expecting coerces like Mix() to ever have named parameters ? 20:54
lue will join #moarvm momentarily to share something weird, based on jnthn's results.
timotimo rakudo stage parse for the core setting is locally 106 instead of 120s by now. that's great! :)
20:56 ajr_ left
timotimo Type check failed in .new; expected 'Int' but got 'Str' 20:56
yays :)
timotimo runs a spectest
jnthn timotimo++
timotimo t/spec/S02-lexical-conventions/unspace.rakudo.parrot ............ Dubious, test returned 1 (wstat 256, 0x100) 20:57
:(
but that's not my fault i'm sure
wait, were our cursless changes merged to master yet or is my local master divergent from upstream master?
jnthn They were merged... 20:58
timotimo great
21:12 denis_boyun joined
japhb__ Where do y'all generally put modules that are only needed for testing? lib/Test/ or t/lib/Test/ ? 21:14
21:15 logie joined, donaldh joined
lizmat t/spec (in roast) 21:16
TimToady: $ perl6 -e 'Bag(:a(3),:b(4))'
Cannot coerce to Bag with named parameters
$ perl6 -e '(:a(3),:b(4)).Bag.perl.say' 21:17
("a"=>3,"b"=>4).Bag
dalek kudo/nom: 7da6d0a | (Elizabeth Mattijsen)++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
Make Type object coercer die if called with named parameters
21:18
jnthn Doesn't fix my SEGV, sadly 21:19
uh, ww 21:20
lizmat hehe
timotimo is "ww" short for "wait what?"
lizmat wrong window
timotimo ah 21:21
does S32-array/create.t sound right for Array[Int].new(...) tests?
21:22 stevan_ left
dalek ecs: 97bcf7d | (Elizabeth Mattijsen)++ | S99-glossary.pod:
Add "ww" for "wrong window"
21:23
lizmat timotimo: sounds good to me
timotimo great
dalek ast: 4e793d0 | (Timo Paulssen)++ | S (2 files):
make sure Array[Type].new(NonType) dies with X::TypeCheck
21:32
timotimo here we go, tests!
21:32 logie left
lizmat timotimo: t/spec/S02-lexical-conventions/unspace.rakudo.parrot ............ Dubious, test returned 1 (wstat 256, 0x100) 21:34
Failed 5/78 subtests
timotimo github.com/rakudo/rakudo/pull/215 - here is my pull request 21:35
dalek p: 21eee91 | coke++ | t/docs/opcodes.t:
Manually add these opcodes to the test
21:36
donaldh jnthn: Is the VTable in STable.java obsolete ? 21:37
jnthn donaldh: Probably, yeah 21:38
donaldh can't spot it being referenced.
which raises my next question; how to change the serialization format :-) 21:39
i.e. remove the VTable serialization.
my first naive attempt broke stage0 based bootstrap :D 21:40
21:40 colomon left
dalek kudo/nom: 1405b6e | (Timo Paulssen)++ | src/core/ (2 files):
typecheck the arguments of Array[Type].new.
21:41
kudo/nom: c6d5c94 | lizmat++ | src/core/ (2 files):
Merge pull request #215 from timo/array_new_typecheck

typecheck the arguments of Array[Type].new.
timotimo \o/ 21:42
thank you kindly
okay, what now? :) 21:43
sadly, this construction can't easily be changed back to "no type check needed" by the optimizer 21:44
as in: the user wrote Array[Int].new(1, 2, 3); in that case no typecheck i sactually neaded :|
oh well. typechecks are free anyway
lizmat spectesting now 21:45
21:47 pdurbin joined
lizmat timotimo: seems test count is 6 instead of 8 in create.t 21:53
timotimo er 21:54
dangit, you're right
i'll fix it, thanks
dalek ast: b240fbf | (Timo Paulssen)++ | S32-array/create.t:
fix plan
21:55
lizmat timotimo: also t/spec/S02-lexical-conventions/unspace.rakudo.parrot (Wstat: 256 Tests: 73 Failed: 0)
Non-zero exit status: 1
Parse errors: Bad plan. You planned 78 tests but ran 73.
timotimo i thought this wasn't my fault? 21:56
No such method 'id' for invocant of type 'Str' in block at t/spec/S02-lexical-conventions/unspace.rakudo.parrot:287
not sure what that is supposed to be
lizmat well, it didn't fail before I merged :-) 21:57
timotimo huh 22:03
r: say "foo".id
camelia rakudo 0f0eba: OUTPUT«No such method 'id' for invocant of type 'Str'␤ in block at /tmp/bZJaH4UCrh:1␤␤»
timotimo ... this is supposed to work?
timotimo huhs 22:04
22:04 colomon joined
lizmat is not sure 22:04
jnthn I don't know of a .id method
timotimo r: sub foo() { 'foo' }; is((foo\#`〝 comment 〞.id), 'a', 'unspace with U+301D/U+301E comment'); 22:10
camelia rakudo 0f0eba: OUTPUT«===SORRY!=== Error while compiling /tmp/nJHLDIANSs␤Undeclared routine:␤ is used at line 1␤␤»
timotimo r: use Test; sub foo() { 'foo' }; is((foo\#`〝 comment 〞.id), 'a', 'unspace with U+301D/U+301E comment');
camelia rakudo 0f0eba: OUTPUT«No such method 'id' for invocant of type 'Str'␤ in block at /tmp/odDwksYxIs:1␤␤»
timotimo that's the test that fails
... wat 22:11
the test below that is the same with an eval_dies_ok
oh, no, that's different unicode characters there
FROGGS r: sub foo { }; say foo.id 22:12
camelia rakudo 0f0eba: OUTPUT«No such method 'id' for invocant of type 'Nil'␤ in block at /tmp/qxaIATudNL:1␤␤»
FROGGS ahh, hmmm, w/e
lizmat could it be a problem with fudging ?
FROGGS n: use Test; sub foo() { 'foo' }; is((foo\#`〝 comment 〞.id), 'a', 'unspace with U+301D/U+301E comment');
camelia niecza v24-98-g473bd20: OUTPUT«Unhandled exception: Unable to resolve method id in type Str␤ at /tmp/hOAeEzAvHl line 1 (mainline @ 6) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4583 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4584 (module-CORE @ 576) ␤ …»
timotimo it's only fudged for niecza with the same error on rakudo 22:13
FROGGS it should get skipped: github.com/perl6/roast/blob/a299b3...ace.t#L281 22:15
and a .id method is not mentioned in the specs 22:19
timotimo yeah 22:20
FROGGS r: sub foo() { 'foo' }; is((foo\#`〝 comment 〞), 'foo', 'unspace with U+301D/U+301E comment'); 22:21
camelia rakudo c6d5c9: OUTPUT«===SORRY!=== Error while compiling /tmp/iUH4hkcZG1␤Unexpected closing bracket␤at /tmp/iUH4hkcZG1:1␤------> b foo() { 'foo' }; is((foo\#`〝 comment 〞⏏), 'foo', 'unspace with U+301D/U+301E co␤»
FROGGS but this is a problem
r: sub foo() { 'foo' }; is((foo\#`〝 comment 〞`), 'foo', 'unspace with U+301D/U+301E comment'); 22:22
camelia rakudo c6d5c9: OUTPUT«===SORRY!=== Error while compiling /tmp/CUXgyv_ILA␤Confused␤at /tmp/CUXgyv_ILA:1␤------> b foo() { 'foo' }; is((foo\#`〝 comment 〞⏏`), 'foo', 'unspace with U+301D/U+301E c␤ expecting any of:␤ unspace…»
grondilu you can't write \#, can you?
FROGGS r: sub foo() { 'foo' }; is((foo#`〝 comment 〞`), 'foo', 'unspace with U+301D/U+301E comment');
camelia rakudo c6d5c9: OUTPUT«===SORRY!=== Error while compiling /tmp/XVyQPFP6en␤Two terms in a row␤at /tmp/XVyQPFP6en:1␤------> ub foo() { 'foo' }; is((foo#`〝 comment 〞⏏`), 'foo', 'unspace with U+301D/U+301E c␤ expecting any of:␤ …»
FROGGS r: sub foo() { 'foo' }; is((foo#`〝 comment 〞), 'foo', 'unspace with U+301D/U+301E comment'); 22:23
camelia rakudo c6d5c9: OUTPUT«===SORRY!=== Error while compiling /tmp/mKGqnqw7Fr␤Undeclared routine:␤ is used at line 1␤␤»
dalek ast: 5b439fa | (Elizabeth Mattijsen)++ | S02-lexical-conventions/unspace.t:
Fudge parse error for now
FROGGS r: use Test; sub foo() { 'foo' }; is((foo#`〝 comment 〞), 'foo', 'unspace with U+301D/U+301E comment');
camelia rakudo c6d5c9: OUTPUT«ok 1 - unspace with U+301D/U+301E comment␤»
FROGGS hmmm
timotimo somebody must have unfudged it by accident? 22:24
FROGGS ahh, the backslash might be a opy+pasto from the eval_dies_ok
timotimo: it is still fudged
timotimo only for niecza
FROGGS ahh, now I see it 22:26
lizmat I just fudged it again
FROGGS timotimo: you did github.com/perl6/roast/commit/4e79...94e6a5a2f1
:o)
lizmat hehe 22:27
FROGGS r: use Test; sub foo() { 'foo' }; is((foo#`〝 comment 〞.Str), 'foo', 'unspace with U+301D/U+301E comment');
camelia rakudo c6d5c9: OUTPUT«===SORRY!=== Error while compiling /tmp/4GK_1Fkxmm␤Two terms in a row␤at /tmp/4GK_1Fkxmm:1␤------> ub foo() { 'foo' }; is((foo#`〝 comment 〞⏏.Str), 'foo', 'unspace with U+301D/U+301␤ expecting any of:␤ …»
lizmat ok, I fudged it again
FROGGS yeah
so we fail like niecza nowadays... not bad
lizmat indeed
and on that thought, I wish you all g;night!
jnthn What would STD do?
lizmat sleep& 22:28
jnthn 'night, lizmat
grondilu wow, there has been more commits on P6 core than on P5 core in 2013: groups.google.com/forum/#!topic/pe...FsajeiZY-s 22:29
timotimo ... waaaaaat 22:31
how did i do that?!
grondilu: we know :) 22:32
tadzik jnthn | What would STD do?
lizmat | sleep&
typical STD ;)
jnthn :D
22:33 denis_boyun left
dalek p/moarboot: 4a3a97d | jnthn++ | src/NQP/World.nqp:
Fix fossil found while porting.
22:38
p/moarboot: 9b5a875 | jnthn++ | tools/build/Makefile-Moar.in:
Remove --stagestats workaround; correct backend.
22:45 grondilu left
dalek p/moarboot: 9dbdb85 | jnthn++ | src/NQP/World.nqp:
BEGIN fixes from Moar porting work.
22:50
22:52 donaldh left 22:58 dwarring joined 23:02 GlitchMr left
dwarring dumb questions coming up... 23:03
should nqp be available as a slang from perl6? 23:04
i was thinking it could be used as a way of geting close to the 'metal' for critical code segments
FROGGS should be Nearly Quite Possible to do anyway 23:05
lue r: say "This is Perl 6!"; nqp::say("This is NQP!");
camelia rakudo c6d5c9: OUTPUT«This is Perl 6!␤This is NQP!␤»
dwarring heh!
jnthn There's even the odd place this happens. The JVM MapIter impl is mostly expressed in NQP ops 23:06
23:06 dmol1 left
dwarring it's still be nice to be able to inline chunks of nqp code 23:07
FROGGS if we had a clean way of switching to a slang, it would be a matter of ~20 loc to switch to NQP::Grammar
dwarring hang on a few secs I'll just gist some heavily optimised code...
still might be worthwhile, say for a loop that needs to be heavily optimised 23:08
lue
.oO(Q:lang<NQP>" ... ")
dalek p/moarboot: b3bcb84 | jnthn++ | src/vm/moar/stage0/ (9 files):
Update MoarVM stage0.
p/moarboot: def059e | jnthn++ | src/vm/moar/QAST/QAST (3 files):
Add QAST -> MAST.

Mostly a direct steal from nqp-cc in the MoarVM repo.
TimToady though one would hope that Perl 6 written in the NQP subset would just translate straight across
dwarring heare's my gist, gist.github.com/dwarring/6847192 23:09
not pretty!
lue TimToady: Not Quite (compatible with) Perl (6) :) 23:10
TimToady Fix it! :)
dalek p/moarboot: 55732de | jnthn++ | src/vm/moar/NQP/Ops.nqp:
Add an NQP::Ops for MoarVM.
23:12
p/moarboot: 100ad78 | jnthn++ | tools/build/Makefile-Moar.in:
Finish filling out stage1 Makefile for MoarVM.

We now make it through using NQP hosted on MoarVM to compile the NQP sources. Sadly, the output does not yet work.
dwarring still does beat this running under nap gist.github.com/dwarring/6847212
timotimo dwarring, does it actually make a difference if you use nqp::mul-n or just *?
oh
you are feeding this to rakudo
dwarring yes 23:14
timotimo you could comparebwhat both of them output with --targer=ast
TimToady we probably shouldn't allow that unless you "use UNWARRANTED_CHUMMINESS_WITH_THE_COMPILER"
dwarring both gists work on nqp and rakudo... 23:15
rough order of performance (worst to best)...
lue use MONKEY_WRENCH; for consistency :) 23:16
TimToady lue++
dwarring well nqp out-performs rakudo on both 23:18
timotimo have you tried it with all five versions of nqp and eakudo?
dwarring no just on parrot 23:19
timotimo ok 23:20
dwarring I'll try jvm 23:21
TimToady MONKEY_BUSINESS, MONKEY_SEE_MONKEY_DO, MONKEYING_AROUND, MONKEYSHINE...
MONKEY_SEE_MONKEY_DO would have to enable some kind of cargo culting 23:22
dwarring similar results on jvm 23:24
the optimised example is about 3x faster on perl6
but nqp beats rakudo 23:25
these are rough timings, but the times between parrot & jvm appear similar 23:26
23:27 Guest96073 is now known as ponbiki 23:28 colomon left
dwarring I guess the other way to go to write critical stuff in nqp is just put it in a separate source file 23:28
guess I can do that now 23:29
dwarring but inlining nqp has it's attractions 23:30
timotimo there is some work towards use blahblah:from<nqp> 23:32
on my computer, the difference is much more pronounced 23:36
23:36 GlitchMr joined
timotimo between nqp and perl6; nqp is quasi-instantaneous (0.2s), perl6 takes its sweet time (1.5) 23:36
there's probably some startup cost involved
23:36 BenGoldberg joined
TimToady that should be measurable 23:37
timotimo makes it compute pi 1000 times
dwarring timotimo: how long for the optimised on rakudo? 23:38
ok
timotimo wow, this is sad! 23:39
23:40 colomon joined
TimToady 1000 times infinite is pretty long 23:41
timotimo approximate*
well, to be fair, we've seen that trend in the benchmarks since forever...
that essentially the same code as perl6 takes a few orders of magnitudes more time than the nqp code does ...
maybe we should just give up on perl6 itself and push nqp aggressively instead
dwarring inlining! 23:42
timotimo nqp doesn't do inlining yet, rakudo does ...
rakudo takes like 1 second for each calculation, whereas nqp does 100 in less than one.
less than half a second, actually
TimToady what datatypes? 23:43
timotimo native ints and nums
(i made a version for perl6 that doesn't use nqp::bind, instead assigning to native variables)
dwarring meant inlining as in source code inlining 23:44
BenGoldberg Source code inlining can only help with sub/method calls 23:46
Source code inlining can't help if [+] 1..10 in perl6 is 200x slower than the eqivilant nqp code
TimToady obviously we aren't going to be depending on a single kind of optimization 23:47
timotimo yes, yes. of course.
TimToady though, in the case of [+] 1..10 it should just do constant folding at compile time :P 23:48
timotimo ayup.
BenGoldberg Well, [+] 1..$n, then, but you know what I mean :) 23:51
TimToady that one would just be a template recognition with substitution of a simpler formula :) 23:52
triangle-number($n) I suppose 23:53
timotimo i don't think these simple pattern substitutions will get us far 23:59