Camelia, the Perl 6 bug

IRC log for #perl6, 2008-11-23

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:26 snooper joined #perl6
00:45 dukeleto_ joined #perl6
02:10 meppl good night
02:51 dukeleto_ joined #perl6
03:32 kst` joined #perl6
03:39 meteorjay joined #perl6
03:47 slavik joined #perl6
03:47 slavik hallo
03:48 Psyche^ joined #perl6
03:48 slavik is there a way in rakudo to recursively print everything? something like data dumper or PHP's printr(). I know about the $var.perl, but it doesn't seem exhaustive
03:49 slavik I am mainly interested in printing the structure of a match object, because some things happen which cause something to be nested a level deeper and I would like to understand why
04:02 elmex_ joined #perl6
04:13 dukeleto_ joined #perl6
04:26 slavik given two arrays, what is the correct way to zip them into a hash? %hash = @keys Z @values; ???
04:27 slavik rakudo: my %hash = 1..5 Z 6..10; say %hash;
04:27 p6eval rakudo 33032: OUTPUT[elements() not implemented in class 'Range'␤current instr.: 'infix:Z' pc 3915 (src/gen_builtins.pir:2519)␤]
04:27 slavik rakudo: my %hash = (1..5) Z (6..10); say %hash;
04:27 p6eval rakudo 33032: OUTPUT[elements() not implemented in class 'Range'␤current instr.: 'infix:Z' pc 3915 (src/gen_builtins.pir:2519)␤]
04:27 slavik rakudo: my @keys=1..5; my vals=6..10; my %hash = @keys Z @vals; say %hash;
04:27 p6eval rakudo 33032: OUTPUT[Scope not found for PAST::Var '@vals'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 152 (src/PCT/HLLCompiler.pir:104)␤]
04:28 slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say %hash;
04:28 p6eval rakudo 33032: OUTPUT[1  6␤2       7␤3     8␤4       9␤5       10␤␤]
04:28 slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say keys %hash;
04:28 p6eval rakudo 33032: OUTPUT[12345␤]
04:28 slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say %hash.keys();
04:28 p6eval rakudo 33032: OUTPUT[12345␤]
04:28 slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say %hash.vals();
04:28 p6eval rakudo 33032: OUTPUT[Method 'vals' not found for invocant of class 'Perl6Hash'␤current instr.: '_block11' pc 146 (EVAL_13:45)␤]
04:28 slavik rakudo: my @keys=1..5; my @vals=6..10; my %hash = @keys Z @vals; say %hash.values();
04:28 p6eval rakudo 33032: OUTPUT[678910␤]
04:28 slavik awesome
04:28 slavik nevermind :)
04:34 xinming joined #perl6
04:36 slavik hmm, problem remains
04:36 slavik that or my build of rakudo is too old
04:49 slavik rakudo: say ?(0 == 0)
04:49 p6eval rakudo 33032: OUTPUT[1␤]
04:49 slavik rakudo: say ?(0 == 1)
04:49 p6eval rakudo 33032: OUTPUT[0␤]
04:49 slavik rakudo: say ?(1.0 == 1)
04:49 p6eval rakudo 33032: OUTPUT[1␤]
04:49 slavik rakudo: say ?(1.0 === 1)
04:50 p6eval rakudo 33032: OUTPUT[0␤]
04:50 slavik rakudo: say ?(1.0 =:= 1)
04:50 p6eval rakudo 33032: OUTPUT[0␤]
04:50 slavik rakudo: say ?("a" == 'a')
04:50 p6eval rakudo 33032: OUTPUT[1␤]
04:50 slavik rakudo: say ?("a" =:= 'a')
04:50 p6eval rakudo 33032: OUTPUT[0␤]
04:50 slavik hmm
04:50 slavik rakudo: say ?("a" cmp 'a')
04:50 p6eval rakudo 33032: OUTPUT[0␤]
04:50 slavik rakudo: say ?("1" cmp 1)
04:50 p6eval rakudo 33032: OUTPUT[0␤]
04:51 slavik rakudo: say ?("1" <=> 1)
04:51 p6eval rakudo 33032: OUTPUT[0␤]
04:51 slavik rakudo: say ?("1" <=> 2)
04:51 p6eval rakudo 33032: OUTPUT[1␤]
04:51 slavik rakudo: say ?("1" <=> 0)
04:51 p6eval rakudo 33032: OUTPUT[1␤]
04:51 slavik rakudo: say ?("1" cmp 0)
04:51 p6eval rakudo 33032: OUTPUT[1␤]
04:52 slavik rakudo: say ?("abc" cmp "def")
04:52 p6eval rakudo 33032: OUTPUT[1␤]
04:52 slavik rakudo: say ?("zbc" cmp "def")
04:52 p6eval rakudo 33032: OUTPUT[1␤]
04:52 slavik shouldn't one of these return -1?
05:13 s1n rakudo: say ?("b" cmp "a")
05:13 p6eval rakudo 33032: OUTPUT[1␤]
05:13 s1n rakudo: say ?("a" cmp "b")
05:13 p6eval rakudo 33032: OUTPUT[1␤]
05:13 slavik anyway ... zipping doesn't completely work :(
05:14 s1n rakudo: say ?(1 <=> 2)
05:14 p6eval rakudo 33032: OUTPUT[1␤]
05:14 s1n rakudo: say ?(2 <=> 1)
05:14 p6eval rakudo 33032: OUTPUT[1␤]
05:14 s1n heh, what's the spec say on that?
05:14 slavik %hash = $/<blah>[0] | $/<blah>[1]; doesn't work :(
05:14 slavik s1n: I am pretty sure it's supposed to be like in perl5
05:15 slavik if the left is smaller, then the return is -1, if the right is smaller the 1, if equal then 0
05:15 slavik pugs: say ?(1 <=> 2)
05:15 p6eval pugs: No output (you need to produce output to STDOUT)
05:15 slavik pugs: say ?(1 <=> 2);
05:15 p6eval pugs: No output (you need to produce output to STDOUT)
05:15 slavik pugs broken
05:15 slavik perl6: say ?(1 <=> 2);
05:15 p6eval pugs: No output (you need to produce output to STDOUT)
05:15 p6eval ..elf 23056, rakudo 33032: OUTPUT[1␤]
05:15 slavik p6eval: say ?(1 <=> 2);
05:15 s1n perl6: say ?(1 <=> 2)
05:15 p6eval pugs: No output (you need to produce output to STDOUT)
05:15 p6eval ..elf 23056, rakudo 33032: OUTPUT[1␤]
05:16 s1n heh
05:20 slavik night
05:23 pasteling "slavik" at 67.100.227.140 pasted "Perl6 Grammar" (36 lines, 1.4K) at http://sial.org/pbot/33316
05:23 slavik take a look :)
05:34 The_last_hero joined #perl6
05:34 The_last_hero left #perl6
06:03 Bzek joined #perl6
06:17 justatheory joined #perl6
06:29 bacek_ joined #perl6
06:49 spx2 joined #perl6
06:50 justatheory joined #perl6
07:56 Psyche^ joined #perl6
08:27 ihrd joined #perl6
08:48 dac524 joined #perl6
08:51 ihrd left #perl6
08:52 meppl joined #perl6
08:52 meppl good morning
08:55 simcop2387 joined #perl6
09:04 iblechbot joined #perl6
09:17 Psyche^ joined #perl6
09:27 schmalbe joined #perl6
09:34 Ehtyar joined #perl6
09:53 smtms joined #perl6
10:04 DemoFreak joined #perl6
10:37 pmurias joined #perl6
10:45 pmurias @tell how should i checkout the smopp5?
10:45 lambdabot Consider it noted.
10:47 moritz_ pmurias: you should told the nickname "how" something ;)
10:47 clintongormley joined #perl6
10:48 clintongormley left #perl6
10:48 moritz_ slavik++ # nice grammar
10:56 ludan joined #perl6
11:06 vixey joined #Perl6
11:15 ejs joined #perl6
11:25 schmalbe greetings from Frankfurt Perl Workshop
11:25 schmalbe Lichtkind is talking about Perl6
11:25 buu Run away,
11:31 jnthn Lichtkind++ :-)
11:34 pmurias @tell ruoso how should i checkout smopp5?
11:34 lambdabot Consider it noted.
11:49 pbuetow joined #perl6
12:07 smg joined #perl6
12:31 adc_penner4 joined #perl6
12:35 BinGOs joined #perl6
12:40 masak joined #perl6
12:40 km2 joined #perl6
12:41 masak Mark Lentczner wants me to tell everyone that he'll be updating his table of operators http://www.ozonehouse.com/mark​/blog/code/PeriodicTable.html -- perhaps in time for the new year!
12:42 lambdabot Title: Mark Lentczner's Journal
12:49 moritz_ (Mark Lentczner)++
13:01 masak what should happen with an $obj.meth() call when $obj contains an undefined value?
13:01 masak oops, I meant 'an $obj.?meth() call'
13:02 moritz_ masak: definedness is just a property of an object that is rather arbitrary
13:02 masak I'd hope that the question mark would make Perl 6 not warn about the 'use of uninitialized value', but maybe that's misusing the .?meth() notation.
13:03 masak rakudo: my $a; $a.?meth()
13:03 p6eval rakudo 33042: RESULT[undef]
13:03 masak hm.
13:03 masak rakudo: my $a; say $a.?meth()
13:03 p6eval rakudo 33042: OUTPUT[Undefined value returned by invocation of undefined method␤␤]
13:03 masak oh, but of course it warns there, sorry. :)
13:05 masak rakudo: my $a; for 1..2 { say ~$a.?lc; $a = "OH HAI" }
13:05 p6eval rakudo 33042: OUTPUT[␤oh hai␤]
13:05 masak it actually seems to DWIW
13:05 masak I have no further questions, your honour.
13:10 pugs_svn r23057 | moritz++ | [t/spec] fudge slurpy-params.t for rakudo
13:15 rindolf joined #perl6
13:20 rakudo_svn r33043 | moritz++ | [rakudo] add test for slurpy params to spectest
13:40 Jedai joined #perl6
13:57 loumz joined #perl6
14:27 masak what's the difference between these two?
14:27 masak rakudo: my $a; say $a.?lc.WHAT
14:27 p6eval rakudo 33043: OUTPUT[Str␤]
14:27 masak rakudo: my $a = undef; say $a.?lc.WHAT
14:27 p6eval rakudo 33043: OUTPUT[Use of uninitialized value␤Str␤]
14:28 masak in both cases, $a contains a Failure, right?
14:28 moritz_ no
14:28 moritz_ 'my $a' will initialize with an Object proto
14:28 masak rakudo: my $a; say $a.WHAT; $a = undef; say $a.WHAT
14:28 p6eval rakudo 33043: OUTPUT[Failure␤Failure␤]
14:29 masak looks like Failure to me.
14:29 moritz_ urm
14:30 masak ...which makes the discrepancy all the more difficult to explain...
14:39 pugs_svn r23058 | moritz++ | [t/spec] S12 tests for 'is default' trait
14:46 pugs_svn r23059 | moritz++ | [t/spec] set svn props on a few test files
14:51 pugs_svn r23060 | moritz++ | [t/spec] smartlink for default-trait.t
14:53 sri_kraih joined #perl6
14:53 pmurias joined #perl6
14:54 Coleoid_ joined #perl6
14:58 jan_ joined #perl6
15:29 alester joined #perl6
15:42 cognominal joined #perl6
16:06 cognominal joined #perl6
16:36 zamolxes joined #perl6
16:37 meppl joined #perl6
16:43 jferrero joined #perl6
17:10 justatheory joined #perl6
17:47 alester joined #perl6
17:59 ilogger2 joined #perl6
18:07 spinclad_ joined #perl6
18:08 adc_penner2 joined #perl6
18:13 spinclad_ joined #perl6
18:19 moritz_ rakudo: enum Foo<get_string>;
18:19 p6eval rakudo 33053: OUTPUT[A method named 'get_string' already exists in class ''. It may have been supplied by a role.␤current instr.: '_block16' pc -1 ((unknown file):-1)␤]
18:20 __felix__ joined #perl6
18:31 pugs_svn r23061 | moritz++ | [t/spec] test for RT #59982 (my $x; $x = $x + 1i fails in rakudo)
18:35 nacho joined #perl6
18:50 moritz_ rakudo: for 0 .. 5 { .uc.print }
18:50 p6eval rakudo 33053: OUTPUT[012345]
18:53 pugs_svn r23062 | moritz++ | [t/spec] corrected test in for.t
18:53 pugs_svn r23063 | moritz++ | [t/spec] corrected previous commit
19:08 jnthn Correcting the corrections to the corrections... ;-)
19:09 moritz_ indeed :)
19:09 jnthn The multi method case for is default isn't so surprising, given multi methods don't really work at all yet.
19:09 jnthn It'll be some oddity with the invocant.
19:10 jnthn It's high on my "to fix" list.
19:10 moritz_ oki
19:10 moritz_ I'm writing tests for 'is also' on classes right now
19:10 jnthn cool
19:10 * jnthn thought he'd maybe done some for that, but maybe not
19:10 moritz_ so far I haven't found a single bug when extending user defined kclasses
19:11 moritz_ Str seems to be problematic
19:13 moritz_ Int is fine
19:13 jnthn Ah, Str...
19:14 jnthn Str is...special.
19:14 * moritz_ sees memories of old pains emerging...
19:14 jnthn You shoulda seen what it took to make $something_that_is_a_string does Foo kinda stuff work.
19:15 jnthn It boils down to Str just mapping a PMC, where as most other things really are high level classes.
19:21 pugs_svn r23064 | moritz++ | [t/spec] add tests for 'is also' on classes
19:26 pugs_svn r23065 | moritz++ | [t/spec] set svn props on open.t
19:28 rakudo_svn joined #perl6
19:28 jnthn moritz_: So is also works on all but Str?
19:29 moritz_ jnthn: afaict yes
19:29 moritz_ jnthn: I've tested user defined classes, Int, List, Array, Str
19:29 jnthn moritz_: Great. I'm cooking nom at the moment - could you file a ticket about the Str one?
19:29 moritz_ (I can even add methods to List, and use it in Array, because of the inheritance)
19:29 moritz_ jnthn: I'm updating (and renaming) #56602 as we speak
19:29 jnthn Ah, good you tested the inherited case. :-)
19:30 alech joined #perl6
19:30 jnthn Excellent, thank you.
19:30 jnthn moritz++
19:30 rakudo_svn r33054 | moritz++ | [rakudo] add tests for 'is also' on classes
19:32 moritz_ jnthn: should I give you that ticket?
19:32 spx2 joined #perl6
19:33 moritz_ I just did that (impatient me ;)
19:36 meppl joined #perl6
19:36 jnthn moritz_: sure
19:48 moritz_ we're up at 4642 passing tests (on my machine, with bigint lib)
20:01 masak joined #perl6
20:05 silug joined #perl6
20:09 pugs_svn r23066 | moritz++ | [irclog] don't be overly picky about channel names
20:09 moritz_ masak++ for noticing ;)
20:25 s1n may be off topic, but does anyone know of any good perldoc syntax highlighters?
20:26 s1n err well, pod that is
20:26 masak s1n: I like the one they use at perldoc.perl.org :)
20:26 moritz_ s1n: vim does a not-too-bad job, but it's not exactly good either
20:26 tewk_ joined #perl6
20:27 s1n moritz_: got a link? i use vim and it's like all one color and i'd like to have the keywords highlighted
20:28 moritz_ s1n: there's some option you can use... forgot which. But if you open a .pod file it should display a bit better
20:29 s1n moritz_: is it good practice to move all pod to seperate .pod files?
20:29 moritz_ s1n: no ;)
20:30 masak s1n: :syntax on
20:30 moritz_ :let perl_include_pod I think
20:30 s1n moritz_: unknown variable
20:31 s1n masak: just colors everything default terminal color (":set syntax=on" that is)
20:31 masak s1n: ok, too bad.
20:31 moritz_ s1n: :let perl_include_pod=1 and then :e again
20:32 slavik joined #perl6
20:33 s1n moritz_: yeah, i just read that on vim's docs, but it didn't say anything about the :e, what does that do?
20:34 Psyche^ joined #perl6
20:34 moritz_ s1n: it reads the file again
20:34 s1n oh, heh, short for edit
20:38 s1n sweet, thanks guys, finally proper coloring of my perl code :)
20:38 moritz_ no problem
20:38 slavik I use perl coloring :P
20:39 s1n not sure why some of those aren't set by default for perl
20:56 slavik left #perl6
21:11 masak I want to add a test that checks that a block containing first $foo and then $^foo dies in some way. do I use dies_ok for this?
21:12 moritz_ masak: eval_dies_ok, because it's detected at compile time
21:12 masak oki
21:14 alester joined #perl6
21:17 IRSeekBot joined #perl6
21:18 pugs_svn r23067 | masak++ | [S06-signature/positional-placeholders.t] added another test that checks
21:18 pugs_svn r23067 | masak++ | against $foo-type variables being used before corresponding $^foo variables
21:22 justatheory joined #perl6
21:23 jferrero joined #perl6
21:26 jnthn We're probably not going to die on that one for a little while...
21:26 jnthn masak: Did you fudge it?
21:27 masak jnthn: no, but I can do it right now if you want
21:27 moritz_ masak: please do
21:27 * masak does
21:28 km2 joined #perl6
21:28 pugs_svn r23068 | masak++ | [S06-signature/positional-placeholders.t] fudged
21:46 zamolxes joined #perl6
21:52 guiwiz_ joined #perl6
21:53 guiwiz_ hi all
21:53 masak guiwiz_: hello!
21:54 masak welcome to #perl6. :)
21:55 guiwiz_ thank you
21:55 guiwiz_ do you know if there is a mirror for run.pugscode.org?
21:55 masak guiwiz_: not to my knowledge, no.
21:56 guiwiz_ too bad... i wanted to try perl6 but pugs won't install on my computer
21:56 masak guiwiz_: have you tried Rakudo?
21:56 masak it's worth a look.
21:57 guiwiz_ i need an interactive-mode interpreter, does rakudo acts like this?
21:57 guiwiz_ act*
21:57 masak guiwiz_: yes, but not very well in my opinion.
21:57 masak it's better as a compiler.
21:57 guiwiz_ ok
21:58 masak guiwiz_: the reason I say so is this bug: http://rt.perl.org/rt3/Tic​ket/Display.html?id=58258
21:58 lambdabot Title: #58258: The Rakudo REPL has no long-term memory
21:58 masak it kinda destroys all plans for interactive work.
21:58 guiwiz_ i will try then
21:58 guiwiz_ i just have to install parrot?
21:58 masak guiwiz_: yes.
21:58 masak and then `make perl6` in languages/perl6
22:03 ZuLuuuuuu joined #perl6
22:16 FurnaceBoy joined #perl6
22:19 alester joined #perl6
22:23 ZuLuuuuuu left #perl6
22:38 guiwiz_ guiwiz@Guillaume:~$ perl6
22:38 guiwiz_ > sub add ($a,$b) { $a + $b }
22:38 guiwiz_ > print add(1,2);
22:38 guiwiz_ >
22:38 lambdabot <no location info>: parse error on input `$'
22:38 lambdabot Not in scope: `add'
22:39 guiwiz_ how can i get my answer from the interpreter?
22:40 moritz_ rakudo: sub add ($a,$b) { $a + $b }; print add(1, 2)
22:40 p6eval rakudo 33107: OUTPUT[3]
22:41 moritz_ guiwiz_: try it with 'say' instead of 'print', maybe your terminal doesn't like it when there's no newline at the end of the output
22:41 guiwiz_ thank you, that works
22:41 jnthn If that is the answer, we likely want to flush...
22:41 jnthn That looks like a bug in the REPL.
22:42 moritz_ aye, fflushing wouldn't be bad
22:42 guiwiz_ i did something wrong?
22:42 moritz_ but my terminal also swallows short output from other jprogrms that have no line ending
22:42 moritz_ guiwiz_: no
22:43 moritz_ maybe we did something wrong, though ;)
22:45 kanru joined #perl6
22:49 guiwiz_ left #perl6
22:49 guiwiz_ joined #perl6
22:55 guiwiz_ bye all and thank you
22:56 FurnaceBoy ciao
22:56 FurnaceBoy bonne nuit :)
22:56 guiwiz_ ^^ bonne nuit :p
23:49 bacek__ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs