The topic for #perl6 is: pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by TimToady on 25 November 2008.
literal perl6: my $var = 'bar', "foo \qq[$bar]".perl 00:52
p6eval elf 24603: RESULT«"\"foo\\\ \\\\qq\\\[\\\$bar\\\]\""␤»
..rakudo 34343: OUTPUT«Scope not found for PAST::Var '$bar'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
..pugs: OUTPUT«*** Undeclared variable: ("$bar",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb6511639>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb653e731>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb6515081>...
literal perl6: my $var = 'bar'; "foo \qq[$bar]".perl
p6eval pugs: OUTPUT«*** Undeclared variable: ("$bar",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb6509e89>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb6541731>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb650f705>...
..elf 24603: RESULT«"\"foo\\\ \\\\qq\\\[\\\$bar\\\]\""␤»
..rakudo 34343: OUTPUT«Scope not found for PAST::Var '$bar'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
literal perl6: my $var = 'bar'; "foo \qq[$var]".perl 00:53
p6eval pugs, rakudo 34343: RESULT«"\"foo qq[bar]\""»
..elf 24603: RESULT«"\"foo\\\ \\\\qq\\\[\\\$var\\\]\""␤»
pugs_svn r24604 | hinrik++ | [util/perl6.vim] remove a redundant line 00:54
meppl good night 01:21
cspencer rakudo: :by(3).WHAT.say 01:50
p6eval rakudo 34343: OUTPUT«Pair␤»
cspencer rakudo: (by => 3).WHAT.say 01:53
p6eval rakudo 34343: OUTPUT«Pair␤»
cspencer rakudo: :a(0).perl.say 01:54
p6eval rakudo 34343: OUTPUT«"a" => 0␤»
cspencer rakudo: :!a.perl.say
p6eval rakudo 34343: OUTPUT«"a" => 0␤»
pugs_svn r24605 | hinrik++ | [util/perl6.vim] a few Q tweaks 04:08
dwhipp rakudo: my @a = 1..3; @a >>++; 04:09
p6eval rakudo 34343: OUTPUT«Statement not terminated properly at line 1, near ">>++;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
dwhipp rakudo: my @a = 1..3; @a >>+=>> 1;
p6eval rakudo 34343: OUTPUT«Statement not terminated properly at line 1, near ">>+=>> 1;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
dwhipp rakudo: my @a = 1..3; @a >>+>>= 1; 04:10
p6eval rakudo 34343: OUTPUT«get_iter() not implemented in class 'Integer'␤current instr.: 'prefix:=' pc 17607 (src/builtins/misc.pir:17)␤»
dwhipp rakudo: my @a = 1..3; ++<< @a; 04:13
p6eval rakudo 34343: OUTPUT«Syntax error at line 1, near "++<< @a;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
literal rakudo: my @ = 1..3; [++] @a;
p6eval rakudo 34343: OUTPUT«Syntax error at line 1, near "[++] @a;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
literal rakudo: my @a = 1..3; [++] @a; 04:14
p6eval rakudo 34343: OUTPUT«Syntax error at line 1, near "[++] @a;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
Tene Does anyone here know colomon from use.perl ? 04:37
TimToady rakudo: my @a = 1..3 @a>>++ 04:57
p6eval rakudo 34345: OUTPUT«Statement not terminated properly at line 1, near "@a>>++"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
Tene Should that parse? 04:59
TimToady rakudo: my @a = 1..3; @a>>++
p6eval rakudo 34345: OUTPUT«Statement not terminated properly at line 1, near ">>++"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
TimToady std: my @a = 1..3; @a>>++
p6eval std 24605: OUTPUT«00:05 86m␤»
TimToady rakudo: my @a = 1..3; @a»++ 05:00
p6eval rakudo 34345: OUTPUT«Statement not terminated properly at line 1, near "\x{bb}++"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
Tene Ah, hyper postfix NYI.
TimToady std: my @a = 1..3; @a»++
p6eval std 24605: OUTPUT«00:05 86m␤» 05:01
dwhipp my @a = 1..3; my ($head, @tail) = @a; say "$head, {@tail}" 05:08
rakudo: my @a = 1..3; my ($head, @tail) = @a; say "$head, {@tail}"
p6eval rakudo 34345: OUTPUT«1, ␤»
dwhipp pugs: my @a = 1..3; my ($head, @tail) = @a; say "$head, {@tail}"
p6eval pugs: OUTPUT«1, 2␤»
dwhipp rakudo: my @a = 1..3; my ($head, @tail) = |@a; say "$head, {@tail}" 05:09
p6eval rakudo 34345: OUTPUT«too many arguments passed (4) - 2 params expected␤current instr.: 'infix:=' pc 13192 (src/builtins/assign.pir:71)␤»
dwhipp rakudo: my @a = 1..3; my ($head, *@tail) = @a; say "$head, {@tail}"
p6eval rakudo 34345: OUTPUT«1, ␤»
dwhipp rakudo: my @a = 1..3; my ($head, *@tail) := @a; say "$head, {@tail}"
p6eval rakudo 34345: OUTPUT«rtype not set␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
dwhipp rakudo: my @a = 1..3; my ($head, *@tail) := |@a; say "$head, {@tail}"
p6eval rakudo 34345: OUTPUT«rtype not set␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
dwhipp pugs: my @a = 1..3; my ($head, *@tail) := |@a; say "$head, {@tail}" 05:10
p6eval pugs: OUTPUT«*** Wrong number of binding parameters: 1 actual, 2 expected␤ at /tmp/uWQROwcYBI line 1, column 15-40␤»
dwhipp pugs: my @a = 1..3; my ($head, *@tail) := @a; say "$head, {@tail}"
p6eval pugs: OUTPUT«*** Wrong number of binding parameters: 1 actual, 2 expected␤ at /tmp/wol2upjsf3 line 1, column 15-39␤»
dwhipp rakudo: my @a = 1..3; my ($head, @tail) = 1..3; say "$head, {@tail}" 05:13
p6eval rakudo 34345: OUTPUT«1, ␤»
dwhipp rakudo: my @a = 1..3; my ($head, *@tail) = 1..3; say "$head, {@tail}"
p6eval rakudo 34345: OUTPUT«1, ␤»
dwhipp rakudo: my @a = 1..3; my ($head, *@tail) := 1..3; say "$head, {@tail}"
p6eval rakudo 34345: OUTPUT«rtype not set␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤» 05:14
dwhipp seems there must be a way to do "($car, @cdr) = @list" -- signature matching works 05:15
azawawi hi 07:14
literal hi 08:12
Tene hi! 08:15
azawawi hi!!
mberends hi!!! 08:21
literal since there's someone here now, what's the shortest way to do this in Perl 6? www.reddit.com/r/programming/commen..._sublists/ 08:22
mberends it's gotta be slices, but Rakudo slices may be only partially implemented 08:24
Tene I came up with a few options. let's see what I remember. 08:31
nopaste.snit.ch/15096 was my first solution 08:33
I think I had an answer with slices, but slices are NYI on rakudo 08:36
I also had an answer with gather/take...
gather { for 1..$n { take <something> } }
don't quite recall, but it was pretty short
masak perl6: <13 37 50 50 57 -32 3 40 50 41 51 52 45 33 51 -31>.map({ chr($_ + 64) }).join('').say 11:54
p6eval elf 24605: OUTPUT«Use of uninitialized value $_ in addition (+) at (eval 117) line 3.␤Undefined subroutine &GLOBAL::chr called at (eval 117) line 3.␤ at ./elf_f line 3861␤»
..pugs, rakudo 34346: OUTPUT«Merry Christmas!␤»
masak (the conventional one, not the Perl 6 one)
masak I just submitted i slightly worrying bug. 11:57
perl6: class A { has $.b; }; my @q = A.new( :b(1) ); while shift @q -> $p { $p.clone( :b($p.b + 1) ); say $p.b; } 11:58
p6eval rakudo 34346: OUTPUT«2␤»
..pugs: OUTPUT«*** Cannot 'shift' scalar␤ at Prelude.pm line 736, column 48-75␤»
..elf 24605: OUTPUT«Useless use of reference constructor in void context at (eval 121) line 13.␤Undefined subroutine &Main::ARRAY called at (eval 121) line 8.␤ at ./elf_f line 3861␤»
masak TimToady: though I'm flattered, I think you meant "I'd just watch moritz_ for a while" 12:01
masak pmurias, ruoso: I know it's probably not your fault, but when checking out pugs with `svn co svn.pugscode.org/pugs/ pugs`, svn dies in pugs/v6/smop/m0ld/. on a clean checkout. 12:07
pmurias ruoso: is -DSMOP_LOWLEVEL_MEM_TRACE enough to turn reference counting validation on? 12:13
masak pmurias: gist.github.com/39888 12:15
pmurias masak: remove .svn directories at random ;) 12:17
masak pmurias: I want to stress that this is a clean checkout, not an update.
svn complains when I remove .svn directories. 12:18
:( 12:19
I know this is most likely svn's fault, not yours
but it's bad for everyone if people coming to Perl 6 cannot check out the Pugs repo.
masak upgrades svn 12:20
pmurias masak: maybe your svn is too new? 12:24
masak it was 1.4.4
latest is 1.5.5
pmurias i have 1.4.6
masak pmurias: and you can to clean checkouts from that URL with no problem? 12:25
ruoso pmurias, yes, it is 12:28
pmurias masak: trying 12:29
ruoso: i suspect it is not working in HEAD 12:30
ruoso you probably just fixed all the leaks ;)
pmurias ruoso: could you check if it works? (with an artificial one)
i fixed the leaks before the switch to scons, but P5Interpreter isn't DESTROYALL'ed properly at the leak checker doesn't find anything 12:33
masak: the fresh checkout works here
masak pmurias: thank you. then hopefully it's just 1.4.4 that's too old. 12:36
ruoso pmurias, you can always turn SMOP_LOWLEVEL_MEM_DEBUG on also, it should print more verbose messages... 12:39
pugs_svn r24606 | pmurias++ | [smop] fixed a segfault in postcircumfix:<( )> on a wrapped SV* 12:43
pmurias ruoso: i'll try that again
pmurias ruoso: i just wanted to have someone else check if the tracing works as i'm getting more and more confused by it atm 12:49
pmurias ruoso: m0ld was not calling smop_destr 13:04
masak Perl is a Shinto shrine: www.youtube.com/watch?v=Xe1TZaElTAs 13:10
pmurias ruoso: i think i'll just write a bytecode loade 13:15
and throw away the smop in haskell embedding 13:16
masak upgrading svn didn't help :( I still can't check out the Pugs repo. 13:38
the error message changed slightly:
"Can't open file 'pugs/v6/smop/m0ld/.svn/tmp/text-base/m0ld.hs.svn-base': No such file or directory"
svn--
pmurias masak: maybe you need exactly 1.4.6? 13:40
masak: fresh checkout again?
pmurias ruoso: how should smop know how to load a given object from a bytecode file? 13:42
masak pmurias: I think I'll turn to #svn about this. 13:57
pmurias: yes, it was a fresh checkout.
azawawi masak: what's the problem?
masak azawawi: I can't get svn to checkout the whole Pugs repo.
azawawi masak: will try it now on feather1 13:58
masak people have reported similar problems in the last couple of months. this is the first time I've had them. 13:59
azawawi masak: any pbot output you could share?
masak azawawi: the error is simply "svn: Can't open file 'pugs/v6/smop/m0ld/.svn/tmp/text-base/m0ld.hs.svn-base': No such file or directory" 13:59
azawawi masak: svn co works on feather1, version 1.5.1 (r32289) 14:00
masak azawawi: thanks for checking.
azawawi masak: np 14:01
rakudo_svn r34347 | infinoid++ | [cage] Fix failures from the following codingstd tests: 15:20
r34347 | infinoid++ | * check_toxxx.t
r34347 | infinoid++ | * c_code_coda.t
TimToady no problem svn upping in california 15:22
masak I don't think it's the upping that's the problem, only the co'ing under some not yet clear circumstances. 15:23
pugs_svn r24607 | moritz++ | [t] and [t/spec] 15:29
r24607 | moritz++ | * moved NaN.t, ref.t, trusts.t and fail.t to spec/
r24607 | moritz++ | * merged tests from complex_powers.t into arith.t
r24607 | moritz++ | * replaced die_and_end.t with something more useful inside spec/
r24607 | moritz++ | * merge builtins/my.t into spec/S04-declarations/my.t
r24607 | moritz++ | * small simplifications to spec/S03-operators/p5arrow.t
r24607 | moritz++ | * removed quotes from isa_ok(..., 'QuotedType')
r24607 | moritz++ | * various unfudges for rakudo
r24607 | moritz++ | * added tests for binding to signatures
r24607 | moritz++ | * added tests for KeyHash 15:30
r24607 | moritz++ | * added TASKS
r24607 | moritz++ | * [examples/99problems]: simplified some of the tests
r24607 | moritz++ | Merry Christmas!
azawawi 'The Return of The moritz_' ;-)
moritz_ I'm just peeking in 15:32
azawawi merry christmas
moritz_ thanks, same to you!
azawawi is working on Inline::C + PPI 15:33
pugs_svn r24608 | moritz++ | [t/spec] some unfudges in next.t 15:45
pugs_svn r24609 | lwall++ | [STD] add div operator, don't mismarse (::T) as (: : T) 15:55
pmurias azawawi: Inline::C + PPI = speeding PPI up? 16:43
dwhipp pugs: say "yes" if 1 == 1|2 17:28
p6eval pugs: OUTPUT«yes␤»
dwhipp pugs: say "yes" if 1 === 1|2
p6eval pugs: OUTPUT«yes␤»
dwhipp rakudo: say "yes" if 1 === 1|2
p6eval rakudo 34350: RESULT«Bool::False»
dwhipp pugs: [1,2,3] === [1|2, 2|3, 3|4] 17:34
p6eval pugs: RESULT«Bool::False»
dwhipp pugs: [1,2,3] === [1, 2, 3]
p6eval pugs: RESULT«Bool::False»
dwhipp rakudo: [1,2,3] === [1, 2, 3]
p6eval rakudo 34350: RESULT«Bool::False» 17:35
dwhipp rakudo: [1,2,3] ~~ [1, 2, 3]
p6eval rakudo 34350: RESULT«Bool::True»
dwhipp rakudo: [1,2,3] ~~ [1, 2|3, 3]
p6eval rakudo 34350: RESULT«Bool::False»
dwhipp rakudo: [1,2,3] ~~ [1, 2&3, 3]
p6eval rakudo 34350: RESULT«Bool::False»
dwhipp rakudo: [1,2,3] ~~ [1, 2, 3]
p6eval rakudo 34350: RESULT«Bool::True»
dwhipp pugs: [1,2,3] ~~ [1, 2, 3] 17:36
p6eval pugs: RESULT«Bool::True»
dwhipp pugs: [1,2,3] ~~ [1, 2|3, 3]
p6eval pugs: RESULT«Bool::False»
cspencer pugs: [1,2,3] ~~ [1, 2||3, 3] 17:37
p6eval pugs: RESULT«Bool::True»
dwhipp but that's trivially true 17:38
pugs: [1,0,3] ~~ [1, 0||2, 3] 17:39
p6eval pugs: RESULT«Bool::False»
dwhipp pugs: [1,0,3] ~~ [1, 0|2, 3]
p6eval pugs: RESULT«Bool::False»
cspencer hmm
pugs: (0|2).say
p6eval pugs: OUTPUT«any(VInt 0,VInt 2)␤» 17:40
dwhipp pugs : 0 ~~ 0|2
dwhipp pugs: 0 ~~ 0|2 17:41
p6eval pugs: RESULT«(Bool::False | Bool::True
dwhipp pugs: my @a = 0; my @b = 0|2; @a ~~ @b 17:42
p6eval pugs: RESULT«Bool::False»
dwhipp pugs: my $a = 0; my $b = 0|2; $a ~~ $b
p6eval pugs: RESULT«(Bool::False | Bool::True
dwhipp rakudo: my @a = 0; my @b = 0|2; @a ~~ @b 17:42
p6eval rakudo 34350: RESULT«Bool::False»
dwhipp rakudo: my @a = 0; my @b = 0|2; @a === @b 17:43
p6eval rakudo 34350: RESULT«Bool::False»
dwhipp rakudo: my @a = 0; my @b = 0|2; |@a === |@b 17:43
p6eval rakudo 34350: RESULT«Bool::False»
pugs_svn r24610 | moritz++ | [t/spec] unfudge some last/next/redo tests for rakudo 18:22
cspencer pugs: .say Str.HOW.methods 20:40
p6eval pugs: OUTPUT«*** ␤ Unexpected "Str"␤ expecting operator␤ at /tmp/Koqqi85u6x line 1, column 6␤»
cspencer pugs: .say for Str.HOW.methods 20:41
p6eval pugs: OUTPUT«*** No such method in class Class: "&methods"␤ at /tmp/jJirIgXBhf line 1, column 10 - line 2, column 1␤»
ruoso pmurias, I already thought a lot about the module loading in SMOP 20:43
it should work by calling some init() function on the module being loaded, passing the lexical scope at which the top-level package is going to be installed 20:45
then it will look into this lexical scope for the package of the name that it tried to 'use' or 'require'
it then aliases that package to the scope that called 'use' or 'require'
and calls .EXPORTALL in that package 20:46
we might start loading .so plugins
^aristotle if I have a string in $foo and a junction of strings in $bar, is there a way to ask how many of the $bar values match $foo? 20:54
pmurias ruoso: the problem with that scheme is that gcc is sluggish 21:05
ruoso pmurias, what do you mean? 21:07
pmurias gcc compiles code slowly
hmm, maybe it's fast enough 21:09
pmurias is prejudiced against gcc from compiling c++ code
pmurias ruoso: is load($filename) which would load a file and call init enough? 21:12
ruoso pmurias, but why would you need to compile code to load in runtime? 21:13
my idea is that you would have pre-compiled files 21:14
you don't really need a bytecode loader
you just need to compile down the code to some known API 21:15
pmurias had a previous thought that invoking gcc every time we run a test will slow us down
s/slow us down/make running the test suit slower/ 21:16
ruoso: what should be init's signature? i'll implement the object loading scheme now and we'll see how it works 21:18
ruoso pmurias, I think it would be something in the line of init(interpreter, lexical) 21:41
but we have to be carefull to make sure the init() doesn't cause a C recursion, this call needs to get back to the interpreter runloop before running the actual init code 21:42
masak perl6: class A { has $.foo }; my $a = A.new; $a.foo = 5; say $a.foo 23:00
p6eval rakudo 34360: OUTPUT«Cannot assign to readonly variable.␤current instr.: 'die' pc 14705 (src/builtins/control.pir:204)␤»
..elf 24610, pugs: OUTPUT«5␤»
masak Elf and Pugs somewhat reassure me here. I thought Rakudo knew something I didn't.
didn't this work at some point in the past? ISTR it did.
masak peruses the spectests 23:01
masak moritz_++ # tireless test herding 23:03
pmurias masak: rakudo is right here, right? 23:06
masak pmurias: oh, right! the rw thing. 23:08
masak forgot
perl6: class A { has $.foo is rw }; my $a = A.new; $a.foo = 5; say $a.foo
p6eval rakudo 34360: OUTPUT«Parrot VM: Can't stat languages/perl6/perl6.pbc, code 2.␤main: Packfile loading failed␤»
..elf 24610, pugs: OUTPUT«5␤»
masak that's Rakudo rebuilding, right? :)
masak tries locally 23:09
yes, it works. that explains it. 23:13
masak rakudo: class A { has $.foo is rw }; my $a = A.new; $a.foo = 5; say $a.foo 23:30
p6eval rakudo 34360: OUTPUT«5␤»